Warning, /frameworks/kwindowsystem/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY) 0002 remove_definitions(-DQT_NO_CAST_FROM_ASCII) 0003 remove_definitions(-DQT_NO_CAST_TO_ASCII) 0004 add_definitions(-DAUTOTEST_BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}") 0005 0006 include(ECMMarkAsTest) 0007 include(ECMAddTests) 0008 0009 find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test Widgets) 0010 0011 add_subdirectory(helper) 0012 0013 if (NOT APPLE) 0014 find_package(X11) 0015 find_package(XCB COMPONENTS XCB ICCCM KEYSYMS) 0016 endif() 0017 0018 if (TARGET Qt5::X11Extras) 0019 set(_qt_x11_libs Qt5::X11Extras) 0020 elseif (TARGET Qt6::Gui) 0021 set(_qt_x11_libs Qt6::GuiPrivate) # qtx11extras_p.h 0022 endif() 0023 0024 macro(KWINDOWSYSTEM_UNIT_TESTS) 0025 foreach(_testname ${ARGN}) 0026 set(libs KF5::WindowSystem Qt${QT_MAJOR_VERSION}::Test Qt${QT_MAJOR_VERSION}::Widgets XCB::ICCCM XCB::KEYSYMS ${_qt_x11_libs}) 0027 if(X11_FOUND) 0028 list(APPEND libs ${XCB_XCB_LIBRARY}) 0029 endif() 0030 ecm_add_test(${_testname}.cpp LINK_LIBRARIES ${libs} NAME_PREFIX "kwindowsystem-" GUI) 0031 endforeach(_testname) 0032 endmacro(KWINDOWSYSTEM_UNIT_TESTS) 0033 macro(KWINDOWSYSTEM_EXECUTABLE_TESTS) 0034 foreach(_testname ${ARGN}) 0035 add_executable(${_testname} ${_testname}.cpp) 0036 target_link_libraries(${_testname} KF5::WindowSystem Qt${QT_MAJOR_VERSION}::Test XCB::XCB ${_qt_x11_libs}) 0037 ecm_mark_as_test(${_testname}) 0038 endforeach() 0039 endmacro() 0040 0041 if(X11_FOUND) 0042 include_directories(${CMAKE_SOURCE_DIR}/src/platforms/xcb) 0043 kwindowsystem_unit_tests( 0044 kmanagerselectiontest 0045 kstartupinfo_unittest 0046 kxmessages_unittest 0047 kkeyserver_x11_unittest 0048 ) 0049 0050 kwindowsystem_unit_tests( 0051 kwindoweffectstest 0052 kwindowinfox11test 0053 kwindowsystemx11test 0054 kwindowsystem_threadtest 0055 netrootinfotestwm 0056 netwininfotestclient 0057 netwininfotestwm 0058 compositingenabled_test 0059 ) 0060 0061 kwindowsystem_executable_tests( 0062 fixx11h_test 0063 fixx11h_test2 0064 dontcrashmapviewport 0065 ) 0066 endif() 0067 0068 ecm_add_test(kwindowsystem_platform_wayland_test.cpp LINK_LIBRARIES KF5::WindowSystem Qt${QT_MAJOR_VERSION}::Test TEST_NAME kwindowsystemplatformwaylandtest NAME_PREFIX "kwindowsystem-" GUI)