Define DLL_EXPORT and _GDK_EXTERN depending on whether we are building a shared or a static library

Static builds on Windows are only supported in the Meson build
This commit is contained in:
Luca Bacci
2022-03-03 12:04:51 +01:00
parent d5ce63508f
commit ef4e1c473c
2 changed files with 12 additions and 4 deletions

View File

@ -230,6 +230,9 @@
/* Define to the version of this package. */
#mesondefine PACKAGE_VERSION
/* Define when building a shared library for Windows */
#mesondefine DLL_EXPORT
/* Use NSBundle functions to determine load paths for libraries, translations,
etc. */
#mesondefine QUARTZ_RELOCATION

View File

@ -314,11 +314,16 @@
/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */
/* Define when building a shared library for Windows */
#define DLL_EXPORT 1
/* defines how to decorate public symbols while building */
#ifdef _MSC_VER
#define _GDK_EXTERN __declspec (dllexport) extern
#else
#define _GDK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
#ifdef DLL_EXPORT
# ifdef _MSC_VER
# define _GDK_EXTERN __declspec (dllexport) extern
# else
# define _GDK_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
# endif
#endif
/* Define for large files, on AIX-style hosts. */