summaryrefslogtreecommitdiff
path: root/cairommconfig.h.meson
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-03-09 17:01:52 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-03-09 17:03:48 +0800
commitbb3baee50c4318229955bcfc35e64acd4f46aa21 (patch)
treea1f03e3adceb7aea4f78a843c59ba203802ad4c0 /cairommconfig.h.meson
parenta087e75f6738fc9e0815e647153f5f04cc37d3a4 (diff)
cairommconfig.h.*: Don't dllimport on MinGW
This will fix warnings when building items using cairomm with MinGW/GCC. Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
Diffstat (limited to 'cairommconfig.h.meson')
-rw-r--r--cairommconfig.h.meson4
1 files changed, 3 insertions, 1 deletions
diff --git a/cairommconfig.h.meson b/cairommconfig.h.meson
index 5a1e7b9..2988edc 100644
--- a/cairommconfig.h.meson
+++ b/cairommconfig.h.meson
@@ -28,8 +28,10 @@
#ifdef CAIROMM_DLL
# if defined(CAIROMM_BUILD)
# define CAIROMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define CAIROMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define CAIROMM_API
# endif
/* Build a static or non-native-Windows library */
#else