summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-03-14 14:08:55 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-18 20:17:10 +0100
commit4111a676f1073e2f29de2c042785a941dbfb9458 (patch)
tree5750889bd6cf75766d511f8a879129040f14a6c3 /tests/auto/cmake/CMakeLists.txt
parent374fc337ae03b44903768c18eb3f16c0e5451f81 (diff)
Make the qtbase cmake tests work without the Widgets module.
Task-number: QTBUG-28540 Change-Id: I916d104c8aba551ee9a5b34da3fd85dcb26bbf64 Reviewed-by: Alexander Neundorf <neundorf@kde.org> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/CMakeLists.txt31
1 files changed, 20 insertions, 11 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 6da0c9bfa6..4cc0505a8c 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -55,10 +55,12 @@ else()
message("CMake version older than 2.8.9 (Found ${CMAKE_VERSION}). Not running test \"test_use_modules_function\"")
endif()
expect_pass(test_wrap_cpp_and_resources)
-expect_pass(test_dependent_modules)
+if (NOT NO_WIDGETS)
+ expect_pass(test_dependent_modules)
+ expect_pass("test(needsquoting)dirname")
+endif()
expect_fail(test_add_resource_options)
expect_fail(test_wrap_cpp_options)
-expect_pass("test(needsquoting)dirname")
expect_pass(test_platform_defs_include)
expect_pass(test_qtmainwin_library)
@@ -78,29 +80,36 @@ expect_pass(test_testlib_definitions)
expect_pass(test_json_plugin_includes)
expect_fail(test_testlib_no_link_gui)
-expect_fail(test_testlib_no_link_widgets)
-
execute_process(COMMAND ${CMAKE_COMMAND} -E copy
"${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp"
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_gui/test_testlib_no_link_gui/"
)
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy
- "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp"
- "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/"
-)
+
+if (NOT NO_WIDGETS)
+ expect_fail(test_testlib_no_link_widgets)
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy
+ "${CMAKE_CURRENT_SOURCE_DIR}/test_testlib_definitions/main.cpp"
+ "${CMAKE_CURRENT_BINARY_DIR}/failbuild/test_testlib_no_link_widgets/test_testlib_no_link_widgets/"
+ )
+endif()
set(qt_module_includes
Core QObject
Gui QImage
- Widgets QWidget
Network QHostInfo
- OpenGL QGLBuffer
Sql QSqlError
Test QTestEventList
Xml QDomDocument
- PrintSupport QPrintDialog
)
+if (NOT NO_WIDGETS)
+ list(APPEND qt_module_includes
+ Widgets QWidget
+ OpenGL QGLBuffer
+ PrintSupport QPrintDialog
+ )
+endif()
+
if (UNIX AND NOT APPLE AND NOT QNXNTO)
list(APPEND qt_module_includes
DBus QDBusMessage