Add libzita-resampler as lib
[ardour.git] / libs / zita-resampler / zita-resampler / zresampler_visibility.h
diff --git a/libs/zita-resampler/zita-resampler/zresampler_visibility.h b/libs/zita-resampler/zita-resampler/zresampler_visibility.h
new file mode 100644 (file)
index 0000000..6ebfee9
--- /dev/null
@@ -0,0 +1,32 @@
+#ifndef __libzreampler_visibility_h__
+#define __libzreampler_visibility_h__
+
+#if defined(COMPILER_MSVC)
+  #define LIBZRESAMPLER_DLL_IMPORT __declspec(dllimport)
+  #define LIBZRESAMPLER_DLL_EXPORT __declspec(dllexport)
+  #define LIBZRESAMPLER_DLL_LOCAL
+#else
+  #define LIBZRESAMPLER_DLL_IMPORT __attribute__ ((visibility ("default")))
+  #define LIBZRESAMPLER_DLL_EXPORT __attribute__ ((visibility ("default")))
+  #define LIBZRESAMPLER_DLL_LOCAL  __attribute__ ((visibility ("hidden")))
+#endif
+
+#ifdef LIBZRESAMPLER_STATIC // libzita-reampler is a DLL
+  #define LIBZRESAMPLER_API
+  #define LIBZRESAMPLER_LOCAL
+  #define LIBZRESAMPLER_TEMPLATE_API
+  #define LIBZRESAMPLER_TEMPLATE_MEMBER_API
+#else
+  #ifdef LIBZRESAMPLER_DLL_EXPORTS // defined if we are building the libzita-resampler DLL (instead of using it)
+    #define LIBZRESAMPLER_API LIBZRESAMPLER_DLL_EXPORT
+    #define LIBZRESAMPLER_TEMPLATE_API LIBZRESAMPLER_TEMPLATE_DLL_EXPORT
+    #define LIBZRESAMPLER_TEMPLATE_MEMBER_API LIBZRESAMPLER_TEMPLATE_MEMBER_DLL_EXPORT
+  #else
+    #define LIBZRESAMPLER_API LIBZRESAMPLER_DLL_IMPORT
+    #define LIBZRESAMPLER_TEMPLATE_API LIBZRESAMPLER_TEMPLATE_DLL_IMPORT
+    #define LIBZRESAMPLER_TEMPLATE_MEMBER_API LIBZRESAMPLER_TEMPLATE_MEMBER_DLL_IMPORT
+  #endif
+  #define LIBZRESAMPLER_LOCAL LIBZRESAMPLER_DLL_LOCAL
+#endif
+
+#endif