From 79f66268676ec8bf94c6964a555ecc9144daca8e Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Wed, 14 Dec 2016 22:03:56 +0530 Subject: Pass --gresources to valac for each compiled gresource Without this, the user has to both compile the resource with gnome.compile_resources, pass that to the target sources, and also pass --gresources=/path/to/gres.xml to vala_args in the target. With this, we will do that automatically. --- mesonbuild/backend/ninjabackend.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mesonbuild/backend/ninjabackend.py') diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 0516829..fa71ae5 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1032,6 +1032,11 @@ int dummy; args += ['--pkg', d.name] elif isinstance(d, dependencies.ExternalLibrary): args += d.get_lang_args('vala') + # Detect gresources and add --gresources arguments for each + for (gres, gensrc) in other_src[1].items(): + if hasattr(gensrc, 'gresource_c_output'): + gres_xml, = self.get_custom_target_sources(gensrc) + args += ['--gresources=' + gres_xml] extra_args = [] for a in target.extra_args.get('vala', []): -- cgit v1.1