aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-10-28 10:53:26 -0700
committerXavier Claessens <xclaesse@gmail.com>2021-10-28 17:39:24 -0400
commitb7a3457765409a645686cba70a366ae11b3e9078 (patch)
treee7fa507382cf06119fea8c97375e2ad127c99185
parenta077aaad998a70ba997822d077bc97b08e5099a7 (diff)
downloadmeson-b7a3457765409a645686cba70a366ae11b3e9078.zip
meson-b7a3457765409a645686cba70a366ae11b3e9078.tar.gz
meson-b7a3457765409a645686cba70a366ae11b3e9078.tar.bz2
modules/gnome: fix missing install_dir, again, harder
It turns out this could be missing in GResource*Target as well, due mostly to the same problem, side effects of mutating a shared dictionary; though it could also happen with a specific set of keywords given and other omitted. Fixes #9350
-rw-r--r--mesonbuild/modules/gnome.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 38dc5f7..14b04b3 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -278,18 +278,20 @@ class GnomeModule(ExtensionModule):
if install_header and not export:
raise MesonException('GResource header is installed yet export is not enabled')
- kwargs['input'] = args[1]
- kwargs['output'] = output
- kwargs['depends'] = depends
+ c_kwargs = kwargs.copy()
+ c_kwargs['input'] = args[1]
+ c_kwargs['output'] = output
+ c_kwargs['depends'] = depends
+ c_kwargs.setdefault('install_dir', [])
if not mesonlib.version_compare(glib_version, gresource_dep_needed_version):
# This will eventually go out of sync if dependencies are added
- kwargs['depend_files'] = depend_files
- kwargs['command'] = cmd
+ c_kwargs['depend_files'] = depend_files
+ c_kwargs['command'] = cmd
else:
depfile = f'{output}.d'
- kwargs['depfile'] = depfile
- kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@']
- target_c = GResourceTarget(name, state.subdir, state.subproject, kwargs)
+ c_kwargs['depfile'] = depfile
+ c_kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@']
+ target_c = GResourceTarget(name, state.subdir, state.subproject, c_kwargs)
if gresource: # Only one target for .gresource files
return ModuleReturnValue(target_c, [target_c])