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 [...] Scanning dependencies of target okularGenerator_fb [ 86%] Building CXX object okular/generators/fictionbook/CMakeFiles/okularGenerator_fb.dir/okularGenerator_fb_automoc.o [ 87%] Building CXX object okular/generators/fictionbook/CMakeFiles/okularGenerator_fb.dir/converter.o Linking CXX shared module ../../../lib/okularGenerator_ooo.so [ 87%] Building CXX object okular/generators/fictionbook/CMakeFiles/okularGenerator_fb.dir/document.o /usr/lib/gcc/i686-pc-linux-gnu/4.2.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lqca collect2: ld returned 1 exit status make[2]: *** [lib/okularGenerator_ooo.so] Error 1 make[1]: *** [okular/generators/ooo/CMakeFiles/okularGenerator_ooo.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 88%] /var/tmp/paludis/kde-base-okular-scm/work/okular/okular/generators/fictionbook/document.cpp: In member function 'bool FictionBook::Document::open()': /var/tmp/paludis/kde-base-okular-scm/work/okular/okular/generators/fictionbook/document.cpp:26: warning: 'device' may be used uninitialized in this function Building CXX object okular/generators/fictionbook/CMakeFiles/okularGenerator_fb.dir/generator_fb.o Linking CXX shared module ../../../lib/okularGenerator_fb.so [ 88%] Built target okularGenerator_fb make: *** [all] Error 2 ----- CMakeCache.txt:QCA2_LIBRARIES-ADVANCED:INTERNAL=1 CMakeCache.txt:QCA2_LIBRARIES:INTERNAL=qca;QtCore;z;m;gthread-2.0;rt;glib-2.0;pthread;dl After fixing this bug it compiles and you get: CMakeCache.txt:QCA2_LIBRARIES:FILEPATH=/usr/lib/qca2/libqca.so CMakeCache.txt:QCA2_LIBRARIES-ADVANCED:INTERNAL=1 -- Bo Andresen
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Kde-buildsystem mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-buildsystem
