diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-17 13:34:37 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-01-17 15:39:02 +0530 |
commit | 705612f7cf2a757cc7f8b056b330cce47f9ed0de (patch) | |
tree | e09187656660dfdf257d8071d874e98a3657fa5d | |
parent | 2d31851d3b21f5a377f59fe1c1afa4294ce9167e (diff) | |
download | meson-705612f7cf2a757cc7f8b056b330cce47f9ed0de.zip meson-705612f7cf2a757cc7f8b056b330cce47f9ed0de.tar.gz meson-705612f7cf2a757cc7f8b056b330cce47f9ed0de.tar.bz2 |
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".
-rw-r--r-- | mesonbuild/dependencies.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index e583044..3f10972 100644 --- a/mesonbuild/dependencies.py +++ b/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}>' |