aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2021-11-15 21:48:02 -0600
committerEli Schwartz <eschwartz93@gmail.com>2021-11-20 23:54:33 -0500
commite67c07c0063e3513b8b304e481400f05722e1de5 (patch)
treed14dfc62f25171c36128cb9f4da68caa724da94f
parentfae7a70292556e395b9864d7ee0626d37b40fc69 (diff)
downloadmeson-e67c07c0063e3513b8b304e481400f05722e1de5.zip
meson-e67c07c0063e3513b8b304e481400f05722e1de5.tar.gz
meson-e67c07c0063e3513b8b304e481400f05722e1de5.tar.bz2
dependencies/zlib: Allow for generic OS checks
Contrary to most system method checks, zlib currently functions as a whitelist of OSes. This isn't really needed however. The first special case for OSes that provide zlib as part of the base OS is worth keeping. However, the elif for windows is more than generic enough to allow any other potential OSes to try. Just make it a simplie if/else instead.
-rw-r--r--mesonbuild/dependencies/dev.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 016cf92..d31acbf 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -473,7 +473,7 @@ class ZlibSystemDependency(SystemDependency):
self.is_found = True
self.link_args = ['-lz']
- elif m.is_windows():
+ else:
# Without a clib_compiler we can't find zlib, so just give up.
if self.clib_compiler is None:
self.is_found = False
@@ -492,9 +492,6 @@ class ZlibSystemDependency(SystemDependency):
break
else:
return
- else:
- mlog.debug(f'Unsupported OS {m.system}')
- return
v, _ = self.clib_compiler.get_define('ZLIB_VERSION', '#include <zlib.h>', self.env, [], [self])
self.version = v.strip('"')