[gtksourceviewmm/nmake-3-18: 2/6] gtksourceviewmmcofig.h.in: Add DLL export/import macros
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm/nmake-3-18: 2/6] gtksourceviewmmcofig.h.in: Add DLL export/import macros
- Date: Fri, 28 Aug 2020 08:59:11 +0000 (UTC)
commit 19dbd83a893d6bc4d4315415f20c0cbbfbd19148
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Aug 28 16:34:51 2020 +0800
gtksourceviewmmcofig.h.in: Add DLL export/import macros
This is so that if we have a new-enough glibmm available, we can use compiler
directives to export symbols with Visual Studio (and clang-cl) builds, without
the need of tools like gendef.exe
gtksourceview/gtksourceviewmmconfig.h.in | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
---
diff --git a/gtksourceview/gtksourceviewmmconfig.h.in b/gtksourceview/gtksourceviewmmconfig.h.in
index d428e4d..abe97c9 100644
--- a/gtksourceview/gtksourceviewmmconfig.h.in
+++ b/gtksourceview/gtksourceviewmmconfig.h.in
@@ -15,5 +15,22 @@
/* Micro version number of gtksourceviewmm. */
#undef GTKSOURCEVIEWMM_MICRO_VERSION
+/* Enable DLL-specific stuff only when not building a static library nor using gendef. */
+#if !defined(__CYGWIN__) && defined(_WIN32) && \
+ !defined(GTKSOURCEVIEWMM_STATIC_LIB) && !defined(GTKSOURCEVIEWMM_USE_GENDEF)
+# define GTKSOURCEVIEWMM_DLL 1
+#endif
+
+#ifdef GTKSOURCEVIEWMM_DLL
+# ifdef GTKSOURCEVIEWMM_BUILD
+# define GTKSOURCEVIEWMM_API __declspec(dllexport)
+# else
+# define GTKSOURCEVIEWMM_API __declspec(dllimport)
+# endif /* GTKSOURCEVIEWMM_BUILD */
+#else
+/* Build a static library or a non-native-Windows library */
+# define GTKSOURCEVIEWMM_API
+#endif /* GTKSOURCEVIEWMM_DLL */
+
#endif /* _GTKSOURCEVIEWMM_CONFIG_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]