[CMake] Problems with add_definitions()

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Tue May 1 07:05:24 EDT 2007


Hi,

I want to build a static and a dynamic lib from the same sources. It's 
no problem until we need to export some functions :)

// this defines MAKE_SOLID_LIB (with set_target_properties) so we can 
use dllexport
kde4_add_library(solid SHARED ${solid_LIB_SRCS})

// this defines nothing -> dllimport is assumed
kde4_add_library(solid_static STATIC ${solid_LIB_SRCS})

I can't use add_definitions(-DSOLID_EXPORT=) here because it's added for 
both libs. I also can't use set_target_properties with DEFINE_SYMBOL 
because this is ignored when building a static lib...

Any ideas how to solve this?

Thx,
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/20070501/0fc37cf0/signature.pgp


More information about the CMake mailing list