overriding CMAKE_MODULE_PATH

Andreas Pakulat apaku at gmx.de
Mon Aug 16 13:04:04 CEST 2010


On 16.08.10 14:52:58, Yury G. Kudryashov wrote:
> Andreas Pakulat wrote:
> 
> > On 16.08.10 12:16:41, Yury G. Kudryashov wrote:
> >> Why you don't like the current situation? libktorrent installs
> >> FindKTorrent into <prefix>/share/apps/cmake/modules. If it is installed,
> >> kdenetwork should find it (if we add CMAKE_PREFIX_PATH ->
> >> CMAKE_MODULE_PATH map), else it doesn't find. What's wrong?
> > 
> > Whats wrong is that if ktorrent is not installed there's no way to give
> > the user a useful error message. All you get is a 'no xxxConfig.cmake
> > found' error from cmake, becuase no FindKTorrent.cmake is found (and no
> > KTorrentConfig.cmake either). The point of doing a find_package(KTorrent)
> > is to find out wether its installed or not, if its not installed you're
> > supposed to give your users a useful message, preferably telling them
> > where to get it. When the FindKTorrent.cmake is only installed if ktorrent
> > is installed you're making that impossible.
> macro_display_feature_log() displays all this information.

But only if someone calls it. But that doesn't happen if no FindXXX.cmake
is found by cmake. Because doing a find_package(XXX) and having no
FindXXX.cmake anywhere is an error for cmake and it stops processing of the
cmake-files at that point.

Andreas

-- 
Future looks spotty.  You will spill soup in late evening.


More information about the Kde-buildsystem mailing list