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

Alexander Neundorf neundorf at kde.org
Fri Feb 8 21:36:22 UTC 2013


On Friday 08 February 2013, Alexander Neundorf wrote:
> On Friday 08 February 2013, Alexander Neundorf wrote:
> > 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.
> 
> Attached is a minimal example of how to use it.

kconfig now also builds and installs as a separate library, and can be found 
via KF5:
find_package(KF5 MODULE .... kconfig)

or separately:

find_package(kconfig NO_MODULE)

Is it only me who would prefer CamelCase to alllowercase names ?
find_package(KConfig NO_MODULE)

Alex

P.S. current plasma-frameworks needs current kdelibs


More information about the Kde-frameworks-devel mailing list