KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Sun Nov 22 14:53:21 CET 2009


On Friday 20 November 2009, Dario Freddi wrote:
> SVN commit 1051967 by dafre:
>
> CCMAIL: kde-buildsystem at kde.org
>
> Adding FindPolkitQt-1.cmake for the upcoming polkit-1 support in KAuth, as
> discussed on kde-buildsystem some time ago. Alex, can you please take care
> of making this module not getting installed?
>
>
>
>  A             FindPolkitQt-1.cmake


Hi Dario,

there is an issue with FindPolkitQt-1.cmake.
According to the rules for cmake modules, the variables set by this file 
should start with the prefix "POLKITQT-1_", but you chose to 
use "POLKITQT_1_", which is still acceptable as long as it is properly 
documented.

Now the thing is, the _FOUND variable, which is set automatically by 
FindPackageHandleStandardArgs.cmake just does a string(TOUPPER) internally, 
so this one is POLKITQT-1_FOUND, not POLKITQT_1_FOUND, as you wrote in the 
documentation.
So at least for this one variable the documentation is wrong. 
If you fix this, then there will be POLKITQT-1_FOUND together with 
POLKITQT_1_INCLUDE_DIR etc.
I would suggest that first you fix the documentation for the _FOUND variable 
and then decide for a consisten prefix (I recommend "POLKITQT-1_"). And then 
go to all places where these variables are used and fix them too.

Or you rename the file to FindPolkitQt1.cmake.

Did you actually check whether this file works before committing ?
(I mean, it didn't).

Alex


More information about the Kde-buildsystem mailing list