KDE/kdelibs/cmake/modules
Alexander Neundorf
neundorf at kde.org
Thu Sep 3 18:40:41 CEST 2009
On Wednesday 02 September 2009, Kevin Ottens wrote:
> On Tuesday 1 September 2009 21:29:31 Alexander Neundorf wrote:
> > On Wednesday 26 August 2009, Kevin Ottens wrote:
> > > SVN commit 1015825 by ervin:
> > >
> > > OK, my previous claim for r1015454 was wrong. The new behavior breaks
> > > old file in many more cases.
> >
> > Why do we need this option ? Are there otherwise name collisions ?
>
> In this particular case no collision. It's just to achieve some consistency
> in the includes between the build time and once installed. Once installed
> the generated file end up in a core subdir. So third party can do:
> #include <.../core/settings.h>
> I just find it confusing that from within the project I have to make my
> includes differently:
> #include ".../settings.h"
Actually I don't really like that change, since it makes the macro more
complicated and nothing was broken before...
> Then my consistency OCD triggers and I end up patching our CMake macros to
> ease my pain. :-)
But OTOH maybe it's a good thing to do since it's still on my TODO to make it
easier to build kdelibs in a modular way, e.g. khtml, plasma, etc. separately
from kdelibs. In this case it should help if the behaviour in-project and
out-of-project are as similar as possible.
> > Can you please check whether you can use if(IS_ABSOLUTE) and
> > file(RELATIVE_PATH) to make the logic easier to understand ?
>
> Hm, right now I don't have the module where I was testing the behavior of
> this script, so I'm a bit uneasy about modifying it. Could I get more
> details on the change you'd foresee? or point me in the right direction for
> the macros you propose me to use?
Without looking at the cmake file right now:
There is some concatenating of strings to figure out certain things.
Somewhere there was comment something like
".. if this and that is the case, then it was an absolute path"
Sounds like it could be replaced with an
if(IS_ABSOLUTE ...)
which might make it easier to understand.
Also you try to figure out the relative path to a file somewhere, maybe
file(RELATIVE_PATH ) can be used there ?
Alex
More information about the Kde-buildsystem
mailing list