gnome: search the build directory when scanning resources

When scanning for the dependencies of a resource file, which is only
needed with glib older than 2.51.1, the first --sourcedir is documented
as "Current build dir" but is actually relative to the source directory,
which is the working directory of the command.

Search the build directory of the current meson.build and of each
user-specified directory before the corresponding source directory, as
the comment intended.
This commit is contained in:
Paolo Bonzini authored and Paolo Bonzini committed 2026-10-30 19:32:29 +01:00
1 parent 83fba12da2
commit 06fec0aafb
1 file changed
+3 -3
+3 -3
View File
@@ -578,9 +578,9 @@ class GnomeModule(ExtensionModule):
input_file,
'--generate-dependencies']
# Prefer generated files over source files
cmd += ['--sourcedir', state.subdir] # Current build dir
for source_dir in source_dirs:
for source_dir in ['', *source_dirs]:
# Prefer generated files over source files.
cmd += ['--sourcedir', os.path.join(state.environment.get_build_dir(), state.current_build_dir, source_dir)]
cmd += ['--sourcedir', os.path.join(state.subdir, source_dir)]
try: