summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraneejit1 <[email protected]>2020-06-23 04:54:21 +0000
committerMichele Calgaro <[email protected]>2020-06-23 21:40:33 +0900
commit01e173af15b8f33ff1d893f65319f171ec23beb3 (patch)
tree8c181d9a777ff955450f743925ac6a943bfd87d2
parente3f08f5470ced9e6c0fa639e0b3718cdfd23295e (diff)
downloadtdepim-01e173af15b8f33ff1d893f65319f171ec23beb3.tar.gz
tdepim-01e173af15b8f33ff1d893f65319f171ec23beb3.zip
Improvement the detection of libXss
The test for Xss has been altered to ask where the library is first before checking for the required API function. Signed-off-by: aneejit1 <[email protected]> (cherry picked from commit fd0d25af4d7b00d8979656ed665f7f720f756384)
-rw-r--r--ConfigureChecks.cmake18
1 files changed, 13 insertions, 5 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 1496b0d59..cfb6a8d7f 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -212,15 +212,23 @@ endif( )
if( BUILD_KARM AND 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 )
+ 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_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_LIBXSS 1 )