Where to put KDE Frameworks cmake stuff...
Alexander Neundorf
neundorf at kde.org
Fri Apr 20 19:41:13 UTC 2012
Hi,
so here's my proposal:
* we will have a separate KF5 package, which will be a build-time requirement
for building KDE frameworks libraries. It will offer the following features
** KDE approved compiler settings
** KDE conforming install dirs
** finding consistent installations of the KDE frameworks libraries
** supporting a base and a shadowing KDE frameworks libraries installation
(e.g. kcore from the system + kwidgets from the user, shadowing the kwidgets
from the system)
* every KDE Frameworks library will depend at build-time on this KF5 package
* every KDE Frameworks library will install a KFooConfig.cmake file, which
will have neither dependencies to e-c-m nor to KF5
* any application is free to use the installed KFooConfig.cmake files directly
without introducing any additional dependencies: find_package(KFooConfig
NO_MODULE)
* there will be a FindKF5.cmake, which every application must use which wants
to get the full KDE features, like install dirs etc., All the KDE frameworks
libraries will be known to FindKF5.cmake as components:
find_package(KF5 MODULE COMPONENTS kcore kwidgets)
This will provide the set of install dirs, compiler flags, ensuring that
libraries are found which are compatible.
* by installing a KF5 to some prefix, this prefix is "marked" as an install
location of KDE frameworks. Every KDE frameworks library which is built
against this KF5, must use the same install prefix. By doing this, it will get
the same set of install locations as have been set when KF5 has been
installed. This should ensure that a consistent set of KDE frameworks
libraries is found later.
* KF5 will provide a file KF5BuildSpecs, which should be used by KDE
frameworks libraries. This provides: a common required cmake version (so we
can rely on features and behaviour), a common required e-c-m version, and
common version numbers. All these are only active if the using library does
include(KF5BuildSpecs) and then actually uses the provided variables.
This will also mean that the kde-modules/ subdir from e-c-m will go away, this
will be in the KF5 package. Then we have a clear separation of stuff again.
Comments ?
I have an almost complete example around, I'll post it in the next days here.
Alex
More information about the Kde-frameworks-devel
mailing list