branches/KDE/4.3/kdelibs/nepomuk/core

Brad King brad.king at kitware.com
Mon Jun 29 17:31:51 CEST 2009


David Faure wrote:
> The first one only says:
> 
> # Create imported target KDE4__nepomuk
> ADD_LIBRARY(KDE4__nepomuk SHARED IMPORTED)
> 
> while the second one says:
> 
> # Import target "KDE4__nepomuk" for configuration "debugfull"
> SET_PROPERTY(TARGET KDE4__nepomuk APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUGFULL)
> SET_TARGET_PROPERTIES(KDE4__nepomuk PROPERTIES
>   IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUGFULL "/d/kde/src/4/qt-copy/lib/libQtCore.so;-lpthread;KDE4__kdecore;KDE4__kdeui;/d/kde/inst/kdesupport-for-4.3/lib/libsoprano.so"
>   IMPORTED_LOCATION_DEBUGFULL "/d/kde/inst/kde4/lib/libnepomuk.so.4.3.0"
>   IMPORTED_SONAME_DEBUGFULL "libnepomuk.so.4"
>   )

I just tried this example:

-----------------------------------------------------------------------
add_library(jpeg SHARED IMPORTED)
set_property(TARGET jpeg APPEND PROPERTY
   IMPORTED_CONFIGURATIONS DEBUGFULL
   )
set_target_properties(jpeg PROPERTIES
   IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUGFULL "-lpthread;/usr/lib/libm.so"
   IMPORTED_LOCATION_DEBUGFULL "/usr/lib/libjpeg.so.62.0.0"
   IMPORTED_SONAME_DEBUGFULL "libjpeg.so.62"
   )
add_executable(foo foo.c)
target_link_libraries(foo jpeg)
-----------------------------------------------------------------------

I built with CMAKE_BUILD_TYPE=Debug and the link line for foo contains

   ... /usr/lib/libjpeg.so.62.0.0 -lpthread -lm

as expected.  In other words, I cannot reproduce the problem in a simple
test case.  Then I tried the real thing.

The problem is in "kdepim/akonadi/resources/nepomuktag/CMakeLists.txt":

   target_link_libraries(akonadi_nepomuktag_resource ... ${NEPOMUK_LIBRARIES})

It should be

   target_link_libraries(akonadi_nepomuktag_resource ... ${KDE4_NEPOMUK_LIBS})

The imported target isn't even named otherwise, so of course its link
interface is not used.

-Brad


More information about the Kde-buildsystem mailing list