FindKdepimLibs.cmake: please do not hardcode paths

Alexander Neundorf neundorf at kde.org
Wed Dec 3 19:37:25 CET 2008


On Wednesday 03 December 2008, Modestas Vainius wrote:
> Hello,
>
> please do not hardcode paths in FindKdepimLibs.cmake. Some distributions
> use /usr/share/kde4/ as DATA_INSTALL_DIR. So at least please use that one
> as a reference. However, I also do not understand why additional path
> hackery is needed (how many people are going to install pimlibs to other
> prefix than kdelibs?) so I attach a patch which removes it. 
> Tested and works.
... for you.

Ok, I see the problem.
But it doesn't really work.
Suppose you have
/opt/kdelibs
/opt/kdepimlibs
/opt/kde4-everything-else

Now you do

find_package(KDE4 REQUIRED)
find_package(KdepimLibs REQUIRED)

This should work without having to adjust CMAKE_MODULE_PATH. I mean, you don't 
know where kdepimlibs has installed its file to before you have found it.

You would have to do:
find_package(KDE4 REQUIRED)
set(CMAKE_MODULE_PATH 
    /usr/share/kde4/apps/cmake/modules ${CMAKE_MODULE_PATH} )
find_package(KdepimLibs REQUIRED)

But that's not possible since you are doing find_package(KdepimLibs) just 
because you don't know where it is.

So we need to find a better solution than your patch.

I guess we should rename the ...Information.cmake-file to ...Config.cmake file 
and install it to lib/, which is more correct anyway, and then use 
find_package(NO_MODULE)
Will do that next monday.

Alex


More information about the Kde-buildsystem mailing list