[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    [PATCH] Better checks for all the necessary libs to build the XSync-based poller
From:       Aurélien_Gâteau <agateau () kde ! org>
Date:       2013-12-23 14:28:54
Message-ID: 10524569.aUOgZREaLy () trinity
[Download RAW message or body]

Harald found out some holes in our CMake checks for the XSync-based poller in 
KIdleTime: it did not fail if some of the libs necessary to build it was not 
there. Attached patch should fix this.

Aurélien
["0001-Better-checks-for-all-the-necessary-libs-to-build-th.patch" (0001-Better-checks-for-all-the-necessary-libs-to-build-th.patch)]

From 14a2908747940669b71f24fc5f07651843bb4b8f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aurélien Gâteau?= <agateau@kde.org>
Date: Mon, 23 Dec 2013 15:25:15 +0100
Subject: [PATCH] Better checks for all the necessary libs to build the X
 Sync-based poller

---
 CMakeLists.txt     | 10 ++++++----
 src/CMakeLists.txt |  5 +----
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b629e00..0b9973a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,14 +36,16 @@ find_package(X11_XCB)

 set(HAVE_X11 ${X11_FOUND})
 if(X11_FOUND)
-    add_feature_info("X Screensaver Extension (libXss)" X11_Xscreensaver_FOUND \
                "Support for KIdleTime (fallback mode)")
-    add_feature_info("X Sync Extension (libXext)" X11_XSync_FOUND "Efficient \
operation of KIdleTime. STRONGLY RECOMMENDED") +    set(HAVE_XSCREENSAVER \
${X11_Xscreensaver_FOUND}) +    set(HAVE_XSYNC X11_XSync_FOUND AND XCB_XCB_FOUND AND \
X11_XCB_FOUND AND XCB_SYNC_FOUND) +
+    add_feature_info("X Sync-based poller" HAVE_XSYNC "efficient operation of \
KIdleTime. STRONGLY RECOMMENDED (libXext + libxcb + libX11-xcb + libxcb-sync)") +    \
add_feature_info("X Screensaver-based poller" HAVE_XSCREENSAVER "KIdleTime fallback \
mode (libXss)")

-    if(NOT X11_XSync_FOUND AND NOT X11_Xscreensaver_FOUND)
+    if(NOT HAVE_XSCREENSAVER AND NOT HAVE_XSYNC)
         message(FATAL_ERROR "\nNeither the XSync (libXext) nor XScreensaver (libXss) \
development package was found.\nPlease install one of them (XSync is recommended)\n") \
endif()

-    set(HAVE_XSCREENSAVER ${X11_Xscreensaver_FOUND})
     set(HAVE_XTEST ${X11_XTest_FOUND})
 endif()

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 562e9f4..780c998 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,10 +1,7 @@
 ######## kidletime ####################

-if (X11_XSync_FOUND AND XCB_XCB_FOUND AND X11_XCB_FOUND AND XCB_SYNC_FOUND)
-   set (HAVE_XSYNC 1)
+if (HAVE_XSYNC)
    include_directories( ${XCB_XCB_INCLUDE_DIR} ${XCB_SYNC_INCLUDE_DIR})
-else ()
-   set (HAVE_XSYNC 0)
 endif ()

 configure_file(config-kidletime.h.cmake \
                ${CMAKE_CURRENT_BINARY_DIR}/config-kidletime.h )
--
1.8.3.2



_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic