diff options
author | David Robillard <d@drobilla.net> | 2021-05-25 09:38:31 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-05-25 09:38:31 -0400 |
commit | 84596ee94464bbd2fd8da2a288cf3b9337e0017c (patch) | |
tree | 6225362dedf3d641b1c81e6f8f8686c3ea2ffcbd /include/pugl | |
parent | 10bc9dc40a0ece26ac80b93087f0b14c69b4d8c4 (diff) | |
download | pugl-84596ee94464bbd2fd8da2a288cf3b9337e0017c.tar.gz pugl-84596ee94464bbd2fd8da2a288cf3b9337e0017c.tar.bz2 pugl-84596ee94464bbd2fd8da2a288cf3b9337e0017c.zip |
Allow overriding PUGL_API
Diffstat (limited to 'include/pugl')
-rw-r--r-- | include/pugl/pugl.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/pugl/pugl.h b/include/pugl/pugl.h index f97903e..d5fbdff 100644 --- a/include/pugl/pugl.h +++ b/include/pugl/pugl.h @@ -21,14 +21,16 @@ #include <stddef.h> #include <stdint.h> -#if defined(_WIN32) && !defined(PUGL_STATIC) && defined(PUGL_INTERNAL) -# define PUGL_API __declspec(dllexport) -#elif defined(_WIN32) && !defined(PUGL_STATIC) -# define PUGL_API __declspec(dllimport) -#elif defined(__GNUC__) -# define PUGL_API __attribute__((visibility("default"))) -#else -# define PUGL_API +#ifndef PUGL_API +# if defined(_WIN32) && !defined(PUGL_STATIC) && defined(PUGL_INTERNAL) +# define PUGL_API __declspec(dllexport) +# elif defined(_WIN32) && !defined(PUGL_STATIC) +# define PUGL_API __declspec(dllimport) +# elif defined(__GNUC__) +# define PUGL_API __attribute__((visibility("default"))) +# else +# define PUGL_API +# endif #endif #ifndef PUGL_DISABLE_DEPRECATED |