From 84596ee94464bbd2fd8da2a288cf3b9337e0017c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 25 May 2021 09:38:31 -0400 Subject: Allow overriding PUGL_API --- include/pugl/pugl.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'include/pugl') 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 #include -#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 -- cgit v1.2.1