Changeset View
Changeset View
Standalone View
Standalone View
shell/autotests/CMakeLists.txt
1 | include(ECMAddTests) | 1 | include(ECMAddTests) | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | include_directories(${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/..) | 3 | include_directories(${CMAKE_CURRENT_BINARY_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/..) | ||
4 | 4 | | |||
5 | MACRO(PLASMASHELL_UNIT_TESTS) | 5 | MACRO(PLASMASHELL_UNIT_TESTS) | ||
6 | FOREACH(_testname ${ARGN}) | 6 | FOREACH(_testname ${ARGN}) | ||
7 | add_executable(${_testname} ${_testname}.cpp ../screenpool.cpp ) | 7 | add_executable(${_testname} ${_testname}.cpp ../screenpool.cpp ) | ||
8 | target_link_libraries(${_testname} | 8 | target_link_libraries(${_testname} | ||
9 | Qt5::Test | 9 | Qt5::Test | ||
10 | Qt5::Gui | 10 | Qt5::Gui | ||
11 | KF5::Service | 11 | KF5::Service | ||
12 | KF5::WindowSystem | ||||
12 | ) | 13 | ) | ||
13 | if(HAVE_X11) | 14 | if(HAVE_X11) | ||
14 | target_link_libraries(${_testname} ${X11_LIBRARIES} ${XCB_LIBRARIES} ) | 15 | target_link_libraries(${_testname} ${X11_LIBRARIES} ${XCB_LIBRARIES} ) | ||
15 | target_link_libraries(${_testname} Qt5::X11Extras) | 16 | target_link_libraries(${_testname} Qt5::X11Extras) | ||
16 | endif() | 17 | endif() | ||
17 | if(QT_QTOPENGL_FOUND) | 18 | if(QT_QTOPENGL_FOUND) | ||
18 | target_link_libraries(${_testname} Qt5::OpenGL) | 19 | target_link_libraries(${_testname} Qt5::OpenGL) | ||
19 | endif() | 20 | endif() | ||
20 | add_test(NAME ${_testname} COMMAND ${_testname}) | 21 | add_test(NAME ${_testname} COMMAND ${_testname}) | ||
21 | ecm_mark_as_test(${_testname}) | 22 | ecm_mark_as_test(${_testname}) | ||
22 | ENDFOREACH(_testname) | 23 | ENDFOREACH(_testname) | ||
23 | ENDMACRO(PLASMASHELL_UNIT_TESTS) | 24 | ENDMACRO(PLASMASHELL_UNIT_TESTS) | ||
24 | 25 | | |||
25 | PLASMASHELL_UNIT_TESTS( | 26 | PLASMASHELL_UNIT_TESTS( | ||
26 | screenpooltest | 27 | screenpooltest | ||
27 | ) | 28 | ) |