installing and finding cmake-built projects

Andreas Pakulat apaku at gmx.de
Sun Nov 16 21:04:50 CET 2008


On 16.11.08 20:21:15, Alexander Neundorf wrote:
> we have a bunch of cmake-built projects in kdesupport/. We have FindFoo.cmake 
> modules for them in kdelibs/.
> These FindFoo.cmake modules don't take advantage of the fact that these 
> packages have also been built with cmake, they just search for them as for 
> any other package.
> 
> I changed this now for Strigi (and Automoc already did it already). So how are 
> Strigi and Automoc found now ?
> Inside FindStrigi.cmake there is now a call
> 
> find_package(Strigi NO_MODULE)
> 
> This tells cmake to search for a file named StrigiConfig.cmake in a bunch of 
> default locations, e.g. CMAKE_INSTALL_PREFIX/lib/Strigi/. 
> If it find StrigiConfig.cmake there, it loads and executes this file. This way 
> it is possible to get basically any information from a cmake-built project 
> into a cmake-using project.
> StrigiConfig.cmake (generated using configure_file() from 
> StrigiConfig.cmake.in to set the version number variables correctly) contains 
> the version number information, the include directory, the library directory 
> and search calls for the libraries and also the API type (strigi specific).
> In case the file is not found it still falls back to the old search logic.
> 
> I think we should do it this way for all projects in kdesupport/.
> 
> Comments ?

Having done this for KDevPLatform a couple of weeks ago my experience wit
it is quite good. Although FindKDevPlatform has no fallback the
*Config.cmake way seems to work for everybody who's compiling it currently
(including windows). It allows to get much more reliable information,
especially version information. 

> Alex
> _______________________________________________
> Kde-buildsystem mailing list
> Kde-buildsystem at kde.org
> https://mail.kde.org/mailman/listinfo/kde-buildsystem
> 

-- 
You will be attacked by a beast who has the body of a wolf, the tail of
a lion, and the face of Donald Duck.


More information about the Kde-buildsystem mailing list