summaryrefslogtreecommitdiffhomepage
path: root/opentrack-compat/export.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-09-20 21:24:40 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-09-20 23:24:17 +0200
commit88e4563455ca183e1b77364b73d5e6173af513d3 (patch)
treeb63fcee5e953c876886cf6c2bdeaf2738ee0c795 /opentrack-compat/export.hpp
parent06b68ac493f06723d123db5fa23b8c0a86ca7f66 (diff)
api, compat: backport exports fix
Diffstat (limited to 'opentrack-compat/export.hpp')
-rw-r--r--opentrack-compat/export.hpp22
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