diff options
author | Robin Gareus <robin@gareus.org> | 2017-09-16 15:34:11 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-09-16 18:31:54 +0200 |
commit | eb71eddbc81f868343764bcf6383d590b67600dd (patch) | |
tree | 91838664c5484fdff7b9b6acd1ee2844282d2465 /libs/zita-resampler/zita-resampler/zresampler_visibility.h | |
parent | f53cec1d8fad264fdbc4ecd0e444715d2440c0b9 (diff) |
Add libzita-resampler as lib
This simplifies x-compiling and x-platform builds as well
allows to statically link, if needed.
Diffstat (limited to 'libs/zita-resampler/zita-resampler/zresampler_visibility.h')
-rw-r--r-- | libs/zita-resampler/zita-resampler/zresampler_visibility.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libs/zita-resampler/zita-resampler/zresampler_visibility.h b/libs/zita-resampler/zita-resampler/zresampler_visibility.h new file mode 100644 index 0000000000..6ebfee9a9e --- /dev/null +++ b/libs/zita-resampler/zita-resampler/zresampler_visibility.h @@ -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 |