summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-03-09 12:32:17 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-03-12 14:38:26 +0800
commit9da42cd92b1f2d219a4321734927e47fa4c04b92 (patch)
tree4ef248258dba234d1d64d6f2f9b4d803d1f33731
parent7c591f99a095829cfe83f03497f3388f1b51a6d0 (diff)
downloadglibmm-9da42cd92b1f2d219a4321734927e47fa4c04b92.tar.gz
meson: Do not allow static MSVC-style builds
The Visual Studio build files never really supported static builds, so disallow that for now, until we can make sure that is tested better.
-rw-r--r--glib/meson.build11
1 files changed, 10 insertions, 1 deletions
diff --git a/glib/meson.build b/glib/meson.build
index 1b918c00..99c43772 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -32,7 +32,16 @@ pkg_conf_data.set('GLIBMM_MICRO_VERSION', glibmm_micro_version)
pkg_conf_data.set('GIOMM_MAJOR_VERSION', glibmm_major_version)
pkg_conf_data.set('GIOMM_MINOR_VERSION', glibmm_minor_version)
pkg_conf_data.set('GIOMM_MICRO_VERSION', glibmm_micro_version)
-if get_option('default_library') == 'static'
+
+library_build_type = get_option('default_library')
+
+if cpp_compiler.get_argument_syntax() == 'msvc'
+ if library_build_type == 'static' or library_build_type == 'both'
+ error('Static builds are not supported by MSVC-style builds')
+ endif
+endif
+
+if library_build_type == 'static'
pkg_conf_data.set('GLIBMM_STATIC_LIB', 1)
pkg_conf_data.set('GIOMM_STATIC_LIB', 1)
endif