From 2c7a329c4884b26d922368460685d4a094e0e8d6 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Fri, 2 Mar 2018 16:08:53 +0300 Subject: [PATCH] Improve symbols visibility control visibility 'hidden' should be normally preferred for static builds, which is also true for source-in builds as well --- src/msgpack_export.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/msgpack_export.h b/src/msgpack_export.h index bc4ece0..a5759c7 100644 --- a/src/msgpack_export.h +++ b/src/msgpack_export.h @@ -3,10 +3,14 @@ #include -#if defined(MSGPACK_MAKE_LIB) // building lib -#define MSGPACK_EXPORT Q_DECL_EXPORT -#else // using lib -#define MSGPACK_EXPORT Q_DECL_IMPORT +#ifndef MSGPACK_STATIC +# if defined(MSGPACK_MAKE_LIB) +# define MSGPACK_EXPORT Q_DECL_EXPORT +# else +# define MSGPACK_EXPORT Q_DECL_IMPORT +# endif +#else +# define MSGPACK_EXPORT #endif #endif // MSGPACK_EXPORT_H