Created: kdepimlibs_include_dirs

Christophe Giboudeaux cgiboudeaux at gmail.com
Mon Feb 23 21:29:44 CET 2009


On Monday 23 February 2009 19:55:48 Alexander Neundorf wrote:
> On Monday 23 February 2009, Christophe Giboudeaux wrote:
> > Hello,
> >
> > Yesterday we created the KDEPIMLIBS_INCLUDE_DIRS definition in
> > kdepimlibs.
> >
> > This one resolves compilation errors if:
> > - CamelCase headers are used and
> > - the kdepimlibs installation prefix is not the same as the kdelibs one.
>
> That's this patch, right ?
> http://websvn.kde.org/trunk/KDE/kdepimlibs/KdepimLibsConfig.cmake.in?r1=930
>029&r2=930092

Yes, note that originally, it was:
set(KDEPIMLIBS_INCLUDE_DIR "@KDEPIMLIBS_INCLUDE_DIR@")

It was illogical to use singular (_DIR vs. _DIRS) while we were including two 
directories.

>
> Can you please explain why this fixes the build if kdelibs and kdepimlibs
> are installed to different locations ?

Let's take a concrete example:
I have kdelibs installed in /usr and kdepimlibs installed in /opt/kde4-
kdepimlibs

The CamelCase headers are respectively in /usr/include/KDE and /opt/kde4-
kdepimlibs/includes/KDE

When compiling with this configuration, I don't have any problem with the 
kdelibs headers since KDE4_INCLUDES adds both  ${KDE4_INCLUDE_DIR} and 
${KDE4_INCLUDE_DIR}/KDE (FindKDE4Internal.cmake:1170) but 
KDEPIMLIBS_INCLUDE_DIR won't include ${KDEPIMLIBS_INCLUDE_DIR}/KDE.

only -I/opt/kde4-kdepimlibs/include is passed.

you may try with kdebase/workspace/plasma/dataengines/calendar.
Change KDEPIMLIBS_INCLUDE_DIRS to KDEPIMLIBS_INCLUDE_DIR and you should get:

calendarengine.cpp:25:30: error: KHolidays/Holidays: No such file or directory

>
> I didn't check the CamelCase headers yet. Where are they installed ?
> E.g. if I install kdepimlibs to /opt/kdepimlibs, they will be installed
> to /opt/kdepimlibs/include/KDE ?
> Why not installing them e.g. to /opt/kdepimlibs/include/KdepimLibs ?
>

For consistency mostly. For whoever installs kdelibs and kdepimlibs in the 
same prefix, all the CamelCase headers will be in ${KDE4_INCLUDE_DIR}/KDE and 
this issue won't even be noticed.

> It can not be removed, since it has been released with KDE 4.2 and so it
> must exist for all of KDE 4.x, removing it would be a source incompatible
> change.
>

Fine, I won't have to check every app in svn :-)

Christophe.



More information about the Kde-buildsystem mailing list