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.
@@ -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,
