summaryrefslogtreecommitdiffhomepage
path: root/opentrack/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/export.hpp
parent06b68ac493f06723d123db5fa23b8c0a86ca7f66 (diff)
api, compat: backport exports fix
Diffstat (limited to 'opentrack/export.hpp')
-rw-r--r--opentrack/export.hpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/opentrack/export.hpp b/opentrack/export.hpp
new file mode 100644
index 00000000..a9f3521e
--- /dev/null
+++ b/opentrack/export.hpp
@@ -0,0 +1,28 @@
+#pragma once
+
+#ifdef BUILD_api
+# ifdef _WIN32
+# define OPENTRACK_API_LINKAGE __declspec(dllexport)
+# else
+# define OPENTRACK_API_LINKAGE
+# endif
+
+# ifndef _MSC_VER
+# define OPENTRACK_API_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_API_LINKAGE
+# else
+# define OPENTRACK_API_EXPORT OPENTRACK_API_LINKAGE
+# endif
+
+#else
+ #ifdef _WIN32
+ # define OPENTRACK_API_LINKAGE __declspec(dllimport)
+ #else
+ # define OPENTRACK_API_LINKAGE
+ #endif
+
+ #ifndef _MSC_VER
+ # define OPENTRACK_API_EXPORT __attribute__ ((visibility ("default"))) OPENTRACK_API_LINKAGE
+ #else
+ # define OPENTRACK_API_EXPORT OPENTRACK_API_LINKAGE
+ #endif
+#endif