The CMake situation in frameworks
Alexander Neundorf
neundorf at kde.org
Mon Nov 28 19:55:39 UTC 2011
On Friday 25 November 2011, Christophe Giboudeaux wrote:
> Hi,
>
> On Friday 25 November 2011 02:24:55 Stephen Kelly wrote:
> > == Communicating build parameters between modules ==
> >
> > Some people don't want to set custom parameters for certain install
> > directories and have those locations picked up by other depending
> > modules. Eg, if a custom value is set for LIB_INSTALL_DIR in kdelibs and
> > KDEPIM is built against that version of kdelibs, KDEPIM should use the
> > same value for LIB_INSTALL_DIR. This is provided by the _set_fancy macro
> > currently. There may be better ways to do this, such as specifying the
> > values in the config files for frameworks, or installing a
> > CMakeCache.txt. Needs more investigation.
>
> I would object if that removes the ability to install a given module in a
> different prefix than kdelibs (and have the other paths not being set
> accordingly, installing files out of the install prefix should be clearly
> forbidden to avoid the kauth nightmare).
>
> As long as building the module Foo using a distro kdelibs remains possible,
> no objection.
Of course this remains possible.
The feature which is both important and a bit tricky to achieve with
modularization is that if you set CMAKE_INSTALL_PREFIX to be the same as the
install location of kdelibs, then also all other install dir variables are
picked up from the kdelibs installation.
E.g. LIB_INSTALL_DIR would be set to what KDE4_LIB_INSTALL_DIR is (iff you
install to the same prefix as kdelibs).
> However, I think the variables names for kdelibs must be different than the
> ones in the modules depending on it. We have a few cases where we need
> something specific from kdelibs:
>
> in kdepim/akregator/src/CMakeLists.txt:
> qt4_add_dbus_interfaces(akregatorpart_PART_SRCS
> ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
Yes, KDE4_something provides information about something from kdelibs4, so the
usage above is exactly correct.
> Following your idea, we would then have:
> qt4_add_dbus_interfaces(akregatorpart_PART_SRCS
> ${DBUS_INTERFACES_DIR}/org.kde.KSpeech.xml)
No, DBUS_INTERFACES_DIR, which should probably be DBUS_INTERFACES_INSTALL_DIR,
is the location where the current project will install its DBUS interface
files to.
Which can be completely different from where kdelibs installed its DBUS
interface files to.
Does that make it more clear ?
Alex
More information about the Kde-frameworks-devel
mailing list