summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-06-10 15:58:19 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-10 16:09:29 +0200
commit0c7737264e69a97c8ea2353b3bef4b776dd17695 (patch)
tree4e44880720a91dc3049e0071489bb13b318047fa
parentf9e6898036e2521a695c27a87aeb90d71afbadaa (diff)
downloadtdebase-0c7737264e69a97c8ea2353b3bef4b776dd17695.tar.gz
tdebase-0c7737264e69a97c8ea2353b3bef4b776dd17695.zip
Add xscreensaver support to CMake
This closes Bug 859 (cherry picked from commit 80deb52955cbd917e10f015f37699d830cb681ce)
-rw-r--r--CMakeLists.txt1
-rw-r--r--ConfigureChecks.cmake20
-rw-r--r--config.h.cmake3
-rw-r--r--kdesktop/CMakeLists.txt1
4 files changed, 25 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a114e1b51..d31ade4c1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,7 @@ option( WITH_XRENDER "Enable xrender support" OFF )
option( WITH_XDAMAGE "Enable xdamage support" OFF )
option( WITH_XEXT "Enable xext support" OFF )
option( WITH_XTEST "Enable xext support" OFF )
+option( WITH_XSCREENSAVER "Enable xscreensaver support" OFF )
option( WITH_LIBART "Enable libart support (for SVG icons and wallpapers)" OFF )
option( WITH_LIBUSB "Enable control of some mouse models through libusb" OFF )
option( WITH_LIBRAW1394 "Enable visualization of ieee1394 devices through libraw1394" OFF )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 4a78853c9..3834f6d57 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -130,6 +130,26 @@ if( WITH_XTEST )
endif( )
+# xscreensaver ()
+if( WITH_XSCREENSAVER )
+ check_library_exists( Xss XScreenSaverQueryInfo "" HAVE_XSSLIB )
+ if( HAVE_XSSLIB )
+ pkg_search_module( XSS xscrnsaver )
+ else( )
+ check_library_exists( Xext XScreenSaverQueryInfo "" HAVE_XSSLIB )
+ if( HAVE_XSSLIB )
+ pkg_search_module( XSS xext )
+ endif( )
+ endif( )
+ check_include_file( X11/extensions/scrnsaver.h HAVE_XSCREENSAVER_H )
+ if( HAVE_XSSLIB AND HAVE_XSCREENSAVER_H )
+ set( HAVE_XSCREENSAVER 1 )
+ else( )
+ tde_message_fatal( "xscreensaver is requested, but was not found on your system" )
+ endif( )
+endif( )
+
+
# GL
if( BUILD_KDESKTOP OR BUILD_KCONTROL OR BUILD_KSCREENSAVER )
check_library_exists( GL glXChooseVisual "" HAVE_GLXCHOOSEVISUAL )
diff --git a/config.h.cmake b/config.h.cmake
index 413f9e745..1c37917fb 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -18,6 +18,9 @@
// kxkb
#cmakedefine HAVE_XTEST 1
+// xscreensaver
+#cmakedefine HAVE_XSCREENSAVER 1
+
// libart
#cmakedefine HAVE_LIBART 1
diff --git a/kdesktop/CMakeLists.txt b/kdesktop/CMakeLists.txt
index dec9692b7..54d7004b8 100644
--- a/kdesktop/CMakeLists.txt
+++ b/kdesktop/CMakeLists.txt
@@ -94,6 +94,7 @@ tde_add_kdeinit_executable( ${target} AUTOMOC
kdesktopsettings-static bgnd-static dmctl-static
konq-shared kutils-shared
${XRENDER_LIBRARIES} ${XCURSOR_LIBRARIES} Xext dl
+ ${XSS_LIBRARIES}
)