aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2017-06-10 20:33:33 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2017-06-29 14:20:35 +0530
commit9593adecb9fdd90586d33508af4fbe3c657c155e (patch)
tree913841765b409c466c361d35b72de25096bd18db
parentdefcea7fb517f555e7c877c9d1208a1cbbbf3c29 (diff)
downloadmeson-9593adecb9fdd90586d33508af4fbe3c657c155e.zip
meson-9593adecb9fdd90586d33508af4fbe3c657c155e.tar.gz
meson-9593adecb9fdd90586d33508af4fbe3c657c155e.tar.bz2
Skip handling non-available dependencies
This way, an optional dependency can always be added on Vala targets without meson adding --pkg
-rw-r--r--mesonbuild/backend/backends.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 1dd128b..95b0026 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -429,6 +429,9 @@ class Backend:
# NOTE: We must preserve the order in which external deps are
# specified, so we reverse the list before iterating over it.
for dep in reversed(target.get_external_deps()):
+ if not dep.found():
+ continue
+
if compiler.language == 'vala':
if isinstance(dep, dependencies.PkgConfigDependency):
if dep.name == 'glib-2.0' and dep.version_reqs is not None: