On Sat, Mar 30, 2013 at 7:22 PM, MC Return <email address hidden> wrote:
> I understand that we do not want to add a new dependency and you mentioned:
>
> "We could make the dependency conditional.
>
> I know that the dependency on libxss-dev is only there for the
> screensaver timeout logic. That can be conditionally compiled, so
> users of the ubuntu package won't get the timeout-to-screensaver
> functionality."
>
> I would like to help implementing that.
> We could maybe use some internal Compiz timer to add that functionality
> to the Compiz toolbox and not to have to depend on libxss-dev at all.
As mentioned, you can do something like that with cmake in the
toplevel CMakeLists.txt and a config.h.in
config.h.in:
#cmakedefine USE_XSS
CMakeLists.txt
pkg_check_modules (LIBXSS xscrnsaver)
if (LIBXSS_FOUND)
set (SCREENSAVER_ADDITIONAL_LIBRARIES ${LIBXSS_LIBRARIES})
set (SCREENSAVER_ADDITIONAL_INCLUDES ${LIBXSS_INCLUDE_DIRS})
set (USE_XSS ON)
endif (LIBXSS_FOUND)
On Sat, Mar 30, 2013 at 7:22 PM, MC Return <email address hidden> wrote: to-screensaver
> I understand that we do not want to add a new dependency and you mentioned:
>
> "We could make the dependency conditional.
>
> I know that the dependency on libxss-dev is only there for the
> screensaver timeout logic. That can be conditionally compiled, so
> users of the ubuntu package won't get the timeout-
> functionality."
>
> I would like to help implementing that.
> We could maybe use some internal Compiz timer to add that functionality
> to the Compiz toolbox and not to have to depend on libxss-dev at all.
As mentioned, you can do something like that with cmake in the
toplevel CMakeLists.txt and a config.h.in
config.h.in:
#cmakedefine USE_XSS
CMakeLists.txt
pkg_check_modules (LIBXSS xscrnsaver)
if (LIBXSS_FOUND) ADDITIONAL_ LIBRARIES ${LIBXSS_ LIBRARIES} ) ADDITIONAL_ INCLUDES ${LIBXSS_ INCLUDE_ DIRS})
set (SCREENSAVER_
set (SCREENSAVER_
set (USE_XSS ON)
endif (LIBXSS_FOUND)
configure_file (${CMAKE_ CURRENT_ SOURCE_ DIR}/config. h.in
${CMAKE_ CURRENT_ BINARY_ DIR}/config. h.in)
include_directories (${CMAKE_ CURRENT_ BINARY_ DIR}
${SCREENSAVER_ ADDITIONAL_ INCLUDES} )
compiz_plugin (screensaver PLUGINDEPS composite opengl LIBRARIES LIBRARIES} )
${LIBXSS_
Then in the code, you can just conditionally compile the bits that
depend on libxss.
#ifdef USE_XSS
....
#else
....
#endif
> /code.launchpad .net/~mc- return/ compiz/ compiz0. 9.9.merge- plugin- screensaver/ +merge/ 141533
> I am sure you have an idea on how to best achieve that, Sam ;)
> --
> https:/
> You are reviewing the proposed merge of lp:~mc-return/compiz/compiz0.9.9.merge-plugin-screensaver into lp:compiz.
--
Sam Spilsbury