[gtkmm/use-dllexport-3-24: 2/9] gdk/gdkmmconfig.h.in: Add GDKMM_API
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm/use-dllexport-3-24: 2/9] gdk/gdkmmconfig.h.in: Add GDKMM_API
- Date: Wed, 6 May 2020 09:53:32 +0000 (UTC)
commit 27214248df8df6c6eb7e89a8a17366c4aac8a574
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Apr 10 17:37:55 2020 +0800
gdk/gdkmmconfig.h.in: Add GDKMM_API
This enables us to use this macros later in public headers so that we
can export symbols from the DLLs using compiler directives, instead of
gendef, if we marked classes and APIs/methods sufficiently.
gdk/gdkmmconfig.h.in | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/gdk/gdkmmconfig.h.in b/gdk/gdkmmconfig.h.in
index db0076f0..785fe39d 100644
--- a/gdk/gdkmmconfig.h.in
+++ b/gdk/gdkmmconfig.h.in
@@ -15,4 +15,21 @@
/* Minor version number of gdkmm. */
#undef GDKMM_MINOR_VERSION
+/* Enable DLL-specific stuff only when not building a static library nor using gendef. */
+#if !defined(__CYGWIN__) && defined(_WIN32) && \
+ !defined(GDKMM_STATIC_LIB) && !defined(GDKMM_USE_GENDEF)
+# define GDKMM_DLL 1
+#endif
+
+#ifdef GDKMM_DLL
+# ifdef GDKMM_BUILD
+# define GDKMM_API __declspec(dllexport)
+# else
+# define GDKMM_API __declspec(dllimport)
+# endif /* GDKMM_BUILD */
+#else
+/* Build a static library or a non-native-Windows library */
+# define GDKMM_API
+#endif /* GDKMM_DLL */
+
#endif /* !_GDKMM_CONFIG_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]