summaryrefslogtreecommitdiff
path: root/libs/lua/lua/liblua_visibility.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-04-04 13:42:50 +0200
committerRobin Gareus <robin@gareus.org>2016-04-04 13:42:50 +0200
commit8d26a67ddd855ba1461501b315bf4e917cbaad9d (patch)
treed927fa259d8b6343844554c776a7da2573694b3f /libs/lua/lua/liblua_visibility.h
parent1feb50b2b2df1626ffabeba7191915d8f18dd287 (diff)
liblua visibility and compiler-flags
Diffstat (limited to 'libs/lua/lua/liblua_visibility.h')
-rw-r--r--libs/lua/lua/liblua_visibility.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/libs/lua/lua/liblua_visibility.h b/libs/lua/lua/liblua_visibility.h
new file mode 100644
index 0000000000..494f936e50
--- /dev/null
+++ b/libs/lua/lua/liblua_visibility.h
@@ -0,0 +1,35 @@
+#ifndef __liblua_visibility_h__
+#define __liblua_visibility_h__
+
+#if defined(COMPILER_MSVC)
+# define LIBLUA_DLL_IMPORT __declspec(dllimport)
+# define LIBLUA_DLL_EXPORT __declspec(dllexport)
+# define LIBLUA_DLL_LOCAL
+#else
+# define LIBLUA_DLL_IMPORT __attribute__ ((visibility ("default")))
+# define LIBLUA_DLL_EXPORT __attribute__ ((visibility ("default")))
+# define LIBLUA_DLL_LOCAL __attribute__ ((visibility ("hidden")))
+#endif
+
+
+#ifdef COMPILER_MSVC
+// MSVC: build liblua as DLL
+# define LIBLUA_BUILD_AS_DLL
+#else
+// others currently use a static lib (incl. with libardour)
+# define LIBLUA_STATIC
+#endif
+
+
+#ifdef LIBLUA_STATIC
+# define LIBLUA_API
+#else
+// define when building the DLL (instead of using it)
+# ifdef LIBLUA_DLL_EXPORTS
+# define LIBLUA_API LIBLUA_DLL_EXPORT
+# else
+# define LIBLUA_API LIBLUA_DLL_IMPORT
+# endif
+#endif
+
+#endif /* __liblua_visibility_h__ */