include dirs (Re: where to install the cmake files to ?)

Alexander Neundorf neundorf at kde.org
Sun Feb 19 17:45:36 CET 2006


On Sunday 19 February 2006 11:03, you wrote:
...
> OK, imagine you add a method in kapplication.h, and you use that method
> from kglobal.cpp (doesn't matter, just another file from the same
> directory). If your compiler command line says   -I${KDE4_INCLUDE_DIR}
> -I${CURRENT_SOURCE_DIR} then kglobal.cpp will find the *installed*
> kapplication.h instead of the local one, and it will not compile, since the
> new method doesn't exist isn't yet in the installed kapplication.h.

When compiling kdelibs/ with cmake/, /opt/kde/include isn't part of the 
include path, so it will only find the headers which are inside kdelibs/. Do 
I miss the problem ?

> OK for this example "" vs <> might make a difference, but that's fragile
> and you can always find a case where it breaks, e.g. with subdirs, and
> header files which would rather use <>, etc. :)
>
> > > Also, why is it kdelibs/kdecore/CMakeLists.txt which sets kde_datadir
> > > and kde_icondir etc.? Won't other modules need this as well?
> >
> > The lower-case variables are just for the configure_file() call which
> > creates kde-config.cpp.
>
> Hmm. Confusing. Can you add a comment there? (or, why can't it use the
> uppercase vars there?)

Because in kde-config.cpp.in the variables which will be replaced look like 
"@datadir@", and cmake replaces only variables it knows, that's why they have 
to be "translated". Otherwise kde-config.cpp.in would have to be changed.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list