summaryrefslogtreecommitdiff
path: root/gio/giommconfig.h.meson
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2021-03-08 12:01:43 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2021-03-09 15:27:16 +0800
commit6e242eaba57bbc0f44ab7c4959d2e66ceeeededa (patch)
tree736ec25cddd288afe40590d707f69590a334eec8 /gio/giommconfig.h.meson
parent8efae7518c29dd52b09968ae3e42254e3ceef178 (diff)
downloadglibmm-6e242eaba57bbc0f44ab7c4959d2e66ceeeededa.tar.gz
g[io|lib]mmconfig.h.*: Don't dllimport on MinGW
This will fix warnings when building items using glibmm and giomm with MinGW/GCC. Please see: https://gitlab.gnome.org/GNOME/gtkmm/-/issues/90
Diffstat (limited to 'gio/giommconfig.h.meson')
-rw-r--r--gio/giommconfig.h.meson4
1 files changed, 3 insertions, 1 deletions
diff --git a/gio/giommconfig.h.meson b/gio/giommconfig.h.meson
index 9ac31c6d..41232323 100644
--- a/gio/giommconfig.h.meson
+++ b/gio/giommconfig.h.meson
@@ -26,8 +26,10 @@
#ifdef GIOMM_DLL
# if defined(GIOMM_BUILD)
# define GIOMM_API __declspec(dllexport)
-# else
+# elif !defined (__GNUC__)
# define GIOMM_API __declspec(dllimport)
+# else /* don't dllimport classes/methods on GCC/MinGW */
+# define GIOMM_API
# endif
/* Build a static library or non-native-Windows library */
#else