aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-14 22:13:38 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-15 04:12:23 +0530
commite6f48a03fc989119bb56ea5c7b748f99f0404b5b (patch)
tree513eeafe3c392ae4b01f7c844238b5f735b0e582 /mesonbuild/backend/ninjabackend.py
parent330d9ba7fef6e3a9994eab66139af601741df379 (diff)
downloadmeson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.zip
meson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.tar.gz
meson-e6f48a03fc989119bb56ea5c7b748f99f0404b5b.tar.bz2
Allow all code to access module target classes
It is often useful to be able to check if a specific object is of a type defined in a module. To that end, define all such targets in modules/__init__.py so that everyone can refer to them without poking into module-specific code.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index fa71ae5..ec46933 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -13,6 +13,7 @@
# limitations under the License.
from . import backends
+from .. import modules
from .. import environment, mesonlib
from .. import build
from .. import mlog
@@ -1034,7 +1035,7 @@ int dummy;
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'):
+ if isinstance(gensrc, modules.GResourceTarget):
gres_xml, = self.get_custom_target_sources(gensrc)
args += ['--gresources=' + gres_xml]
extra_args = []