Providing FindFoo.cmake for a kde module "foo"

Alexander Neundorf neundorf at kde.org
Tue Jul 10 04:26:45 CEST 2007


On Monday 09 July 2007 17:18, Ralf Habacker wrote:
> Andreas Pakulat schrieb:
> > On 09.07.07 06:49:23, Thiago Macieira wrote:
> >> Andreas Pakulat wrote:
> >>> As I tried to explain at the start: this is specifically about
> >>> installing module's in different locations.
> >>
> >> I think KDEDIRS is the best way.
> >
> > Ok, tried and it works quite well. now the question is: where to put
> > this:
> >
> > exec_program(kde4-config ARGS --path data OUTPUT_VARIABLE _data_DIR)
> > file(TO_CMAKE_PATH "${_data_DIR}" _data_DIR)
> > foreach(dir ${_data_DIR})
> >     message("Adding ${dir} to CMAKE_MODULE_PATH")
> >     set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
> > ${dir}/share/cmake/modules) endforeach(dir)
> >
> > Also maybe we should remove the user's data-dir from that, i.e. only use
> > install locations. But I don't know wether thats known or not.
> >
> > Should this be in FindKDE4Internal.cmake?
>
> yes, because it is part of setting a propper KDE environment. I suggest
> the place in my send patch

Yes, adding the dirs reported by kde4-config in FindKDE4Internal.cmake sounds 
really like the right approach.

On Sunday 08 July 2007 17:59, Andreas Pakulat wrote:
> Well, then you again need the KDEDIRS variable setup properly during
> compilation, which is not needed at the moment.

Kind of. KDEDIRS is supported for building KDE4 (see FindKDE4.cmake), and if 
kde4-config is not in the PATH and not in the CMAKE_INSTALL_PREFIX/bin, then 
KDEDIRS is used. So relying on KDEDIRS for such advanced setups is ok I'd 
say.

Bye
Alex


More information about the Kde-buildsystem mailing list