aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarvin Scholz <epirat07@gmail.com>2019-07-15 12:10:57 +0200
committerNirbheek Chauhan <nirbheek@centricular.com>2019-11-07 17:52:44 +0530
commit2bba7d4e360552f9d2b9a4eb77507be743c90727 (patch)
tree48efde6b984abdf58ef3e0401c9f620fde9debaa
parent49d20a51c2f2389fd27c6a5122a8fe2b0227d8f1 (diff)
downloadmeson-2bba7d4e360552f9d2b9a4eb77507be743c90727.zip
meson-2bba7d4e360552f9d2b9a4eb77507be743c90727.tar.gz
meson-2bba7d4e360552f9d2b9a4eb77507be743c90727.tar.bz2
dependencies/pkgconfig: Fix found state ignoring errors
Previously even when meson failed to obtain cflags or libs for a dependency it would lead to the dependency being found, causing very confusing errors at build time.
-rw-r--r--mesonbuild/dependencies/base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/dependencies/base.py b/mesonbuild/dependencies/base.py
index 3bdc413..19b61bd 100644
--- a/mesonbuild/dependencies/base.py
+++ b/mesonbuild/dependencies/base.py
@@ -649,6 +649,8 @@ class PkgConfigDependency(ExternalDependency):
if ret != 0:
return
+ self.is_found = True
+
try:
# Fetch cargs to be used while using this dependency
self._set_cargs()
@@ -663,8 +665,6 @@ class PkgConfigDependency(ExternalDependency):
self.is_found = False
self.reason = e
- self.is_found = True
-
def __repr__(self):
s = '<{0} {1}: {2} {3}>'
return s.format(self.__class__.__name__, self.name, self.is_found,