commit f99d7153adb01b79d71f2d5c9dadaa03195dfb97 parent 41ad9742bef85cfd42696e366a05465f8818e868 Author: Alexandre Bique <bique.alexandre@gmail.com> Date: Tue, 26 Apr 2022 15:10:16 +0200 Merge pull request #75 from jpcima/clap-export Allow CLAP_EXPORT to have a custom definition Diffstat:
M | include/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