Tests: Use TARGET over features to decide which tests to run

Change-Id: I57642907c2e8e5e1424c5b70a905a2b26b93df88
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
Tobias Hunger 2018-10-30 14:23:48 +01:00
parent 60d7331f93
commit f43667a6a1

View File

@ -22,11 +22,11 @@ if (QT_FEATURE_dbus)
add_subdirectory("dbus") add_subdirectory("dbus")
endif() endif()
endif() endif()
if (NOT APPLE_UIKIT AND QT_FEATURE_gui) if (NOT APPLE_UIKIT AND TARGET Qt::Gui)
add_subdirectory("gui") add_subdirectory("gui")
endif() endif()
if (QT_FEATURE_network AND NOT WINRT) if (TARGET Qt::Network AND NOT WINRT)
# add_subdirectory("network") # add_subdirectory("network")
endif() endif()
if (TARGET Qt::OpenGL AND NOT WINRT) if (TARGET Qt::OpenGL AND NOT WINRT)
add_subdirectory("opengl") add_subdirectory("opengl")
@ -38,17 +38,17 @@ add_subdirectory("testlib")
if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process) if (NOT CMAKE_CROSSCOMPILE AND QT_FEATURE_process)
# add_subdirectory("tools") # add_subdirectory("tools")
endif() endif()
if (QT_FEATURE_xml) if (TARGET Qt::Xml)
# add_subdirectory("xml") # add_subdirectory("xml")
endif() endif()
if (QT_FEATURE_concurrent) if (TARGET Qt::Concurrent)
# add_subdirectory("concurrent") # add_subdirectory("concurrent")
endif() endif()
# add_subdirectory("other") # add_subdirectory("other")
if (QT_FEATURE_widgets) if (TARGET Qt::Widgets)
add_subdirectory("widgets") add_subdirectory("widgets")
endif() endif()
if (QT_FEATURE_printsupport) if (TARGET Qt::PrintSupport)
# add_subdirectory("printsupport") # add_subdirectory("printsupport")
endif() endif()
# add_subdirectory("cmake") ## FIXME: Does this still make sense in this form? # add_subdirectory("cmake") ## FIXME: Does this still make sense in this form?