Small problem with PolkitQt

Alexander Neundorf neundorf at kde.org
Wed Dec 30 21:38:12 CET 2009


On Monday 14 December 2009, Dario Freddi wrote:
> Hello Alex and guys,
>
> as you might remember, we're not installing FindPolkitQt.cmake anymore.
> Unfortunately, I found out that this creates a small problem, in
> KDE4Macros, here:
>
> if (NOT POLKITQT_FOUND)
>         macro_optional_find_package(PolkitQt)
>     endif (NOT POLKITQT_FOUND)
>
>     if (POLKITQT_FOUND)
>       install(FILES ${_output} DESTINATION
> ${POLKITQT_POLICY_FILES_INSTALL_DIR})
>     endif (POLKITQT_FOUND)
>
> You might agree it's fairly ridicolous to have the cmake file and the
> eventual development package of polkit-qt installed just to find out about
> a path. The idea would be of "storing" in a configuration file the value of
> POLKITQT_POLICY_FILES_INSTALL_DIR, in a variable named
> KDE4_AUTH_POLICY_FILES_INSTALL_DIR when kdelibs get built. Is there a
> place/way to do that?

In general determining install locations are the responsibility of the project 
which is being built. I mean, if I chose to install something to $HOME/inst 
it shouldn't matter where PolkitQt is installed.

What we do for the other install dirs like BIN_INSTALL_DIR etc. in kdelibs is 
the following:
if the variable (e.g. KDE4_AUTH_POLICY_FILES_INSTALL_DIR) has not been 
explicitely set, and if the current CMAKE_INSTALL_PREFIX is the same as the 
kdelibs install prefix, then we reuse the variable (e.g. 
KDE4_AUTH_POLICY_FILES_INSTALL_DIR) from kdelibs.

Look for the macro _SET_FANCY() in 
kdelibs/cmake/modules/FindKDE4Internal.cmake.

Does this do what you want ?

Alex


More information about the Kde-buildsystem mailing list