From 705612f7cf2a757cc7f8b056b330cce47f9ed0de Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 17 Jan 2017 13:34:37 +0530 Subject: [PATCH] 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". --- mesonbuild/dependencies.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index e583044c9..3f10972b4 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}>'