diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-07-30 15:40:47 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2021-07-30 23:37:33 +0800 |
commit | 3346d68311048562c0fd3b237d6fec3dd53fe75b (patch) | |
tree | ee0f704fc2de0b765b8d4b78c3771fe1ecdf6e49 | |
parent | cc6ecc8b623a776e4c5e5c8001a02cf92ed5c5d9 (diff) | |
download | gtk+-vs2013-meson.tar.gz |
build: Check for Meson 0.59.0+ for pre-VS2015 Update 2vs2013-meson
Meson 0.59.0 added support for `link_whole:` for pre-Visual Studio 2015 Update
2, so clean things up a bit by just checking for and requiring people to
use Meson 0.59.0 if building with pre-Visual Studio 2015 Update 2.
This reverts commit 943559da671fa7db29f7659fc8a216edeeacfda5.
-rw-r--r-- | gtk/meson.build | 19 | ||||
-rw-r--r-- | meson.build | 3 |
2 files changed, 4 insertions, 18 deletions
diff --git a/gtk/meson.build b/gtk/meson.build index 18fbe6ac61..84ff494e08 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -1117,28 +1117,11 @@ libgtk_static = static_library('gtk', link_with: [libgtk_css, libgdk, libgsk ], ) -# `link_whole:` is actually only supported on Visual Studio 2015 Update 2 -# or later via the linker flag `/WHOLEARCHIVE:<static_lib>`, so we need -# to work around it for Visual Studio 2013. Note that all needed static -# libs are required so that we grab the object files from each of them to -# link the final GTK DLL. -whole_archives = [] -gtk4_objs = [] - -if cc.get_id() == 'msvc' and cc.version().split('.').get(0) < '19' - foreach target : [ libgtk_static, libgtk_css, libgdk, libgdk_win32, libgsk, libgsk_f16c ] - gtk4_objs += target.extract_all_objects(recursive: false) - endforeach -else - whole_archives = [libgtk_static, libgtk_css, libgdk, libgsk ] -endif - libgtk = shared_library('gtk-4', c_args: gtk_cargs + common_cflags, include_directories: [confinc, gdkinc, gskinc, gtkinc], dependencies: gtk_deps + [libgtk_css_dep, libgdk_dep, libgsk_dep], - link_whole: whole_archives, - objects: gtk4_objs, + link_whole: [libgtk_static, libgtk_css, libgdk, libgsk ], link_args: common_ldflags, soversion: gtk_soversion, version: gtk_library_version, diff --git a/meson.build b/meson.build index 5a19806e55..b09f764aa6 100644 --- a/meson.build +++ b/meson.build @@ -243,6 +243,9 @@ endif # Compiler flags if cc.get_id() == 'msvc' + if cc.version().version_compare('<19.00.23918') and meson.version().version_compare('<0.59.0') + error('Meson 0.59.0 or later is required for building with pre-Visual Studio 2015 Update 2') + endif # Compiler options taken from msvc_recommended_pragmas.h # in GLib, based on _Win32_Programming_ by Rector and Newcomer test_cflags = [ |