diff options
Diffstat (limited to 'opentrack-compat/export.hpp')
-rw-r--r-- | opentrack-compat/export.hpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/opentrack-compat/export.hpp b/opentrack-compat/export.hpp index 100950a0..ba10f131 100644 --- a/opentrack-compat/export.hpp +++ b/opentrack-compat/export.hpp @@ -1,15 +1,27 @@ #pragma once -#ifndef OPENTRACK_EXPORT +#ifdef BUILD_compat # ifdef _WIN32 -# define OPENTRACK_LINKAGE __declspec(dllexport) +# define OPENTRACK_COMPAT_LINKAGE __declspec(dllexport) # else -# define OPENTRACK_LINKAGE +# define OPENTRACK_COMPAT_LINKAGE # endif # ifndef _MSC_VER -# define OPENTRACK_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_LINKAGE +# define OPENTRACK_COMPAT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_COMPAT_LINKAGE # else -# define OPENTRACK_EXPORT OPENTRACK_LINKAGE +# define OPENTRACK_COMPAT_EXPORT OPENTRACK_COMPAT_LINKAGE # endif +#else + #ifdef _WIN32 + # define OPENTRACK_COMPAT_LINKAGE __declspec(dllimport) + #else + # define OPENTRACK_COMPAT_LINKAGE + #endif + + #ifndef _MSC_VER + # define OPENTRACK_COMPAT_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_COMPAT_LINKAGE + #else + # define OPENTRACK_COMPAT_EXPORT OPENTRACK_COMPAT_LINKAGE + #endif #endif |