Support CMake-Version-Variables

Alexander Neundorf neundorf at kde.org
Sun Aug 17 01:38:25 CEST 2008


On Saturday 16 August 2008, Andreas Pakulat wrote:
> On 15.08.08 21:56:42, Alexander Neundorf wrote:
> > On Friday 15 August 2008, Andreas Pakulat wrote:
> > > On 15.08.08 00:13:49, Alexander Neundorf wrote:
> > > > On Thursday 07 August 2008, Andreas Pakulat wrote:
> > > > > On 07.08.08 22:11:11, Thiago Macieira wrote:
> > > > > > Andreas Pakulat wrote:
> > > > > > >This has a problem, I can't depend on KDE 4.2.0 until its
> > > > > > > released and hence modules in trunk/ cannot have a dependency
> > > > > > > on kdelibs from trunk/
> > > > > > >
> > > > > > >For example kdevplatform now has a hard dependency on kdelibs
> > > > > > > from trunk/, so what I need is require KDE >= 4.1.60 (current
> > > > > > > version used in trunk/) not 4.2.0 as that doesn't exist yet and
> > > > > > > 4.1.0 doesn't work anymore.
> > > > > >
> > > > > > Right, sorry. I hadn't thought of pre-releases.
> > > > >
> > > > > Thanks for doing the logic-thinking for me :) Patch attached, it
> > > > > uses a negation of your pseudo-code to avoid having to create new
> > > > > variables.
> > > > >
> > > > > Andreas
> > > >
> > > > Looks good from the technical side.
> > > > Still there is one thing:
> > > > right now the way to specify the required KDE version is to set the
> > > > KDE_MIN_VERSION variable before calling find_package(KDE4).
> > > >
> > > > This patch now adds a second way how to specify the required version.
> > > > Pro:
> > > > -this is how find_package() now supports specifying the minimum
> > > > version number, i.e. in some way the officially recommended way
> > >
> > > Another pro is that we don't have to take care of moving a whole block
> > > (variable-setting+find_package) when reorganizing a module's
> > > CMakeLists.txt.
> > >
> > > > Con:
> > > > -with the patch there are now two ways how to do the same thing (and
> > > > the old way has to stay, in order to stay source compatible)
> > >
> > > Well, while I agree its better to leave it in, the variable isn't
> > > documented and hence is IMHO an internal variable -
> >
> > Ooops, this is a bug, this variable was/is intended to be public.
>
> I've added documentation for the "new" way including a small example,
> should I also mention the variable or are we deprecating the variable?

Hmm. Now we have a nicer way, but without documenting this variable we have no 
documented way how to do this for KDE 4.0.x and 4.1.x.
So I'm afraid we should make it public right now that we deprecated it :-/

Alex


More information about the Kde-buildsystem mailing list