summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake91
1 files changed, 65 insertions, 26 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 9dfb6d137..6e35ca7db 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -83,6 +83,26 @@ if( WITH_XRENDER OR BUILD_KDESKTOP OR BUILD_KONSOLE OR BUILD_KCONTROL OR BUILD_K
endif( )
+# xrandr (kcontrol, twin/compot-tde)
+if( WITH_XRANDR )
+ pkg_search_module( XRANDR xrandr )
+ if( NOT XRANDR_FOUND )
+ tde_message_fatal( "xrandr are requested, but not found on your system" )
+ endif( )
+endif( )
+
+
+# xinerama (ksplashml, twin/compot-tde)
+if( WITH_XINERAMA )
+ pkg_search_module( XINERAMA xinerama )
+ if( XINERAMA_FOUND )
+ set( HAVE_XINERAMA 1 )
+ else( )
+ tde_message_fatal( "xinerama is requested, but not found on your system" )
+ endif( )
+endif( WITH_XINERAMA )
+
+
# xcursor (tdeioslave, kcontrol)
if( WITH_XCURSOR )
pkg_search_module( XCURSOR xcursor )
@@ -102,6 +122,27 @@ if( WITH_XCOMPOSITE )
else( XCOMPOSITE_FOUND )
tde_message_fatal( "xcomposite is requested, but was not found on your system" )
endif( XCOMPOSITE_FOUND )
+
+
+ # xdamage (twin/kompmgr)
+ pkg_search_module( XDAMAGE xdamage )
+ if( NOT XDAMAGE_FOUND )
+ tde_message_fatal( "xdamage is required for xcomposite support, but was not found on your system" )
+ endif( )
+
+ # xext (twin/kompmgr)
+ pkg_search_module( XEXT xext )
+ if( NOT XEXT_FOUND )
+ tde_message_fatal( "xext is required for xcomposite support, but was not found on your system" )
+ endif( )
+
+ # for (twin/compton)
+ # older libXext (e.g.in debian-6.0) doesn't provide XSyncFence
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${XEXT_INCLUDE_DIRS}" )
+ tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${XEXT_LIBRARIES}" )
+ check_symbol_exists( "XSyncCreateFence" "X11/Xlib.h;X11/extensions/sync.h" HAVE_XEXT_XSYNCFENCE )
+ tde_restore( CMAKE_REQUIRED_LIBRARIES )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
endif( )
@@ -116,32 +157,13 @@ if( WITH_XFIXES )
endif( )
-# xdamage (twin/kompmgr)
-if( WITH_XDAMAGE )
- pkg_search_module( XDAMAGE xdamage )
- if( NOT XDAMAGE_FOUND )
- tde_message_fatal( "xdamage is requested, but was not found on your system" )
- endif( )
-endif( )
-
-
-# xext (twin/kompmgr)
-if( WITH_XEXT )
- pkg_search_module( XEXT xext )
- if( XEXT_FOUND )
- set( HAVE_XEXT 1 )
- else( XEXT_FOUND )
- tde_message_fatal( "xext is requested, but was not found on your system" )
- endif( )
-endif( )
-
-
# libconfig (twin/compton-tde)
if( WITH_LIBCONFIG )
pkg_search_module( LIBCONFIG libconfig )
if( LIBCONFIG_FOUND )
set( HAVE_LIBCONFIG 1 )
- if( LIBCONFIG_VERSION VERSION_LESS 1.5.0 )
+ # TODO replace with functionality check
+ if( LIBCONFIG_VERSION VERSION_LESS 1.4.0 )
set( HAVE_LIBCONFIG_OLD_API 1 )
endif( )
else( LIBCONFIG_FOUND )
@@ -150,6 +172,15 @@ if( WITH_LIBCONFIG )
endif( )
+# pcre (twin/compton-tde)
+if( WITH_PCRE )
+ pkg_search_module( LIBPCRE libpcre )
+ if( NOT LIBPCRE_FOUND )
+ tde_message_fatal( "pcre support is requested, but not found on your system" )
+ endif( NOT LIBPCRE_FOUND )
+endif( )
+
+
# xtest (kxkb)
if( WITH_XTEST )
pkg_search_module( XTEST xtst )
@@ -172,20 +203,28 @@ if( WITH_XSCREENSAVER )
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( )
+
+ # We don't really need the xscreensaver package for building, we only need to know
+ # where xscreensaver stores its executables. So give the user the possibility
+ # to define XSCREENSAVER_DIR and speficy the location manually.
include( FindXscreensaver.cmake ) # not really good practise
- if( NOT XSCREENSAVER_FOUND )
- message( FATAL_ERROR "\nxscreensaver is requested, but was not found on your system" )
+ if( NOT XSCREENSAVER_DIR )
+ tde_message_fatal(
+ "xscreensaver is requested, but cmake can not determine the location of XSCREENSAVER_DIR
+ You have to either specify it manually with e.g. -DXSCREENSAVER_DIR=/usr/lib/misc/xscreensaver/
+ or make sure that xscreensaver installed properly" )
endif( )
endif( )
-# openGL (kdesktop or kcontrol or tdescreensaver )
+# openGL (kdesktop or kcontrol or tdescreensaver or twin/compot-tde )
if( WITH_OPENGL )
pkg_search_module( GL gl )
if( GL_FOUND )
@@ -286,8 +325,8 @@ find_package( TDE )
-# dbus (tdm, kdesktop)
-if( BUILD_TDM OR BUILD_KDESKTOP )
+# dbus (tdm, kdesktop, twin/compton-tde.c)
+if( BUILD_TDM OR BUILD_KDESKTOP OR (BUILD_TWIN AND WITH_XCOMPOSITE) )
pkg_search_module( DBUS dbus-1 )
if( NOT DBUS_FOUND )