From b6b15508d599f85eca58abe40381f2699c8cfba2 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Mon, 8 Apr 2019 12:49:02 +0800 Subject: [PATCH] meson/MSVC: Copy xxx-3.lib to xxx-3.0.lib upon post-install This ensures that current Visual Studio project files and NMake Makefiles (which do not use pkg-config files) do not break with the Meson-built GTK-3.x libraries. --- build-aux/meson/post-install.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-aux/meson/post-install.py b/build-aux/meson/post-install.py index f526bc81bf..71edc4da80 100644 --- a/build-aux/meson/post-install.py +++ b/build-aux/meson/post-install.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import os +import shutil import sys import subprocess @@ -16,6 +17,14 @@ if 'DESTDIR' not in os.environ: gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules') gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends') + if os.name == 'nt': + for lib in ['gdk', 'gtk', 'gailutil']: + # Make copy for MSVC-built .lib files, e.g. xxx-3.lib->xxx-3.0.lib + installed_lib = os.path.join(gtk_libdir, lib + '-' + gtk_api_version.split('.')[0] + '.lib') + installed_lib_dst = os.path.join(gtk_libdir, lib + '-' + gtk_api_version + '.lib') + if os.path.isfile(installed_lib): + shutil.copyfile(installed_lib, installed_lib_dst) + print('Compiling GSettings schemas...') subprocess.call(['glib-compile-schemas', os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])