clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit 769d1dd3815a607841ffafaddda854aa98043dd8
parent 92205009872f5e9ba3601650a706d1219e4c74d3
Author: Jean Pierre Cimalando <jp-dev@inbox.ru>
Date:   Mon, 25 Apr 2022 18:37:00 +0200

Allow CLAP_EXPORT to have a custom definition

Diffstat:
Minclude/clap/private/macros.h | 22++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/include/clap/private/macros.h b/include/clap/private/macros.h @@ -1,17 +1,19 @@ #pragma once // Define CLAP_EXPORT -#if defined _WIN32 || defined __CYGWIN__ -# ifdef __GNUC__ -# define CLAP_EXPORT __attribute__((dllexport)) +#if !defined(CLAP_EXPORT) +# if defined _WIN32 || defined __CYGWIN__ +# ifdef __GNUC__ +# define CLAP_EXPORT __attribute__((dllexport)) +# else +# define CLAP_EXPORT __declspec(dllexport) +# endif # else -# define CLAP_EXPORT __declspec(dllexport) -# endif -#else -# if __GNUC__ >= 4 || defined(__clang__) -# define CLAP_EXPORT __attribute__((visibility("default"))) -# else -# define CLAP_EXPORT +# if __GNUC__ >= 4 || defined(__clang__) +# define CLAP_EXPORT __attribute__((visibility("default"))) +# else +# define CLAP_EXPORT +# endif # endif #endif