diff options
author | David Robillard <d@drobilla.net> | 2022-12-19 18:52:32 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-12-19 18:53:00 -0500 |
commit | 3a9b8e38a146dfdbb618d95f6db8fa919fa2e3e6 (patch) | |
tree | 697947ff40deb30cb307831bd974934733de5cc2 /include/lilv | |
parent | 43bca31ffca22a3ff67df8cf10cb1f0fb543a266 (diff) | |
download | lilv-3a9b8e38a146dfdbb618d95f6db8fa919fa2e3e6.tar.gz lilv-3a9b8e38a146dfdbb618d95f6db8fa919fa2e3e6.tar.bz2 lilv-3a9b8e38a146dfdbb618d95f6db8fa919fa2e3e6.zip |
Allow LILV_API to be defined by the user
Diffstat (limited to 'include/lilv')
-rw-r--r-- | include/lilv/lilv.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/lilv/lilv.h b/include/lilv/lilv.h index ae2c055..b863a14 100644 --- a/include/lilv/lilv.h +++ b/include/lilv/lilv.h @@ -14,14 +14,17 @@ #include <stdint.h> #include <stdio.h> -#if defined(_WIN32) && !defined(LILV_STATIC) && defined(LILV_INTERNAL) -# define LILV_API __declspec(dllexport) -#elif defined(_WIN32) && !defined(LILV_STATIC) -# define LILV_API __declspec(dllimport) -#elif defined(__GNUC__) -# define LILV_API __attribute__((visibility("default"))) -#else -# define LILV_API +// LILV_API must be used to decorate things in the public API +#ifndef LILV_API +# if defined(_WIN32) && !defined(LILV_STATIC) && defined(LILV_INTERNAL) +# define LILV_API __declspec(dllexport) +# elif defined(_WIN32) && !defined(LILV_STATIC) +# define LILV_API __declspec(dllimport) +# elif defined(__GNUC__) +# define LILV_API __attribute__((visibility("default"))) +# else +# define LILV_API +# endif #endif #if defined(__GNUC__) && \ |