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.
This commit is contained in:
Dylan Baker 2020-09-18 10:36:37 -07:00
parent 7d11d7cf68
commit cb6ccf2632
1 changed files with 1 additions and 1 deletions

View File

@ -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