FindKActivities.cmake missing from kdelibs KDE/4.7 ?

Andreas Pakulat apaku at gmx.de
Mon Oct 17 18:56:27 BST 2011


On 17.10.11 18:35:21, Alex Merry wrote:
> On 17/10/11 18:10, Friedrich W. H. Kossebau wrote:
> >Hi,
> >
> >kde-workspace trunk is supposed to be compiled against kdelibs KDE/4.7, right?
> >
> >For me it seems that FindKActivities.cmake is missing then in kdelibs KDE/4.7
> >or kde-workspace trunk. Because kde-workspace/CMakeLists.txt has the line
> >find_package(KActivities REQUIRED)
> >
> >But there is nowhere a FindKActivities.cmake for me:
> 
> FindKActivities is provided by libkactivities (the kactivities
> module on git.kde.org).  If you don't have it, there won't be such a
> file.

This is wrong as has been discussed numerous times on kde-buildsystem
and the cmake list. A project can provide a XXXConfig.cmake file to
follow the config-mode of find_package, but providing a FindXXX.cmake
module along when installing that package does not make much sense. In
particular this is problematic when a project wants an optional
dependency on such a package since cmake will do a hard exit when no
FindXXX.cmake is found.

> This, I believe, is how cmake is meant to work.  A package can
> provide its own Find*.cmake file, and find_package will fail if
> either the Find*.cmake file was not found or running the cmake
> script in said file reports that the package could not be found.

No its not how cmake works, trying a find_package(XXX) without having an
XXX is considered a hard error. But find_package can be used to detect
if a package is installed and provide a fallback if its not found.

So if the find-module was existent in kde-workspace or kdelibs it needs
to be brought back, removing it was definetly an error.

Andreas





More information about the kde-core-devel mailing list