From 7aed29e2c33d60fee5f6bac89bd17aaf6b770b04 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 10 Aug 2017 02:52:45 +0530 Subject: gnome: Fix parsing of resource custom target files gnome.compile_resources() was not parsing custom target sources properly. It was using the custom target name as the output of the custom target instead of looking at the list of outputs. Also modify the GNOME framework test to expose this. --- mesonbuild/modules/gnome.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'mesonbuild/modules') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 685a86b..f4329d9 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -259,21 +259,28 @@ class GnomeModule(ExtensionModule): if hasattr(dep, 'held_object'): dep = dep.held_object if isinstance(dep, mesonlib.File): - if dep.fname == missing_basename: - found = True - dep_files.remove(missing) - dep_files.append(dep) - subdirs.append(dep.subdir) - break + if dep.fname != missing_basename: + continue + found = True + dep_files.remove(missing) + dep_files.append(dep) + subdirs.append(dep.subdir) + break elif isinstance(dep, build.CustomTarget): - if dep.get_basename() == missing_basename: + fname = None + outputs = {(o, os.path.basename(o)) for o in dep.get_outputs()} + for o, baseo in outputs: + if baseo == missing_basename: + fname = o + break + if fname is not None: found = True dep_files.remove(missing) dep_files.append( mesonlib.File( is_built=True, subdir=dep.get_subdir(), - fname=dep.get_basename())) + fname=fname)) depends.append(dep) subdirs.append(dep.get_subdir()) break -- cgit v1.1