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.
pull/7757/head
Dylan Baker 4 years ago
parent 7d11d7cf68
commit cb6ccf2632
  1. 2
      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

Loading…
Cancel
Save