Enable cmake auto tests for -no-gui

This change disables tests which require QtGui.

Change-Id: Ib647afd086f54536054cb4c0cde5696d762ee8c4
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
bb10
Kai Pastor 2016-03-23 19:26:02 +01:00
parent 8875e9fe82
commit 9bc352e38d
4 changed files with 13 additions and 3 deletions

View File

@ -39,6 +39,9 @@ if (CMAKE_VERBOSE_MAKEFILE)
list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_VERBOSE_MAKEFILE=1")
endif()
if (NO_GUI)
list(APPEND BUILD_OPTIONS_LIST "-DNO_GUI=True")
endif()
if (NO_WIDGETS)
list(APPEND BUILD_OPTIONS_LIST "-DNO_WIDGETS=True")
endif()

View File

@ -24,7 +24,7 @@ ios: SUBDIRS = corelib gui
wince: SUBDIRS -= printsupport
cross_compile: SUBDIRS -= tools
!qtHaveModule(opengl): SUBDIRS -= opengl
!qtHaveModule(gui): SUBDIRS -= gui cmake installed_cmake
!qtHaveModule(gui): SUBDIRS -= gui
!qtHaveModule(widgets): SUBDIRS -= widgets
!qtHaveModule(printsupport): SUBDIRS -= printsupport
!qtHaveModule(concurrent): SUBDIRS -= concurrent

View File

@ -116,13 +116,18 @@ endif()
set(qt_module_includes
Core QObject
Gui QImage
Network QHostInfo
Sql QSqlError
Test QTestEventList
Xml QDomDocument
)
if (NOT NO_GUI)
list(APPEND qt_module_includes
Gui QImage
)
endif()
if (NOT NO_WIDGETS)
list(APPEND qt_module_includes
Widgets QWidget

View File

@ -34,7 +34,9 @@ macro(test_testlib_project _module)
endmacro()
add_subdirectory(core_only)
add_subdirectory(gui)
if(NOT NO_GUI)
add_subdirectory(gui)
endif()
if(NOT NO_WIDGETS)
add_subdirectory(widgets)
endif()