diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-04-30 10:30:51 -0700 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-05-28 09:26:38 -0400 |
commit | 49b50374968357dcf74cc6f7876e8649c6cf022a (patch) | |
tree | a06cd80c7027f9659c0685a4a4f8e4ccd35b7206 | |
parent | 7114a9015eedc8e3173f57c78b084099c37b9cc3 (diff) | |
download | meson-49b50374968357dcf74cc6f7876e8649c6cf022a.zip meson-49b50374968357dcf74cc6f7876e8649c6cf022a.tar.gz meson-49b50374968357dcf74cc6f7876e8649c6cf022a.tar.bz2 |
dependencies/zlib: System Dependency needs a clib_compiler on windows
Otherwise it'll except when it tries to get an attribute from None that
doesn't exist.
-rw-r--r-- | mesonbuild/dependencies/dev.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index e9181bd..07bf87a 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -475,13 +475,18 @@ class ZlibSystemDependency(ExternalDependency): # from something to macOS? if ((m.is_darwin() and isinstance(self.clib_compiler, (AppleClangCCompiler, AppleClangCPPCompiler))) or m.is_freebsd() or m.is_dragonflybsd()): - self.is_found = True - self.link_args = ['-lz'] - # No need to set includes, # on macos xcode/clang will do that for us. # on freebsd zlib.h is in /usr/include + + self.is_found = True + self.link_args = ['-lz'] elif m.is_windows(): + # Without a clib_compiler we can't find zlib, s just give up. + if self.clib_compiler is None: + self.is_found = False + return + if self.clib_compiler.get_argument_syntax() == 'msvc': libs = ['zlib1' 'zlib'] else: |