FindQCA2.cmake

Andreas Pakulat apaku at gmx.de
Sun Nov 16 10:05:17 CET 2008


On 16.11.08 01:15:24, Bo Ørsted Andresen wrote:
> On Saturday 15 November 2008 07:52:25 Andreas Pakulat wrote:
> > > <@zlin> ok, the problem is there is a name space conflict
> > > <@zlin> pkg_check_modules(QCA2 qca2) marks QCA2_LIBRARIES as INTERNAL
> > > and assigns a list of libraries to it
> > > <@zlin> FIND_LIBRARY(QCA2_LIBRARIES NAMES qca ...) was supposed to
> > > mark it as a FILEPATH and assign a path to it
> > > <@zlin> but apparently fails because it already exists with a different
> > > type <@zlin> one solution is to change QCA2 in the pkg_check_modules
> > > call. another is to use a different variable name in FIND_LIBRARY and in
> > > ./ktorrent/libbtcore/CMakeLists.txt
> > > <@zlin> someone who isn't me should take this issue upstream
> >
> > Why is it a problem that find_library "doesn't do anything"?
> > pkg_check_modules tries to find the libraries and if its successful those
> > libraries should be used. If not there's a fallback using find_library.
> >
> > So whats the exact error message you get? Also post your CMakeCache.txt and
> > the relevant CMakeLists.txt (or at least provide a websvn link).
> 
> The output from find_library is the full path to the libqca library. This is
> what the modules using FindQCA2.cmake expect QCA2_LIBRARIES to contain. One
> example of a consumer is Okular from kdegraphics:
> 
> -- checking for module 'qca2'
> --   found qca2, version 2.0.1
> -- Found QCA2: qca;QtCore;z;m;gthread-2.0;rt;glib-2.0;pthread;dl

Ah, I thought pkg_check_modules was finally smart enough to handle this
itself, i.e. put the absolute path into the variables by using the -L
flags...

The find_library call should use the QCA2_LIBRARY_DIRS variable with the
HINTS flag to make sure it uses the qca library found by pkg-config.

FindStrigi.cmake seems to "get it right", so that can serve as an example.

Andreas

-- 
You should emulate your heros, but don't carry it too far.  Especially
if they are dead.


More information about the Kde-buildsystem mailing list