diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-03-05 16:01:13 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2020-03-07 23:22:32 +0800 |
commit | d84be37aaa335e57bb6fe7de6bf4be736652a60d (patch) | |
tree | 48a6efc940aa127f762f0168ba0a9234c7ae4d39 /glib/glibmmconfig.h.in | |
parent | b55811ea37fc26f6815a18a4d6dc24dae78354fb (diff) | |
download | glibmm-d84be37aaa335e57bb6fe7de6bf4be736652a60d.tar.gz |
build: Do not use gendef.exe for glibmm
Clean up the build files a bit and update the glibmmconfig.h.[in|meson] so that
we use __declspec(dllexport) when GLIBMM_BUILD is defined (i.e. during the
build of glibmm) on Visual Studio.
Also, for the meson builds, disable warnings 4251 and 4275 as they all relate
to building DLLs regarding symbol export, which is harmless as we know clearly
that we are indeed building DLLs in our case, and we have already set
GLIBMM_API appropriately
Diffstat (limited to 'glib/glibmmconfig.h.in')
-rw-r--r-- | glib/glibmmconfig.h.in | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/glib/glibmmconfig.h.in b/glib/glibmmconfig.h.in index 56e7a42e..aa158038 100644 --- a/glib/glibmmconfig.h.in +++ b/glib/glibmmconfig.h.in @@ -107,15 +107,12 @@ #endif #ifdef GLIBMM_DLL -# if defined(GLIBMM_BUILD) && defined(_WINDLL) - /* Do not dllexport as it is handled by gendef on MSVC */ -# define GLIBMM_API -# elif !defined(GLIBMM_BUILD) -# define GLIBMM_API __declspec(dllimport) +# if defined(GLIBMM_BUILD) +# define GLIBMM_API __declspec(dllexport) # else - /* Build a static library */ -# define GLIBMM_API -# endif /* GLIBMM_BUILD - _WINDLL */ +# define GLIBMM_API __declspec(dllimport) +# endif +/* Build a static or non-native-Windows library */ #else # define GLIBMM_API #endif /* GLIBMM_DLL */ |