automoc4 from kdesupport now supported for building KDE

Andreas Pakulat apaku at gmx.de
Tue Jun 3 21:19:17 CEST 2008


On 03.06.08 21:02:50, David Faure wrote:
> > From "cmake --help-command find_library":
> > If NO_DEFAULT_PATH is specified, then no additional paths are added to the search.
> 
> This is in fact the reason why now kdelibs can't find phonon.
> 
>    find_library(PHONON_LIBRARY NAMES phonon PATHS ${KDE4_LIB_INSTALL_DIR} ${KDE4_LIB_DIR} ${CMAKE_SYSTEM_LIBRARY_PATH} ${QT_LIBRARY_DIR} ${LIB_INSTALL_DIR} NO_DEFAULT_PATH)
> 
> So -DCMAKE_PREFIX_PATH:PATH=/d/kde/inst/kdesupport_trunk;/d/kde/inst/phonon (correct syntax, right?)
> doesn't work, because of the NO_DEFAULT_PATH. The reason why use NO_DEFAULT_PATH almost everywhere
> is simple: without it, libs in /usr/lib are preferred over those in the PATHS specified to find_library.
> 
> Is there a way to get "check those paths first, then fallback to the default paths" behavior, without duplicating
> all the default paths in the find_library call?

Yes there is, run find_library twice, first with NO_DEFAULT_PATH, then
without it. That way the directories that you list are preferred and you
can still easily search the standard system dirs if nothing is found in
the preferred dirs. Works because find_library doesn't search if the
variable it is supposed to fill is already filled with something that
doesn't end in -NOTFOUND.

Andreas

-- 
You will have a long and boring life.


More information about the Kde-buildsystem mailing list