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