From 654a17686e4b107682dfd726bac065cefebe7751 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Mon, 25 Apr 2016 11:27:00 +0200 Subject: [PATCH] Conditionally compile tests which depend on XCB_ICCCM Summary: Move/Resize and Strut tests Wayland tests are affected. Test Plan: Successful compilation when XCB_ICCCM is not found Reviewers: graesslin Reviewed By: graesslin Subscribers: plasma-devel Projects: #plasma Differential Revision: https://phabricator.kde.org/D1476 --- autotests/wayland/CMakeLists.txt | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/autotests/wayland/CMakeLists.txt b/autotests/wayland/CMakeLists.txt index f2361af707..b460b216a9 100644 --- a/autotests/wayland/CMakeLists.txt +++ b/autotests/wayland/CMakeLists.txt @@ -30,11 +30,13 @@ ecm_mark_as_test(testQuickTiling) ######################################################## # Move/Resize window test ######################################################## -set( testMoveResize_SRCS move_resize_window_test.cpp kwin_wayland_test.cpp ) -add_executable(testMoveResize ${testMoveResize_SRCS}) -target_link_libraries( testMoveResize kwin Qt5::Test XCB::ICCCM) -add_test(kwin-testMoveResize testMoveResize) -ecm_mark_as_test(testMoveResize) +if (XCB_ICCCM_FOUND) + set( testMoveResize_SRCS move_resize_window_test.cpp kwin_wayland_test.cpp ) + add_executable(testMoveResize ${testMoveResize_SRCS}) + target_link_libraries( testMoveResize kwin Qt5::Test XCB::ICCCM) + add_test(kwin-testMoveResize testMoveResize) + ecm_mark_as_test(testMoveResize) +endif() ######################################################## # Don't Crash For glxgears @@ -138,8 +140,10 @@ ecm_mark_as_test(testDebugConsole) ######################################################## # Struts Test ######################################################## -set( testStruts_SRCS struts_test.cpp kwin_wayland_test.cpp ) -add_executable(testStruts ${testStruts_SRCS}) -target_link_libraries( testStruts kwin Qt5::Test XCB::ICCCM) -add_test(kwin-testStruts testStruts) -ecm_mark_as_test(testStruts) +if (XCB_ICCCM_FOUND) + set( testStruts_SRCS struts_test.cpp kwin_wayland_test.cpp ) + add_executable(testStruts ${testStruts_SRCS}) + target_link_libraries( testStruts kwin Qt5::Test XCB::ICCCM) + add_test(kwin-testStruts testStruts) + ecm_mark_as_test(testStruts) +endif()