automoc4 from kdesupport now supported for building KDE
Alexander Neundorf
neundorf at kde.org
Wed Jun 4 23:35:38 CEST 2008
On Wednesday 04 June 2008, you wrote:
...
> Imagine I have a /usr/lib/libphonon.so from kubuntu (so it's old, and was
> compiled in release mode), and I compile my own libphonon.so into my own
> prefix (say /opt/phonon/lib/libphonon.so or whatever). IIRC a call to
> find_library() would prefer the one in /usr/lib/libphonon.so even when
> doing find_library(PHONON_LIBRARY NAMES phonon PATHS /opt/phonon/lib)
> because the system paths are checked first (right? I hope I don't remember
> wrongly). This is the reason why we're using NO_DEFAULT_PATH everywhere --
> but I agree, it's a workaround. Ideally we shouldn't have to use it. And
> then setting CMAKE_PREFIX_PATH or cmake-2.4 similar vars would work.
>
> Right Alex? This is the reason for the NO_DEFAULT_PATH in FindPhonon? Or is
> the reason rather that you wanted CMAKE_SYSTEM_LIBRARY_PATH to have more
> priority than qt's [old] phonon? (but that's a tough choice, they could
Hmm, today was the first time I had a look at that file.
Maybe Matthias copied this from FindAutomoc4.cmake, but there we have a very
special case (finding a non-library file in a library directory).
Usually I would do something like:
find_library(PHONON_LIBRARY NAMES phonon
PATHS ${KDE4_LIB_INSTALL_DIR}
NO_DEFAULT_PATH)
find_library(PHONON_LIBRARY NAMES phonon)
This would prefer libphonon.so in the kdelibs install dir. The next try would
be the location listed in CMAKE_PREFIX_PATH or CMAKE_LIBRARY_PATH, followed
by all the default dirs.
Would that work for you ?
Alex
More information about the Kde-buildsystem
mailing list