aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-14 22:03:56 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-15 04:12:23 +0530
commit79f66268676ec8bf94c6964a555ecc9144daca8e (patch)
tree26807f1e9e3572429ddd8995b3f1287ae6f8f57e /mesonbuild/backend/ninjabackend.py
parent807a53c6fc2e4e4fad12f4f4b6f1343eea30e9c7 (diff)
downloadmeson-79f66268676ec8bf94c6964a555ecc9144daca8e.zip
meson-79f66268676ec8bf94c6964a555ecc9144daca8e.tar.gz
meson-79f66268676ec8bf94c6964a555ecc9144daca8e.tar.bz2
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.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py5
1 files changed, 5 insertions, 0 deletions
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', []):