diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2021-02-24 11:23:36 +0000 |
---|---|---|
committer | Philip Withnall <philip@tecnocode.co.uk> | 2021-02-24 11:23:36 +0000 |
commit | 48322e878be7951d2ca0db9480bcfdc2761b0ce4 (patch) | |
tree | 39a5e7905f713bea9d28a03dc141c327cf7dc882 | |
parent | 17889df81a16aa70929d5e5e333dac0ea16cf6b0 (diff) | |
parent | 97c7cb0e7141f2bfaaea78d17ff892f8fe8feba7 (diff) | |
download | glib-48322e878be7951d2ca0db9480bcfdc2761b0ce4.tar.gz |
Merge branch 'zlib-forcefallback' into 'master'
meson: Use subproject zlib if "wrap_mode=forcefallback" was specified
See merge request GNOME/glib!1959
-rw-r--r-- | meson.build | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 8a6dfaede..1de9d929c 100644 --- a/meson.build +++ b/meson.build @@ -2004,9 +2004,15 @@ endif libm = cc.find_library('m', required : false) libffi_dep = dependency('libffi', version : '>= 3.0.0', fallback : ['libffi', 'ffi_dep']) -# Don't use the bundled ZLib sources until we are sure that we can't find it on -# the system -libz_dep = dependency('zlib', required : false) +if get_option('wrap_mode') == 'forcefallback' + # Respects "wrap_mode=forcefallback" option + libz_dep = subproject('zlib').get_variable('zlib_dep') +else + # Don't use the bundled ZLib sources until we are sure that we can't find it on + # the system + libz_dep = dependency('zlib', required : false) +endif + if not libz_dep.found() if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl' libz_dep = cc.find_library('z', required : false) |