cmake problems in KDELibs4Config

Alexander Neundorf neundorf at kde.org
Wed Jul 24 20:27:46 UTC 2013


On Wednesday 24 July 2013, Alexander Neundorf wrote:
> On Wednesday 24 July 2013, Sebastian Kügler wrote:
> > Hi,
> > 
> > I'm getting the following two errors when trying to build
> > plasma-framework:
> > 
> > macro_ensure_version doesn't exist anymore, but is used in
> > KDELibs4Config.cmake. Is there a replacement for it?
> 
> Hopefully all such changes are documented here:
> 
> http://techbase.kde.org/Development/ECM_SourceIncompatChanges#MacroEnsureVe
> rsion.cmake
> 
> > Then:
> > 
> > CMake Error at CMakeLists.txt:70 (find_package):
> >   Found package configuration file:
> >     /home/sebas/kf5/install/lib/x86_64-linux-
> > 
> > gnu/cmake/KDELibs4/KDELibs4Config.cmake
> > 
> >   but it set KDELibs4_FOUND to FALSE so package "KDELibs4" is considered
> >   to be NOT FOUND.  Reason given by package:
> >   
> >   The following imported targets are referenced, but are missing:
> >   KF5::KDE4Attic
> 
> KDELibs4Config.cmake includes KDELibs4LibraryTargets.cmake.
> This file contains exported targets for all not yet separated libraries of
> kdelibs, e.g. KDE4Support.
> kde4support links against kde4attic.
> When exporting the targets, cmake puts the dependency information into the
> file containing the exported targets (KDELibs4LibraryTargets.cmake). So
> kde4support depends on kde4attic.
> To make sure everything works once this export-file has been imported again
> by a using project (plasma), cmake puts in a check that all targets exist,
> which are dependencies of targets exported into this file, i.e. it checks
> whether the target "KF5::KDE4Attic" exists, since it is needed by the
> target for the kde4support library.
> Here it fails then.
> 
> You can have a look into these files, they are more or less fully
> commented.
> 
> What to do...
> 
> So, kde4support depends on a lot of stuff in kdelibs.
> Some libs in kdelibs still depend on kde4support (at least last week this
> still was the case). That's why kde4support is still not installed
> separately.
> 
> So the KDE4Attic targets needs to exist before KDELibs4 is searched.
> 
> > Adding KDE4Attic to the KF5 modules doesn't help, what to do?
> 
> What exactly did you do ?
> 
> If you add KDE4Attic to the list of known frameworks in
> extra-cmake-modules, and add it to the find_package(KF5 .... ) call as a
> needed component, it should work.


No, won't work.
kde4support depends on kde4attic, kde4attic depends e.g. on kdeui and kdecore.
So there are cyclic dependencies.
The kde4attic targets must not yet be exported into a separate file, but must 
still stay in the KDE4LibraryTargets.cmake file.

The attached dot file shows the dependencies of the KDE4Attic library.
You can generate such files by running cmake on a configured build dir:
$ cmake --graphviz=kdelibs.dot  .

Alex
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kdelibs.dot.KDE4Attic
Type: text/vnd.graphviz
Size: 12441 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130724/f6fb9d2d/attachment.bin>


More information about the Kde-frameworks-devel mailing list