ref: d2d1750e0802c1472419da1c73992eae92777d0f
parent: e8b38f899c792565de4bbb09b14f7962d441faee
author: Alexei Podtelezhnikov <[email protected]>
date: Fri Jan 12 18:01:49 EST 2018
[build] Expand dllexport/dllimport to Cygwin/MinGW. * include/freetype/config/ftconfig.h: Respect DLL_EXPORT, s/_MSC_VER/_WIN32/. * builds/unix/ftconfig.in: Replicate here. * builds/vms/ftconfig.h: Replicate here.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
2018-01-12 Alexei Podtelezhnikov <[email protected]>
+ [build] Expand dllexport/dllimport to Cygwin/MinGW.
+
+ * include/freetype/config/ftconfig.h: Respect DLL_EXPORT,
+ s/_MSC_VER/_WIN32/.
+ * builds/unix/ftconfig.in: Replicate here.
+ * builds/vms/ftconfig.h: Replicate here.
+
+2018-01-12 Alexei Podtelezhnikov <[email protected]>
+
[build] Improve and document MSVC build.
* include/freetype/config/ftconfig.h: Guard dllexport/dllimport
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -493,6 +493,17 @@
#define FT_EXPORT( x ) extern x
#endif
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( FT2_DLLIMPORT )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
#endif /* !FT_EXPORT */
--- a/builds/vms/ftconfig.h
+++ b/builds/vms/ftconfig.h
@@ -445,6 +445,17 @@
#define FT_EXPORT( x ) extern x
#endif
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllexport ) x
+#elif defined( FT2_DLLIMPORT )
+#undef FT_EXPORT
+#define FT_EXPORT( x ) __declspec( dllimport ) x
+#endif
+#endif
+
#endif /* !FT_EXPORT */
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -461,8 +461,9 @@
#define FT_EXPORT( x ) extern x
#endif
-#ifdef _MSC_VER
-#if defined( FT2_BUILD_LIBRARY ) && defined( _DLL )
+#ifdef _WIN32
+#if defined( FT2_BUILD_LIBRARY ) && \
+ ( defined( _DLL ) || defined( DLL_EXPORT ) )
#undef FT_EXPORT
#define FT_EXPORT( x ) __declspec( dllexport ) x
#elif defined( FT2_DLLIMPORT )