diff options
author | Bernard Normier <bernard@zeroc.com> | 2015-05-05 19:23:45 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2015-05-05 19:23:45 -0400 |
commit | a5bd24845a2720d57a66d81effc59423d723c87c (patch) | |
tree | 76faa296700b0993deb3aa97323abc904188a681 /cpp/include/IceSSL/Plugin.h | |
parent | minor fixes for purify (diff) | |
download | ice-a5bd24845a2720d57a66d81effc59423d723c87c.tar.bz2 ice-a5bd24845a2720d57a66d81effc59423d723c87c.tar.xz ice-a5bd24845a2720d57a66d81effc59423d723c87c.zip |
ICE-6481 pragma comment when building static libraries
On windows with VS, pragma comment is now defined when building only when
ICE_BUILDING_<component-name> is not defined. ICE_BUILDING_<component-name>
is defined automatically when <component-name>_API_EXPORTS is defined. When building
static Ice libraries on Windows, please define
ICE_BUILDING_<component-name-being-built>.
ICE_DECLSPEC_EXPORT and ICE_DECLSPEC_IMPORT are now defined all the time on Windows,
and we define the various _API macros to /**/ when ICE_STATIC_LIBS is defined.
Replaced various direct use of ICE_DECLSPEC_EXPORT/ICE_DECLSPEC_IMPORT by
the correct _API macro.
Diffstat (limited to 'cpp/include/IceSSL/Plugin.h')
-rw-r--r-- | cpp/include/IceSSL/Plugin.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/cpp/include/IceSSL/Plugin.h b/cpp/include/IceSSL/Plugin.h index 367fd73c5dd..772ce4225a1 100644 --- a/cpp/include/IceSSL/Plugin.h +++ b/cpp/include/IceSSL/Plugin.h @@ -21,9 +21,14 @@ // // Automatically link IceSSL[D].lib with Visual C++ // -#if defined(_MSC_VER) && !defined(ICE_NO_PRAGMA_COMMENT) -# if !defined(ICE_STATIC_LIBS) && !defined(ICE_SSL_API_EXPORTS) -# if defined(_DEBUG) + +#if !defined(ICE_BUILDING_ICE_SSL) && defined(ICE_SSL_API_EXPORTS) +# define ICE_BUILDING_ICE_SSL +#endif + +#if defined(_MSC_VER) +# if !defined(ICE_BUILDING_ICE_SSL) +# if defined(_DEBUG) && !defined(ICE_OS_WINRT) # pragma comment(lib, "IceSSLD.lib") # else # pragma comment(lib, "IceSSL.lib") @@ -47,6 +52,8 @@ #ifndef ICE_SSL_API # ifdef ICE_SSL_API_EXPORTS # define ICE_SSL_API ICE_DECLSPEC_EXPORT +# elif defined(ICE_STATIC_LIBS) +# define ICE_SSL_API /**/ # else # define ICE_SSL_API ICE_DECLSPEC_IMPORT # endif |