diff options
-rw-r--r-- | cairommconfig.h.in | 18 | ||||
-rw-r--r-- | cairommconfig.h.meson | 18 |
2 files changed, 36 insertions, 0 deletions
diff --git a/cairommconfig.h.in b/cairommconfig.h.in index f88ed99..f01a2e9 100644 --- a/cairommconfig.h.in +++ b/cairommconfig.h.in @@ -11,3 +11,21 @@ /* Micro version number of cairomm. */ #undef CAIROMM_MICRO_VERSION + +/* Enable DLL-specific stuff only when not building a static library */ +#if !defined(__CYGWIN__) && \ + (defined(__MINGW32__) || defined (_MSC_VER)) && \ + !defined(CAIROMM_STATIC_LIB) +# define CAIROMM_DLL 1 +#endif + +#ifdef CAIROMM_DLL +# if defined(CAIROMM_BUILD) +# define CAIROMM_API __declspec(dllexport) +# else +# define CAIROMM_API __declspec(dllimport) +# endif +/* Build a static or non-native-Windows library */ +#else +# define CAIROMM_API +#endif /* CAIROMM_DLL */ diff --git a/cairommconfig.h.meson b/cairommconfig.h.meson index 8923c96..5a1e7b9 100644 --- a/cairommconfig.h.meson +++ b/cairommconfig.h.meson @@ -18,4 +18,22 @@ /* Micro version number of cairomm. */ #mesondefine CAIROMM_MICRO_VERSION +/* Enable DLL-specific stuff only when not building a static library */ +#if !defined(__CYGWIN__) && \ + (defined(__MINGW32__) || defined (_MSC_VER)) && \ + !defined(CAIROMM_STATIC_LIB) +# define CAIROMM_DLL 1 +#endif + +#ifdef CAIROMM_DLL +# if defined(CAIROMM_BUILD) +# define CAIROMM_API __declspec(dllexport) +# else +# define CAIROMM_API __declspec(dllimport) +# endif +/* Build a static or non-native-Windows library */ +#else +# define CAIROMM_API +#endif /* CAIROMM_DLL */ + #endif /* _CAIROMM_CONFIG_H */ |