summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake25
1 files changed, 18 insertions, 7 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index d73aa59e4..84657ac1d 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -265,11 +265,18 @@ 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_XEXT_XSS )
+ pkg_search_module( XSS xscrnsaver )
+
+ if( XSS_FOUND )
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${XSS_INCLUDE_DIRS}" )
+ check_library_exists( Xss XScreenSaverQueryInfo "${XSS_LIBRARY_DIRS}" HAVE_XSSLIB )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ else( XSS_FOUND )
+ check_library_exists( Xss XScreenSaverQueryInfo "" HAVE_XSSLIB )
+ endif( XSS_FOUND )
+
+ if( NOT HAVE_XSSLIB )
+ check_library_exists( Xext XScreenSaverQueryInfo "${XEXT_LIBRARY_DIRS}" HAVE_XEXT_XSS )
if( HAVE_XEXT_XSS )
set( HAVE_XSSLIB 1 )
pkg_search_module( XSS xext )
@@ -293,6 +300,7 @@ if( WITH_XSCREENSAVER )
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( )
@@ -301,10 +309,13 @@ if( WITH_OPENGL )
pkg_search_module( GL gl )
if( GL_FOUND )
# some extra check, stricktly speaking they are not necessary
- tde_save( CMAKE_REQUIRED_LIBRARIES )
- set( CMAKE_REQUIRED_LIBRARIES ${GL_LIBRARIES} )
+ tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ${GL_LIBRARIES} )
+ tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${GL_INCLUDE_DIRS}" )
+ tde_save_and_set( CMAKE_REQUIRED_FLAGS "${GL_LDFLAGS}" )
check_symbol_exists( glXChooseVisual "GL/glx.h" HAVE_GLXCHOOSEVISUAL )
tde_restore( CMAKE_REQUIRED_LIBRARIES )
+ tde_restore( CMAKE_REQUIRED_INCLUDES )
+ tde_restore( CMAKE_REQUIRED_FLAGS )
if( NOT HAVE_GLXCHOOSEVISUAL )
tde_message_fatal( "opengl is requested and found, but it doesn't provides glXChooseVisual() or GL/glx.h" )
endif( )