CMAKE_PREFIX_PATH vs. CMAKE_[INCLUDE|LIBRARY|PROGRAM]_PATH

Alexander Neundorf neundorf at kde.org
Fri Oct 8 18:25:15 CEST 2010


On Friday 08 October 2010, Yury G. Kudryashov wrote:
> Ingomar Wesp wrote:
> > You might have guessed that I'm not too familiar with cmake, so let me
> > outline the problem I ran into:
> >
> > I tried to build and install the following from trunk in the following
> > sequence: phonon, kdesupport/soprano, kdesupport/akonadi,
> > kdesupport/attica, kdelibs, kdepimlibs, kdebase.
> >
> > For all of them I used a custom CMAKE_INSTALL_PREFIX pointing to some
> > $DESTDIR. Correspondingly, I set CMAKE_INCLUDE_PATH to $DESTDIR/include
> > and CMAKE_LIBRARY_PATH to $DESTDIR/lib.
>
> The problem is that FindAkonadi.cmake calls
> find_package(Akonadi ... NO_MODULE)
> which looks for AkonadiConfig.cmake file installed by Akonadi, and
> find_package(... NO_MODULE) ignores CMAKE_LIBRARY_PATH. You can ask cmake
> developers to look in CMAKE_LIBRARY_PATH as well.

No, I wouldn't do that. CMAKE_PREFIX_PATH should be used.

You can add this as a feature request on public.kitware.com/Bugs, that 
find_package() should also use CMAKE_LIBRARY_PATH when searching.
It does sound reasonable.

Alex


More information about the Kde-buildsystem mailing list