[ANNOUNCE] automoc4 from kdesupport now supported for building KDE
Alexander Neundorf
neundorf at kde.org
Tue Jun 3 01:15:34 CEST 2008
Hi David,
/me is still catching up with emails after LinuxTag...
On Thursday 29 May 2008, you wrote:
> On Saturday 10 May 2008, Alexander Neundorf wrote:
> > Hi,
> >
> > we moved automoc (the tool which does the automoc'ing) to kdesupport, so
> > it can be used also by non-KDE apps (and maybe be integrated into cmake).
>
> When kdesupport is installed into its own prefix, how should automoc4 be
> found? There's no pkgconfig file,
> -DCMAKE_LIBRARY_PATH=/d/kde/inst/kdesupport_trunk/lib doesn't seem to
> help....
You are right, there was something missing.
> FindAutomoc4.cmake says
> find_file(AUTOMOC4_CONFIG_FILE NAMES Automoc4Config.cmake
> PATH_SUFFIXES automoc4 lib/automoc4 lib64/automoc4
> PATHS ${CMAKE_SYSTEM_PREFIX_PATH} ${CMAKE_SYSTEM_LIBRARY_PATH}
> ${CMAKE_INSTALL_PREFIX}/lib NO_DEFAULT_PATH )
>
> --> how do I specify a path that isn't installprefix/lib for looking up
> automoc4?
>
> 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.
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.
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/.
So with cmake 2.4 you can now set the CMAKE_LIBRARY_PATH env. var to the lib
install dir of automoc.
With cmake 2.6 you can (and should) set the CMAKE_PREFIX_PATH env. var to all
your custom install prefixes.
Of course you can also manually set AUTOMOC4_CONFIG_FILE to the file, either
using -DAUTOMOC4_CONFIG_FILE or using cmake-gui.
Alex
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 ?
More information about the Kde-buildsystem
mailing list