[CMake] How to use EXPORT_LIBRARY_DEPENDENCIES correct?

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Fri Nov 10 11:19:22 EST 2006


Christian Ehrlicher schrieb:
> Hi,
> 
> EXPORT_LIBRARY_DEPENDENCIES() for my project produces this output:
> 
> SET(kdewin32_LIB_DEPENDS
> "E:/Qt/qt-4.2.1/lib/QtCore4.lib;E:/Qt/qt-4.2.1/lib/QtCored4.lib;advapi32;shell32;ws2_32;")
> SET(E:/Qt/qt-4.2.1/lib/QtCore4.lib_LINK_TYPE "optimized")
> SET(E:/Qt/qt-4.2.1/lib/QtCored4.lib_LINK_TYPE "debug")
> 
> When I now want to use ${kdewin32_LIB_DEPENDS} I simply add it to
> target_link_libraries:
> 
> target_link_libraries(myExecutable ${myLibs} ${kdewin32_LIB_DEPENDS})
> 
> But then I've the problem that myExecutable is linked agains QtCore4.lib
> and QtCored4.lib instead using either QtCore4 or QtCored4 ...
> 
> Any ideas what's wrong here?
> 
> When I change the output to
> SET(kdewin32_LIB_DEPENDS
> optimized;"E:/Qt/qt-4.2.1/lib/QtCore4.lib;debug;E:/Qt/qt-4.2.1/lib/QtCored4.lib;advapi32;shell32;ws2_32;")
> 
> all works fine...
> 
No ideas? The above scenario is just a testcase - FindKDE4.cmake works
the same way and so we've problems with linking against QtCore4 and
QtCore4d which results in unconditional crashes...

Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://public.kitware.com/pipermail/cmake/attachments/20061110/48f9cdb3/signature.pgp


More information about the CMake mailing list