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-09 12:32:17 +0800
commit78868229b404a1cf52a7bebd57dab59a4a85f5a3 (patch)
tree8e84ef76062471887d6695836480f8d855d44984
parent1f006eef387a519abfff9392dd158332fbac390d (diff)
downloadglibmm-78868229b404a1cf52a7bebd57dab59a4a85f5a3.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 bf9141c7..7b810d3a 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