Providing FindFoo.cmake for a kde module "foo"

Andreas Pakulat apaku at gmx.de
Sun Jul 8 21:44:23 CEST 2007


On 08.07.07 21:26:42, Ralf Habacker wrote:
> Andreas Pakulat schrieb:
> >On 08.07.07 20:49:23, Ralf Habacker wrote:
> >>I have added the following stuff to a new file in 
> >><kdelibs-install-dir>/lib/kdevplatform/KDevPlatformConfig.cmake
> >>
> >>if(WIN32)
> >>    file(TO_CMAKE_PATH "$ENV{ProgramFiles}" ProgramFiles)
> >>    SET(CMAKE_MODULE_PATH  ${CMAKE_MODULE_PATH} 
> >>${ProgramFiles}/kdevplatform/share/apps/cmake/modules)
> >>    find_package(KDevPlatform REQUIRED)
> >>endif(WIN32)
> >>
> >>which let me configure kdevelop on win32 without any error.
> >>    
> >
> >Hmm.... So we could generate that file and install it along with
> >kdevplatform..
> >
> >Did you need to add the
> >-DKDevPlatform_DIR=<kdelibs-install-dir>/lib/kdevplatform/ ?
> >
> >  
> no.

Cool.

> In the meantime I found a simpler way by appending all pathes from KDEDIRS (+ 
> 'share/apps/cmake/module') added to the CMAKE_MODULE_PATH  in 
> FindKDE4Internal.cmake. As an alternative the path list generated by 
> 'kde4-config --path data'  could be added.  This makes it able to use cmake 
> modules without any additional effort from *all* KDE install locations.

That sounds like a really good solution, except that currently KDEDIRS
is not needed to be set during compilation, only during runtime. 

So if nobody objects I'd like to see the second solution, with proper
documentation of course, else its no problem to provide
KdevPlatformConfig.cmake and install it into kdelibs/lib/kdevplatform/

Andreas

-- 
You will be advanced socially, without any special effort on your part.


More information about the Kde-buildsystem mailing list