Disable testing if QtTest is not found.
REVIEW: 117393
This commit is contained in:
parent
f247a41396
commit
1bca6c3dfa
2 changed files with 18 additions and 7 deletions
|
@ -14,23 +14,33 @@ include(GenerateExportHeader)
|
|||
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings)
|
||||
|
||||
include(ECMInstallIcons)
|
||||
|
||||
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS
|
||||
Concurrent
|
||||
Core
|
||||
DBus
|
||||
Quick
|
||||
Script
|
||||
Test
|
||||
UiTools
|
||||
Widgets
|
||||
X11Extras
|
||||
)
|
||||
|
||||
find_package(Qt5Test ${QT_MIN_VERSION} CONFIG QUIET)
|
||||
set_package_properties(Qt5Test PROPERTIES
|
||||
PURPOSE "Required for tests"
|
||||
TYPE OPTIONAL
|
||||
)
|
||||
add_feature_info("Qt5Test" Qt5Test_FOUND "Required for building tests")
|
||||
if (NOT Qt5Test_FOUND)
|
||||
set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.")
|
||||
endif()
|
||||
|
||||
include(KDEInstallDirs)
|
||||
include(KDECMakeSettings)
|
||||
include(KDECompilerSettings)
|
||||
|
||||
include(ECMInstallIcons)
|
||||
|
||||
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0)
|
||||
|
||||
find_package(Qt5Multimedia QUIET)
|
||||
|
|
|
@ -52,6 +52,7 @@ qt5_add_dbus_interface( modelTest_SRC
|
|||
${KWIN_SOURCE_DIR}/org.kde.kwin.Effects.xml kwin_effects_interface)
|
||||
|
||||
add_executable(effectModelTest ${modelTest_SRC})
|
||||
ecm_mark_as_test(effectModelTest)
|
||||
|
||||
target_link_libraries(effectModelTest
|
||||
Qt5::Quick
|
||||
|
|
Loading…
Reference in a new issue