From 0626465ea8aa65b10776d5c4064e881fe0d6fa25 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Tue, 26 Jan 2021 13:51:23 -0500 Subject: Fix executable as script on Windows On Windows this would fail because of missing DLL: ``` mylib = library(...) exe = executable(..., link_with: mylib) meson.add_install_script(exe) ``` The reason is on Windows we cannot rely on rpath to find libraries from build directory, they are searched in $PATH. We already have all that mechanism in place for custom_target() using ExecutableSerialisation class, so reuse it for install/dist/postconf scripts too. This has bonus side effect to also use exe_wrapper for those scripts. Fixes: #8187 --- mesonbuild/modules/gnome.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/modules/gnome.py') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 5cad9f5..f564eb4 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -899,7 +899,7 @@ class GnomeModule(ExtensionModule): args.append('--media=' + '@@'.join(media)) if langs: args.append('--langs=' + '@@'.join(langs)) - inscript = build.RunScript(script, args) + inscript = state.backend.get_executable_serialisation(script + args) potargs = state.environment.get_build_command() + [ '--internal', 'yelphelper', 'pot', @@ -1051,7 +1051,7 @@ class GnomeModule(ExtensionModule): self.interpreter.add_test(state.current_node, check_args, check_kwargs, True) res = [custom_target, alias_target] if kwargs.get('install', True): - res.append(build.RunScript(command, args)) + res.append(state.backend.get_executable_serialisation(command + args)) return ModuleReturnValue(custom_target, res) def _get_build_args(self, kwargs, state, depends): -- cgit v1.1