pkgdep: Print found message after setting cargs/libs

Fetching cflags and libs can also fail if, for instance, the pkg-config
file for a dependency needed by this package isn't found. Without this,
we will print "Found: YES" and then "Found: NO".
pull/1312/head
Nirbheek Chauhan 8 years ago
parent 2d31851d3b
commit 705612f7cf
  1. 6
      mesonbuild/dependencies.py

@ -173,12 +173,14 @@ class PkgConfigDependency(Dependency):
raise DependencyException(m.format(name, not_found, self.modversion))
return
found_msg += [mlog.green('YES'), self.modversion]
if not self.silent:
mlog.log(*found_msg)
# Fetch cargs to be used while using this dependency
self._set_cargs()
# Fetch the libraries and library paths needed for using this
self._set_libs()
# Print the found message only at the very end because fetching cflags
# and libs can also fail if other needed pkg-config files aren't found.
if not self.silent:
mlog.log(*found_msg)
def __repr__(self):
s = '<{0} {1}: {2} {3}>'

Loading…
Cancel
Save