patch: c/cxxflags for static libraries

Brad King brad.king at kitware.com
Tue Jul 18 22:20:45 CEST 2006


Thiago Macieira wrote:
> Brad King wrote:
>> The equivalent in CMake would be to just remove static libraries from
>> the list of libraries put on the link line for a shared library.  The
>> static libraries should still be listed as dependencies so that when the
>> executable links to the shared library it gets the static library too.
>>
>> Does this sound correct?
> 
> No. They should be completely forbidden.
> 
> If you do it like that, it'll work for a shared library that is produced 
> in the same cmake build. But it'll fail for a 3rd-party (from a different 
> cmake build), since the dependency isn't recorded anywhere.
> 
> Unless you're proposing to create and install .la files.

Sure it is recorded.  Look at the EXPORT_LIBRARY_DEPENDENCIES command.

-Brad


More information about the Kde-buildsystem mailing list