[Kde-pim] KdePimlibs overriding CMAKE_MODULE_PATH

Alex Merry kde at randomguy3.me.uk
Sun Jun 7 12:23:20 CEST 2009


On Sunday 07 June 2009 10:13:15 Christophe Giboudeaux wrote:
> On Sunday 07 June 2009 01:39:21 Alex Merry wrote:
> > In KdepimLibsConfig.cmake.in, which is used to generate a file included
> > when you do find_package(KdepibLibs), the KdepimLibs cmake module
> > directory (typically the same as the KDE cmake module directory) is added
> > to the front of CMAKE_MODULE_PATH.
> >
> > If an application/module/whatever sets its CMAKE_MODULE_PATH to something
> > local before calling find_package(KdepibLibs), as kdenetwork does for
> > example, the local cmake module directory is overridden by the installed
> > KDE one.

> > My question: is the correct solution to change KdepimLibsConfig.cmake.in
> > to append (rather than prepend) its directory to CMAKE_MODULE_PATH?  Is
> > this likely to cause any other problems?  And should this be documented
> > somewhere?
>
> The correct solution is deleting FindLibKNotificationItem-1.cmake from your
> installation dir.

OK, I thought I'd checked that, but I misread the cmake file.  Nonetheless, I 
don't think requiring KdepimLibs should prepend the KDE installation directory 
to CMAKE_MODULE_PATH - what if the application wishes to override a KDE-
installed CMake module with one of its own?  It would have to set 
CMAKE_MODULE_PATH _after_ including KdepimLibs.  And, if it can't assume that 
CMAKE_MODULE_PATH won't be messed with like this when it tries to find 
packages, it would have to prepend its own local cmake module path after 
searching for _each_ package.

Alex


-- 
Why have I got six monitors?  Because I haven't got room for eight.
  -- Terry Pratchett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20090607/a0a5c9f3/attachment.sig 


More information about the Kde-buildsystem mailing list