FindQCA2.cmake

Johannes Manhave drantin at gmail.com
Fri Nov 14 23:18:31 CET 2008


I've been having problems compiling anything that uses QCA2 in kde
trunk, using genkdesvn on gentoo.

I spoke about it with one of the devs from there and he came up with this:

<@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

and later with:

Index: FindQCA2.cmake
===================================================================
--- FindQCA2.cmake	(revision 883482)
+++ FindQCA2.cmake	(working copy)
@@ -26,16 +26,16 @@

   IF (NOT WIN32)
     find_package(PkgConfig)
-    pkg_check_modules(QCA2 qca2)
+    pkg_check_modules(qca2 qca2)

-    set(QCA2_DEFINITIONS ${QCA2_CFLAGS})
+    set(QCA2_DEFINITIONS ${qca2_CFLAGS})

     FIND_LIBRARY(QCA2_LIBRARIES NAMES qca
       PATHS
-      ${QCA2_LIBRARY_DIRS}
+      ${qca2_LIBRARY_DIRS}
       NO_DEFAULT_PATH
     )
-    set(QCA2_INCLUDE_DIR ${QCA2_INCLUDEDIR})
+    set(QCA2_INCLUDE_DIR ${qca2_INCLUDEDIR})
   ELSE (NOT WIN32)
     FIND_LIBRARY_WITH_DEBUG(QCA2_LIBRARIES
                     WIN32_DEBUG_POSTFIX d


Is there anything else I should be looking at, or is this it?

--Johannes Manhave (drantin)


More information about the Kde-buildsystem mailing list