Enhance FOO_EXPORT macro

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Fri May 4 06:01:30 BST 2007


Hi,

I think FOO_EXPORT should be extented to

#ifndef SOLID_EXPORT
# if defined _WIN32 || defined _WIN64
#  if defined(MAKE_SOLID_LIB)
#   define SOLID_EXPORT KDE_EXPORT
#  else
#   define SOLID_EXPORT KDE_IMPORT
#  endif
# else /* UNIX */
#  define SOLID_EXPORT KDE_EXPORT
# endif
#endif  /* ndef */

Sometimes (see solid) a static lib is created (to run the testcases 
without the dependency to solid shared lib) which can't export symbols 
(and cmake/kde does not define MAKE_FOO_EXPORT). In this case I added 
something like this to cmakelists:

set_target_properties(solid_static PROPERTIES COMPILE_FLAGS -DSOLID_EXPORT=)

which does not work on linux.


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://mail.kde.org/pipermail/kde-core-devel/attachments/20070504/a0daed27/attachment.sig>


More information about the kde-core-devel mailing list