@ -8,29 +8,7 @@
if ( NOT XSCREENSAVER_FOUND )
set ( xscreensaver_alldirs )
set ( xscreensaver_checkdirs ${ TDE_INCLUDE_DIR }
/ u s r /
/ u s r / l o c a l /
/ o p t / l o c a l /
/ u s r / X 1 1 R 6 /
/ o p t / k d e /
/ o p t / k d e 3 /
/ u s r / k d e /
/ u s r / l o c a l / k d e /
/ u s r / l o c a l / x s c r e e n s a v e r /
/ u s r / o p e n w i n / l i b / x s c r e e n s a v e r /
/ e t c / )
foreach ( suffix lib ${ LIB_SUFFIX } /xscreensaver lib ${ LIB_SUFFIX } /misc/xscreensaver lib/xscreensaver lib64/xscreensaver libexec/xscreensaver
b i n / x s c r e e n s a v e r - h a c k s h a c k s )
foreach ( xscreensaver_path ${ xscreensaver_checkdirs } )
set ( xscreensaver_alldirs ${ xscreensaver_alldirs } ${ xscreensaver_path } / ${ suffix } )
endforeach ( xscreensaver_path ${ xscreensaver_checkdirs } )
endforeach ( suffix lib ${ LIB_SUFFIX } /xscreensaver lib/xscreensaver lib64/xscreensaver libexec/xscreensaver bin/xscreensaver-hacks hacks )
FIND_PATH ( XSCREENSAVER_DIR deco ${ xscreensaver_alldirs } )
set ( XSCREENSAVER_CONFIG_DIR )
FIND_PATH ( XSCREENSAVER_CONFIG_DECO config/deco.xml
$ { T D E _ I N C L U D E _ D I R }
set ( xscreensaver_checkdirs
/ u s r /
/ u s r / l o c a l /
/ o p t / l o c a l /
@ -45,33 +23,58 @@ bin/xscreensaver-hacks hacks)
/ u s r / o p e n w i n / l i b / x s c r e e n s a v e r /
/ e t c /
)
# MESSAGE ( STATUS "XSCREENSAVER_CONFIG_DIR :<${XSCREENSAVER_CONFIG_DIR}>" )
foreach ( suffix lib ${ LIB_SUFFIX } /xscreensaver lib ${ LIB_SUFFIX } /misc/xscreensaver
l i b / x s c r e e n s a v e r l i b 6 4 / x s c r e e n s a v e r l i b e x e c / x s c r e e n s a v e r
b i n / x s c r e e n s a v e r - h a c k s h a c k s )
foreach ( xscreensaver_path ${ xscreensaver_checkdirs } )
set ( xscreensaver_alldirs ${ xscreensaver_alldirs } ${ xscreensaver_path } / ${ suffix } )
endforeach ( xscreensaver_path ${ xscreensaver_checkdirs } )
endforeach ( )
set ( XSCREENSAVER_DIRS )
FIND_PATH ( XSCREENSAVER_DIR_DECO deco ${ xscreensaver_alldirs } )
FIND_PATH ( XSCREENSAVER_DIR_FLUX flux ${ xscreensaver_alldirs } )
if ( XSCREENSAVER_DIR_DECO )
list ( APPEND XSCREENSAVER_DIRS ${ XSCREENSAVER_DIR_DECO } )
endif ( XSCREENSAVER_DIR_DECO )
if ( XSCREENSAVER_DIR_FLUX )
list ( APPEND XSCREENSAVER_DIRS ${ XSCREENSAVER_DIR_FLUX } )
endif ( XSCREENSAVER_DIR_FLUX )
list ( REMOVE_DUPLICATES XSCREENSAVER_DIRS )
string ( REPLACE ";" ":" XSCREENSAVER_DIRS "${XSCREENSAVER_DIRS}" )
set ( XSCREENSAVER_CONFIG_DIRS )
FIND_PATH ( XSCREENSAVER_CONFIG_DECO config/deco.xml ${ xscreensaver_checkdirs } )
FIND_PATH ( XSCREENSAVER_CONFIG_FLUX config/flux.xml ${ xscreensaver_checkdirs } )
if ( XSCREENSAVER_CONFIG_DECO )
set ( XSCREENSAVER_CONFIG_DIR "${XSCREENSAVER_CONFIG_DECO}/config/" )
# MESSAGE ( STATUS "XSCREENSAVER_CONFIG_DIR <${XSCREENSAVER_CONFIG_DIR}>" )
list ( APPEND XSCREENSAVER_CONFIG_DIRS "${XSCREENSAVER_CONFIG_DECO}/config/" )
endif ( XSCREENSAVER_CONFIG_DECO )
if ( XSCREENSAVER_CONFIG_FLUX )
list ( APPEND XSCREENSAVER_CONFIG_DIRS "${XSCREENSAVER_CONFIG_FLUX}/config/" )
endif ( XSCREENSAVER_CONFIG_FLUX )
# T r y a n d l o c a t e X S c r e e n S a v e r c o n f i g w h e n p a t h d o e s n ' t i n c l u d e c o n f i g
if ( NOT XSCREENSAVER_CONFIG_DIR )
FIND_PATH ( XSCREENSAVER_CONFIG_DIR deco.xml
if ( NOT XSCREENSAVER_CONFIG_DIR S )
FIND_PATH ( XSCREENSAVER_CONFIG_DIR S deco.xml
/ e t c / x s c r e e n s a v e r
)
endif ( NOT XSCREENSAVER_CONFIG_DIR )
endif ( NOT XSCREENSAVER_CONFIG_DIRS )
list ( REMOVE_DUPLICATES XSCREENSAVER_CONFIG_DIRS )
string ( REPLACE ";" ":" XSCREENSAVER_CONFIG_DIRS "${XSCREENSAVER_CONFIG_DIRS}" )
endif ( NOT XSCREENSAVER_FOUND )
# MESSAGE ( STATUS "XSCREENSAVER_CONFIG_DIR :<${XSCREENSAVER_CONFIG_DIR}>" )
# MESSAGE ( STATUS "XSCREENSAVER_DIR :<${XSCREENSAVER_DIR}>" )
# N e e d t o f i x h a c k
if ( XSCREENSAVER_DIR AND XSCREENSAVER_CONFIG_DIR )
if ( XSCREENSAVER_DIR S AND XSCREENSAVER_CONFIG_DIR S )
set ( XSCREENSAVER_FOUND TRUE )
endif ( XSCREENSAVER_DIR AND XSCREENSAVER_CONFIG_DIR )
endif ( XSCREENSAVER_DIR S AND XSCREENSAVER_CONFIG_DIR S )
if ( XSCREENSAVER_FOUND )
if ( NOT Xscreensaver_FIND_QUIETLY )
message ( STATUS "Found SCREENSAVER_CONFIG_DIR <${XSCREENSAVER_CONFIG_DIR}>")
message ( STATUS "Found SCREENSAVER_CONFIG_DIR S <${XSCREENSAVER_CONFIG_DIRS }>")
endif ( NOT Xscreensaver_FIND_QUIETLY )
else ( XSCREENSAVER_FOUND )
if ( Xscreensaver_FIND_REQUIRED )
@ -79,5 +82,4 @@ else (XSCREENSAVER_FOUND)
endif ( Xscreensaver_FIND_REQUIRED )
endif ( XSCREENSAVER_FOUND )
MARK_AS_ADVANCED ( XSCREENSAVER_DIR XSCREENSAVER_CONFIG_DIR )
MARK_AS_ADVANCED ( XSCREENSAVER_DIRS XSCREENSAVER_CONFIG_DIRS )