KdePimlibs overriding CMAKE_MODULE_PATH

Alexander Neundorf neundorf at kde.org
Wed Jul 15 22:59:20 CEST 2009


On Wednesday 15 July 2009, Christophe Giboudeaux wrote:
> Hi,
>
> On Monday 15 June 2009 20:08:14 Alexander Neundorf wrote:
> > Some general notes:
> > -modifying CMAKE_MODULE_PATH is only necessary for installed cmake
> > modules -every installed cmake module (at least from kdelibs) has to be
> > kept compatible at least until the end of KDE4,
> > -so in general, we shouldn't install too many such modules
> > -more specifically, if possible, modules beside kdelibs should not
> > install such cmake modules, but kdepimlibs is also a "libs" module, so it
> > is somewhat special
> > -kdepimlibs installs only 5 cmake modules, do you really get some
> > conflict there ?
> >
> > So what do we do ?
> > Changing the order can be a source incompatible change, but it could also
> > be interpreted as a bug fix. But if we append it instead of prepend it,
> > we can never be sure that we actually get the cmake modules we want.
> >
> > Maybe CMAKE_MODULE_PATH shouldn't be modified at all and
> > find_package(KdepimLibs) should just set a KDEPIMLIBS_MODULE_DIR
> > variable, and the user has to use this to set CMAKE_MODULE_PATH ?
> > This would lead to the rule that the only cmake module in KDE svn which
> > modifies CMAKE_MODULE_PATH is FindKDE4Internal.cmake, i.e.
> > find_package(KDE4).
> > This would indead be a source incompatible change, and as such actually
> > not possible at all.
> > But at least right now there are not that many modules which do that, so
> > maybe this could be the last chance before we go with a maybe bad policy
> > into the longer KDE4 series...
> >
> > Comments ?
>
> Was something decided about that ?
>
> For testing purpose, I changed the CMAKE_MODULE_PATH order a few weeks ago.
> No trunk user nor distro packager complained nor noticed.

Thanks for reminding :-)

> It's time to take a decision before 4.3 gets released.
>
> Revert to set(CMAKE_MODULE_PATH "${KDEPIMLIBS_DATA_DIR}/cmake/modules"
> "${CMAKE_MODULE_PATH}" ) ?

I would say so.
At least completely removing set(CMAKE_MODULE_PATH ... ) is a source 
incompatible change, since then the using application is required to add the 
KDEPIMLIBS_MODULE_DIR to CMAKE_MODULE_PATH, otherwise it doesn't compile 
anymore, while it did compile with KDE 4.(0..2). So this would break 
compatibility and as such is no option.

About the order: I would still prefer if the kdepimlibs dir is prepended 
instead of appended. 

> create KDEPIMLIBS_MODULE_DIR ? (patch is attached)

Introducing a KDEPIMLIBS_MODULE_DIR variable is a good idea.

Alex


More information about the Kde-buildsystem mailing list