From 79f66268676ec8bf94c6964a555ecc9144daca8e Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
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/modules/gnome.py | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'mesonbuild/modules')

diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py
index 6d05b4e..af3073f 100644
--- a/mesonbuild/modules/gnome.py
+++ b/mesonbuild/modules/gnome.py
@@ -162,6 +162,9 @@ can not be used with the current version of glib-compiled-resources, due to
             kwargs['depfile'] = depfile
             kwargs['command'] = copy.copy(cmd) + ['--dependency-file', '@DEPFILE@']
         target_c = build.CustomTarget(name, state.subdir, kwargs)
+        # Used in backend/ninjabackend.py:generate_vala_compile() to pass
+        # --gresources to valac when GResources are used in Vala targets
+        target_c.gresource_c_output = True
 
         if gresource: # Only one target for .gresource files
             return [target_c]
-- 
cgit v1.1