aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-09-18 10:36:37 -0700
committerDylan Baker <dylan@pnwbakers.com>2020-09-29 14:58:32 -0700
commitcb6ccf2632c3b09237b2bfe04687fa5d8b4c88ab (patch)
treed6ed5bf8478db5366a892a3f5efa909af25441b7 /mesonbuild/dependencies
parent7d11d7cf68f5a0379ef3b50b853cea4a3ceb0636 (diff)
downloadmeson-cb6ccf2632c3b09237b2bfe04687fa5d8b4c88ab.zip
meson-cb6ccf2632c3b09237b2bfe04687fa5d8b4c88ab.tar.gz
meson-cb6ccf2632c3b09237b2bfe04687fa5d8b4c88ab.tar.bz2
dependencies/zlib: Fix header detection
has_header returns a tuple of (found: bool, cached: bool), so `if has_header` will always return true because the tuple is non-empty. We need to check if the found value is true or not.
Diffstat (limited to 'mesonbuild/dependencies')
-rw-r--r--mesonbuild/dependencies/dev.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 67d7e65..99c5c07 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -480,7 +480,7 @@ class ZlibSystemDependency(ExternalDependency):
for lib in libs:
l = self.clib_compiler.find_library(lib, environment, [])
h = self.clib_compiler.has_header('zlib.h', '', environment, dependencies=[self])
- if l and h:
+ if l and h[0]:
self.is_found = True
self.link_args = l
break