Fwd: KDE/kdebase/libkonq

Brad King brad.king at kitware.com
Thu Mar 2 19:46:00 CET 2006


Alexander Neundorf wrote:
> On Thursday 02 March 2006 15:39, William A. Hoffman wrote:
> 
>>At 09:25 AM 3/2/2006, Christian Ehrlicher wrote:
>>
>>>I don't think this is needed on win32 - otherwise we would had to link
>>>kdelibs against win32 system libs what we're not doing.
>>
>>Actually, that happens from some other magic.  MSVC puts pragma's in its
>>header files that cause the linker to link to files.  (Which is the reason
>>you can not mix debug and release).
> 
> 
> So the extra depend libs are neither needed on Linux, BSD or Windows, right ?
> Should they really be required on OS X ?
> 
> 
>>CMake does however do the library chaining for you.
>>
>>So, if you tell cmake all the libraries that your library directly uses,
>>it will chain those libraries to any library that use your library.
>>For example:
>>
>>add_library(A ...)
>>target_link_libraries(A B C)
>>
>>add_library(D ...)
>>target_link_libraries(D A)  # D will link to A B C
>>
>>add_executable(foo ...)
>>target_link_libraries(foo D)  # foo will link to D A B C
> 
> 
> But this doesn't work across different projects, i.e. when buildind kdebase 
> which links to the installed libkdecore.so. Then cmake can't "remember" to 
> which libs kdecore was linked ?

Take a look at the EXPORT_LIBRARY_DEPENDENCIES command.

-Brad


More information about the Kde-buildsystem mailing list