CMake: Don't attempt gui-tests if Qt is built with -no-gui
Change-Id: I5f327fa1b0c7827535a4b00ca7d0d4281b1eec7b Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
parent
f634ce3b9a
commit
99e25dd7d8
@ -56,6 +56,7 @@ mingw:isEmpty(CROSS_COMPILE):CMAKE_GENERATOR = -G \"MinGW Makefiles\"
|
||||
|
||||
BUILD_DIR = $$replace($$list($$OUT_PWD/build), /, $$QMAKE_DIR_SEP)
|
||||
|
||||
!qtHaveModule(gui): CMAKE_MODULE_DEFINES += -DNO_GUI=True
|
||||
!qtHaveModule(widgets): CMAKE_MODULE_DEFINES += -DNO_WIDGETS=True
|
||||
!qtHaveModule(dbus): CMAKE_MODULE_DEFINES += -DNO_DBUS=True
|
||||
|
||||
|
@ -50,7 +50,9 @@ include("${_Qt5CTestMacros}")
|
||||
if(NOT ${CMAKE_VERSION} VERSION_LESS 2.8.9)
|
||||
# Requires INCLUDE_DIRECTORIES target property in CMake 2.8.8
|
||||
# and POSITION_INDEPENDENT_CODE target property in 2.8.9
|
||||
if (NOT NO_GUI)
|
||||
expect_pass(test_use_modules_function)
|
||||
endif()
|
||||
expect_pass(test_umbrella_config)
|
||||
else()
|
||||
message("CMake version older than 2.8.9 (Found ${CMAKE_VERSION}). Not running test \"test_use_modules_function\" or \"test_umbrella_config\"")
|
||||
|
Loading…
Reference in New Issue
Block a user