Debian Codegraph @

autotests/CMakeLists.txt

raw
1 include(ECMMarkAsTest)
2 include(ECMMarkNonGuiExecutable)
3 include(ECMAddTests)
4
5 find_package(Qt${QT_MAJOR_VERSION}Test ${REQUIRED_QT_VERSION} CONFIG QUIET)
6
7 if(NOT TARGET Qt${QT_MAJOR_VERSION}::Test)
8 message(STATUS "Qt${QT_MAJOR_VERSION}Test not found, autotests will not be built.")
9 return()
10 endif()
11
12 include_directories( Qt${QT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS )
13
14 set(CONFIGFILE "${CMAKE_CURRENT_SOURCE_DIR}/kdeplatformtheme_kdeglobals")
15 configure_file(kdeplatformtheme_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/kdeplatformtheme_config.h)
16
17 remove_definitions(-DQT_NO_CAST_FROM_ASCII)
18
19 macro(FRAMEWORKINTEGRATION_TESTS _testname)
20 ecm_add_test(${_testname}.cpp ${ARGN}
21 LINK_LIBRARIES Qt${QT_MAJOR_VERSION}::Test KF5::ConfigWidgets KF5::ConfigCore KF5::IconThemes KF5::Style KF5::Notifications
22 TEST_NAME ${_testname}
23 NAME_PREFIX "frameworkintegration-")
24 set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS "-DUNIT_TEST")
25 endmacro()
26
27 frameworkintegration_tests(
28 kstyle_unittest
29 )
30