Warning, /plasma/libkscreen/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 add_definitions(-DTEST_DATA="${CMAKE_CURRENT_SOURCE_DIR}/configs/")
0002 
0003 include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_SOURCE_DIR}/tests/kwayland/)
0004 
0005 macro(KSCREEN_ADD_TEST)
0006     foreach(_testname ${ARGN})
0007         set(test_SRCS ${_testname}.cpp ${KSCREEN_WAYLAND_SRCS})
0008         qt_add_dbus_interface(test_SRCS ${CMAKE_SOURCE_DIR}/interfaces/org.kde.KScreen.FakeBackend.xml fakebackendinterface)
0009         add_executable(${_testname} ${test_SRCS})
0010         target_link_libraries(${_testname} Qt::Core Qt::Gui Qt::Test Qt::DBus KF6::Screen ${KSCREEN_WAYLAND_LIBS})
0011         add_test(NAME kscreen-${_testname}
0012                  COMMAND dbus-launch $<TARGET_FILE:${_testname}>
0013         )
0014         ecm_mark_as_test(${_testname})
0015     endforeach(_testname)
0016 endmacro(KSCREEN_ADD_TEST)
0017 
0018 kscreen_add_test(testscreenconfig)
0019 kscreen_add_test(testqscreenbackend)
0020 kscreen_add_test(testconfigserializer)
0021 kscreen_add_test(testconfigmonitor)
0022 kscreen_add_test(testinprocess)
0023 kscreen_add_test(testbackendloader)
0024 kscreen_add_test(testlog)
0025 kscreen_add_test(testmodelistchange)
0026 kscreen_add_test(testedid)
0027 
0028 # FIXME KWaylandServer is not a thing in KF6
0029 if (NOT TARGET KF6::WaylandServer)
0030     message(WARNING "Skipping KF6::WaylandServer based unit tests!")
0031     return()
0032 endif()
0033 
0034 set(KSCREEN_WAYLAND_LIBS
0035     KF6::WaylandServer KF6::WaylandClient
0036 )
0037 
0038 # For WaylandConfigReader and TestServer
0039 set(KSCREEN_WAYLAND_SRCS
0040     ${CMAKE_SOURCE_DIR}/tests/kwayland/waylandconfigreader.cpp
0041     ${CMAKE_SOURCE_DIR}/tests/kwayland/waylandtestserver.cpp
0042 )
0043 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../backends/kwayland)
0044 
0045 kscreen_add_test(testkwaylandbackend)
0046 kscreen_add_test(testkwaylandconfig)
0047 
0048 set(KSCREEN_WAYLAND_LIBS "")
0049 set(KSCREEN_WAYLAND_SRCS "")
0050 
0051 
0052 if (ENABLE_XRANDR_TESTS)
0053     kscreen_add_test(testxrandr)
0054 endif()