New "official" way how to use an installed kdelibs from the frameworks branch

Alexander Neundorf neundorf at kde.org
Thu Feb 7 23:14:30 UTC 2013


Hi,

after looking at the current plasma-framework buildsystem I worked a bit on 
the kdelibs and plasma buildsystem, and there is now a somewhat sane way to 
use an installed kdelibs from the frameworks branch.

So, compared to kdelibs before, now FindKDE4Internal.cmake is no longer 
installed.
Instead kdelibs now installs a KDELibs4Config.cmake, which (still) contains 
most of what was in FindKDE4Internal.cmake.
KDELibs4Config.cmake is installed into lib/cmake/KDELibs4/, i.e. in a 
directory where cmake searches for Config.cmake files in NO_MODULE mode.

KDELibs4Config.cmake does not contain cmake- or compiler settings anymore. 
This must now come from extra-cmake-modules by finding KF5:

find_package(KF5 MODULE REQUIRED CMake Compiler InstallDirs)

This "finds" KF5 and the meta-components
* CMake : cmake settings, e.g. RPATH handling
* Compiler : the compiler switches we had in FindKDE4Internal.cmake
* InstallDirs : the install dir variables as they were in 
FindKDE4Internal.cmake

When searching KDELibs4, the tier1 libraries and ki18n the order matters.

The tier1 libs don't depend on anything, so they must be searched first.
ki18n must also be searched before KDELibs4, because libraries in KDELibs4 
depend on it, and it fails otherwise.

What I committed/pushed is not perfect, but at least somewhat sane, and it 
kind of works.

Let me know if it doesn't for you.

Alex


More information about the Kde-frameworks-devel mailing list