From 7d059c8b08d701539bcfe9ca7ec5f44b502b06a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 27 Aug 2014 12:59:32 +0200 Subject: [PATCH] [autotests/wayland_client] Don't build TestWaylandFullscreenShell for Wayland < 1.5 The fullscreen shell is only provided with at least Weston 1.5. It should be checked on runtime, but that's difficult as Weston doesn't fail if it cannot find the shell.so. So we disable it based on the assumption that if Wayland library is not 1.5 the Weston is also not 1.5. --- autotests/wayland_client/CMakeLists.txt | 26 +++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/autotests/wayland_client/CMakeLists.txt b/autotests/wayland_client/CMakeLists.txt index e14fc85ab9..708d92fc20 100644 --- a/autotests/wayland_client/CMakeLists.txt +++ b/autotests/wayland_client/CMakeLists.txt @@ -27,18 +27,20 @@ ecm_mark_as_test(testWaylandRegistry) ######################################################## # Test WaylandFullscreenShell ######################################################## -set( testWaylandFullscreenShell_SRCS - test_wayland_fullscreen_shell.cpp - ${KWIN_SOURCE_DIR}/wayland_client/connection_thread.cpp - ${KWIN_SOURCE_DIR}/wayland_client/registry.cpp - ${KWIN_SOURCE_DIR}/wayland_client/fullscreen_shell.cpp - ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c - ) -add_executable(testWaylandFullscreenShell ${testWaylandFullscreenShell_SRCS}) -add_dependencies(testWaylandFullscreenShell wayland-client-fullscreen-shell) -target_link_libraries( testWaylandFullscreenShell Qt5::Test Wayland::Client) -add_test(kwin-testWaylandFullscreenShell testWaylandFullscreenShell) -ecm_mark_as_test(testWaylandFullscreenShell) +if(Wayland_VERSION VERSION_GREATER "1.4.0") + set( testWaylandFullscreenShell_SRCS + test_wayland_fullscreen_shell.cpp + ${KWIN_SOURCE_DIR}/wayland_client/connection_thread.cpp + ${KWIN_SOURCE_DIR}/wayland_client/registry.cpp + ${KWIN_SOURCE_DIR}/wayland_client/fullscreen_shell.cpp + ${CMAKE_BINARY_DIR}/wayland_protocols/wayland-client-fullscreen-shell.c + ) + add_executable(testWaylandFullscreenShell ${testWaylandFullscreenShell_SRCS}) + add_dependencies(testWaylandFullscreenShell wayland-client-fullscreen-shell) + target_link_libraries( testWaylandFullscreenShell Qt5::Test Wayland::Client) + add_test(kwin-testWaylandFullscreenShell testWaylandFullscreenShell) + ecm_mark_as_test(testWaylandFullscreenShell) +endif() ######################################################## # Test WaylandOutput