automoc4 from kdesupport now supported for building KDE

Alexander Neundorf neundorf at kde.org
Tue Jun 3 19:43:31 CEST 2008


On Tuesday 03 June 2008, David Faure wrote:
> On Tuesday 03 June 2008, Alexander Neundorf wrote:
> > > BTW, what are ${CMAKE_SYSTEM_PREFIX_PATH} and
> > > ${CMAKE_SYSTEM_LIBRARY_PATH}? cmake --help-variable doesn't know them.
> >
> > Hmm, maybe they are internal and intentionally undocumented.
>
> Well, if you have to use them when you write a FindFoo.cmake module, then
> maybe they should be documented :)
>
> > No, I just tried and it also doesn't say anything about CMAKE_PREFIX_PATH
> > and CMAKE_LIBRARY_PATH.
> > They are documented in the FIND_LIBRARY() documentation. To make sure
> > this won't be forgotten it would be nice if you could file a bug report
> > in the cmake bugtracker for that.
>
> Hmm. My old login failed to work. Grmbl. OK new account created...
>
> > Ok, I added the missing paths (CMAKE_PREFIX_PATH, CMAKE_LIBRARY_PATH and
> > their env. var equivalents) to the FIND_FILE() command in
> > kdelibs/cmake/modules/. If that works fine we have to do the same in
> > kdesupport/akonadi/ and phonon/.
>
> Yes it works fine after copying FindAutomoc.cmake to phonon, please commit
> them too.

Will do.

> > So with cmake 2.4 you can now set the CMAKE_LIBRARY_PATH env. var to the
> > lib install dir of automoc.
>
> Works.
>
> > With cmake 2.6 you can (and should) set the CMAKE_PREFIX_PATH env. var to
> > all your custom install prefixes.
>
> Works too - nicer indeed.

I guess blogging about this once wasn't enough...
...how could anybody not remember all details from the blog of some KDE 
developer...
Hmm, techbase...

> > Of course you can also manually set AUTOMOC4_CONFIG_FILE to the file,
> > either using -DAUTOMOC4_CONFIG_FILE or using cmake-gui.
>
> Yeah, I could also run moc by hand :-P
>
> > P.S. the issue here is that I try to find a file which is not a library
> > in a subdir of the lib dirs, so FIND_LIBRARY() would be a good candidate,
> > but since it automatically adds prefixes and suffixes ("lib" and ".so")
> > that doesn't work, so FIND_FILE() has to be used instead, and all paths
> > where FIND_LIBRARY() would search are added explicitely.
> > Maybe it would be easier to just use FIND_PROGRAM(automoc4) and then
> > check ../lib/automoc/ for the Automoc4Config.cmake file ?
>
> Not really, since ../lib can be ../lib64 or ../lib32, and in theory one
> doesn't have to set things up that way at all...
>
> A more standard solution (except on windows) would be a pkgconfig file I
> guess... 

If you install automoc to a custom location, you would also have to adjust the 
PKGCONFIG_PATH (or what the name is) env. var, so it doesn't help for the 
basic issue.

Alex


More information about the Kde-buildsystem mailing list