2014-09-17 11:24:51 +00:00
|
|
|
########################################################
|
|
|
|
# Test WaylandServerDisplay
|
|
|
|
########################################################
|
|
|
|
set( testWaylandServerDisplay_SRCS
|
|
|
|
test_display.cpp
|
|
|
|
)
|
|
|
|
add_executable(testWaylandServerDisplay ${testWaylandServerDisplay_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries( testWaylandServerDisplay Qt::Test Qt::Gui kwin Wayland::Server)
|
2017-07-29 06:27:59 +00:00
|
|
|
add_test(NAME kwayland-testWaylandServerDisplay COMMAND testWaylandServerDisplay)
|
2014-09-17 11:24:51 +00:00
|
|
|
ecm_mark_as_test(testWaylandServerDisplay)
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test WaylandServerSeat
|
|
|
|
########################################################
|
|
|
|
set( testWaylandServerSeat_SRCS
|
|
|
|
test_seat.cpp
|
|
|
|
)
|
|
|
|
add_executable(testWaylandServerSeat ${testWaylandServerSeat_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries( testWaylandServerSeat Qt::Test Qt::Gui kwin Wayland::Server)
|
2017-07-29 06:27:59 +00:00
|
|
|
add_test(NAME kwayland-testWaylandServerSeat COMMAND testWaylandServerSeat)
|
2014-09-17 11:24:51 +00:00
|
|
|
ecm_mark_as_test(testWaylandServerSeat)
|
2016-04-12 08:09:22 +00:00
|
|
|
|
2016-07-04 06:48:43 +00:00
|
|
|
########################################################
|
|
|
|
# Test No XDG_RUNTIME_DIR
|
|
|
|
########################################################
|
|
|
|
add_executable(testNoXdgRuntimeDir test_no_xdg_runtime_dir.cpp)
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries( testNoXdgRuntimeDir Qt::Test kwin)
|
2017-07-29 06:27:59 +00:00
|
|
|
add_test(NAME kwayland-testNoXdgRuntimeDir COMMAND testNoXdgRuntimeDir)
|
2016-07-04 06:48:43 +00:00
|
|
|
ecm_mark_as_test(testNoXdgRuntimeDir)
|
2020-02-12 15:20:38 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test Tablet Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testTabletInterface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(TABLET_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/unstable/tablet/tablet-unstable-v2.xml
|
|
|
|
BASENAME tablet-unstable-v2
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testTabletInterface FILES
|
|
|
|
${WaylandProtocols_DATADIR}/unstable/tablet/tablet-unstable-v2.xml)
|
|
|
|
endif()
|
|
|
|
target_sources(testTabletInterface PRIVATE test_tablet_interface.cpp ${TABLET_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries( testTabletInterface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-02-12 15:20:38 +00:00
|
|
|
add_test(NAME kwayland-testTabletInterface COMMAND testTabletInterface)
|
|
|
|
ecm_mark_as_test(testTabletInterface)
|
2020-05-12 11:26:57 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test DataControlInterface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testDataControlInterface test_datacontrol_interface.cpp ${DATACONTROL_SRCS})
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
2020-05-12 11:26:57 +00:00
|
|
|
ecm_add_qtwayland_client_protocol(DATACONTROL_SRCS
|
2022-04-22 09:27:33 +00:00
|
|
|
PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-data-control-unstable-v1.xml
|
2020-05-12 11:26:57 +00:00
|
|
|
BASENAME wlr-data-control-unstable-v1
|
|
|
|
)
|
2022-03-05 12:01:13 +00:00
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testDataControlInterface FILES
|
2022-04-22 09:27:33 +00:00
|
|
|
${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-data-control-unstable-v1.xml)
|
2022-03-05 12:01:13 +00:00
|
|
|
endif()
|
|
|
|
target_sources(testDataControlInterface PRIVATE test_datacontrol_interface.cpp ${DATACONTROL_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries( testDataControlInterface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-05-12 11:26:57 +00:00
|
|
|
add_test(NAME kwayland-testDataControlInterface COMMAND testDataControlInterface)
|
|
|
|
ecm_mark_as_test(testDataControlInterface)
|
2020-05-04 09:45:15 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test Keyboard Shortcuts Inhibitor Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testKeyboardShortcutsInhibitorInterface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(KEYBOARD_SHORTCUTS_INHIBITOR_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml
|
|
|
|
BASENAME keyboard-shortcuts-inhibit-unstable-v1
|
2020-05-04 09:45:15 +00:00
|
|
|
)
|
2022-03-05 12:01:13 +00:00
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testKeyboardShortcutsInhibitorInterface FILES
|
|
|
|
${WaylandProtocols_DATADIR}/unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml)
|
|
|
|
endif()
|
|
|
|
target_sources(testKeyboardShortcutsInhibitorInterface PRIVATE test_keyboard_shortcuts_inhibitor_interface.cpp ${KEYBOARD_SHORTCUTS_INHIBITOR_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testKeyboardShortcutsInhibitorInterface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-05-04 09:45:15 +00:00
|
|
|
add_test(NAME kwayland-testKeyboardShortcutsInhibitorInterface COMMAND testKeyboardShortcutsInhibitorInterface)
|
|
|
|
ecm_mark_as_test(testKeyboardShortcutsInhibitorInterface)
|
|
|
|
|
2020-05-24 10:46:27 +00:00
|
|
|
########################################################
|
|
|
|
# Test Viewporter Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testViewporterInterface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(VIEWPORTER_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/stable/viewporter/viewporter.xml
|
|
|
|
BASENAME viewporter
|
2020-05-24 10:46:27 +00:00
|
|
|
)
|
2022-03-05 12:01:13 +00:00
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testViewporterInterface FILES
|
|
|
|
${WaylandProtocols_DATADIR}/stable/viewporter/viewporter.xml)
|
|
|
|
endif()
|
|
|
|
target_sources(testViewporterInterface PRIVATE test_viewporter_interface.cpp ${VIEWPORTER_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testViewporterInterface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-05-24 10:46:27 +00:00
|
|
|
add_test(NAME kwayland-testViewporterInterface COMMAND testViewporterInterface)
|
|
|
|
ecm_mark_as_test(testViewporterInterface)
|
2020-06-16 14:58:21 +00:00
|
|
|
|
|
|
|
########################################################
|
2020-09-04 14:45:47 +00:00
|
|
|
# Test ScreencastV1Interface
|
2020-06-16 14:58:21 +00:00
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testScreencastV1Interface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(SCREENCAST_SRCS
|
2022-05-02 19:39:18 +00:00
|
|
|
PROTOCOL PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/zkde-screencast-unstable-v1.xml
|
2022-03-05 12:01:13 +00:00
|
|
|
BASENAME zkde-screencast-unstable-v1
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testScreencastV1Interface FILES
|
2022-05-02 19:39:18 +00:00
|
|
|
${PLASMA_WAYLAND_PROTOCOLS_DIR}/zkde-screencast-unstable-v1.xml)
|
2022-03-05 12:01:13 +00:00
|
|
|
endif()
|
|
|
|
target_sources(testScreencastV1Interface PRIVATE test_screencast.cpp ${SCREENCAST_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testScreencastV1Interface Qt::Test kwin Wayland::Client KF5::WaylandClient)
|
2020-09-04 14:45:47 +00:00
|
|
|
add_test(NAME kwayland-testScreencastV1Interface COMMAND testScreencastV1Interface)
|
|
|
|
ecm_mark_as_test(testScreencastV1Interface)
|
2020-07-23 14:36:01 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test InputMethod Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testInputMethodInterface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(INPUTMETHOD_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml
|
|
|
|
BASENAME input-method-unstable-v1
|
|
|
|
)
|
|
|
|
ecm_add_qtwayland_client_protocol(VIEWPORTER_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v1.xml
|
|
|
|
BASENAME text-input-unstable-v1
|
2020-07-23 14:36:01 +00:00
|
|
|
)
|
2022-03-05 12:01:13 +00:00
|
|
|
else()
|
2022-10-19 14:12:02 +00:00
|
|
|
qt6_generate_wayland_protocol_client_sources(testInputMethodInterface
|
|
|
|
NO_INCLUDE_CORE_ONLY
|
|
|
|
FILES
|
|
|
|
${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml
|
|
|
|
)
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testInputMethodInterface
|
|
|
|
FILES
|
|
|
|
${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v1.xml
|
2020-10-08 08:37:36 +00:00
|
|
|
)
|
2022-03-05 12:01:13 +00:00
|
|
|
endif()
|
2022-08-25 08:02:48 +00:00
|
|
|
target_sources(testInputMethodInterface PRIVATE test_inputmethod_interface.cpp ../../tests/fakeoutput.cpp ${INPUTMETHOD_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testInputMethodInterface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-07-23 14:36:01 +00:00
|
|
|
add_test(NAME kwayland-testInputMethodInterface COMMAND testInputMethodInterface)
|
|
|
|
ecm_mark_as_test(testInputMethodInterface)
|
2020-08-07 18:41:52 +00:00
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test LayerShellV1 Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testLayerShellV1Interface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(LAYERSHELLV1_SRCS
|
2022-04-22 09:27:33 +00:00
|
|
|
PROTOCOL ${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-layer-shell-unstable-v1.xml
|
2022-03-05 12:01:13 +00:00
|
|
|
BASENAME wlr-layer-shell-unstable-v1
|
|
|
|
)
|
|
|
|
ecm_add_qtwayland_client_protocol(LAYERSHELLV1_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
|
|
|
|
BASENAME xdg-shell
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testLayerShellV1Interface FILES
|
2022-04-22 09:27:33 +00:00
|
|
|
${PROJECT_SOURCE_DIR}/src/wayland/protocols/wlr-layer-shell-unstable-v1.xml
|
2022-03-05 12:01:13 +00:00
|
|
|
${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
target_sources(testLayerShellV1Interface PRIVATE test_layershellv1_interface.cpp ${LAYERSHELLV1_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testLayerShellV1Interface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-08-07 18:41:52 +00:00
|
|
|
add_test(NAME kwayland-testLayerShellV1Interface COMMAND testLayerShellV1Interface)
|
|
|
|
ecm_mark_as_test(testLayerShellV1Interface)
|
2020-09-15 07:27:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Test TextInputV3 Interface
|
|
|
|
########################################################
|
2022-03-05 12:01:13 +00:00
|
|
|
add_executable(testTextInputV3Interface)
|
|
|
|
if (QT_MAJOR_VERSION EQUAL "5")
|
|
|
|
ecm_add_qtwayland_client_protocol(TEXTINPUTV3_SRCS
|
|
|
|
PROTOCOL ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml
|
|
|
|
BASENAME text-input-unstable-v3
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
qt6_generate_wayland_protocol_client_sources(testTextInputV3Interface FILES
|
|
|
|
${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml)
|
|
|
|
endif()
|
|
|
|
target_sources(testTextInputV3Interface PRIVATE test_textinputv3_interface.cpp ${TEXTINPUTV3_SRCS})
|
2022-04-22 09:27:33 +00:00
|
|
|
target_link_libraries(testTextInputV3Interface Qt::Test kwin KF5::WaylandClient Wayland::Client)
|
2020-09-15 07:27:46 +00:00
|
|
|
add_test(NAME kwayland-testTextInputV3Interface COMMAND testTextInputV3Interface)
|
|
|
|
ecm_mark_as_test(testTextInputV3Interface)
|