diff options
author | Adam Szmigin <smidge@xsco.net> | 2020-10-06 14:24:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 14:24:06 +0100 |
commit | fe21c4d6dae9f14a7a2097dce0d7b5a7d84178d5 (patch) | |
tree | 3680042c5f8a0981db070c21b76c26f98848bd16 /include/djinterop/config.hpp.in | |
parent | 2fb8d7e1811090bcea1ab204407936b408fa5ec3 (diff) | |
parent | 9d1fbbbc96705410a662af5858ca4df8a40796e9 (diff) |
Merge pull request #31 from xsco/fix/msvc-static-lib-build
Fix static builds on MSVC
Diffstat (limited to 'include/djinterop/config.hpp.in')
-rw-r--r-- | include/djinterop/config.hpp.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/djinterop/config.hpp.in b/include/djinterop/config.hpp.in index b558501..4783904 100644 --- a/include/djinterop/config.hpp.in +++ b/include/djinterop/config.hpp.in @@ -23,10 +23,19 @@ #error This library needs at least a C++17 compliant compiler #endif +// Statement about whether the library was built/installed as static or shared. +#cmakedefine DJINTEROP_STATIC + #if defined _WIN32 || defined __CYGWIN__ +#if defined DJINTEROP_STATIC +#define DJINTEROP_SYMBOL_IMPORT +#define DJINTEROP_SYMBOL_EXPORT +#define DJINTEROP_SYMBOL_LOCAL +#else #define DJINTEROP_SYMBOL_IMPORT __declspec(dllimport) #define DJINTEROP_SYMBOL_EXPORT __declspec(dllexport) #define DJINTEROP_SYMBOL_LOCAL +#endif #else #if __GNUC__ >= 4 #define DJINTEROP_SYMBOL_IMPORT __attribute__((visibility("default"))) |