overriding CMAKE_MODULE_PATH

Michael Jansen info at michael-jansen.biz
Mon Aug 16 23:54:51 CEST 2010


On Monday 16 August 2010 21:09:46 Alexander Neundorf wrote:

I kind of get unwilling to discuss it. So here is my last attempt.

> > 3. If someone develops a small lib he plans to add as a kde dependency
> > he probably installs it into some non distro prefix so he doesn't need
> > root rights to install it. So he needs to override CMAKE_MODULE_PATH in
> > say koffice to make it pick up that location.
> 
> No.
> I don't understand.
> There is no need to override CMAKE_MODULE_PATH.
> If he installs libfoo to $HOME/my/installs/ then all he needs to do so
> others can find it is to $ export CMAKE_PREFIX_PATH=$HOME/my/installs:
> $CMAKE_PREFIX_PATH

CMAKE_PREFIX_PATH does not influence the way cmake finds FindXYZ*.cmake files. 

So if a a developer develops the file FindXYZ*.cmake locally with the intent 
to somedayy put it upstream then CMAKE_MODULE_PATH is a development tool too. 
It allows to develop and install a FindXYZ*.cmake tool without root rights and 
still beeing able to find it.

And if the next paragraph doesn't convince you i really have no idea anymore. 
This lines are cited from an email you wrote today.

  Adjust CMAKE_MODULE_PATH to find FindBlub.cmake or set Blub_DIR to the
  directory containing a CMake configuration file for Blub. 
  [...]

Which won't work with most kde modules because they immediately overwrite it. 
And absolutely and totally makes no sense, breaks stuff and is a surefire 
symbol for the upcoming apocalypse judging from most comments i read today.

Mik


More information about the Kde-buildsystem mailing list