diff options
author | Thomas White <taw@physics.org> | 2021-10-13 15:47:39 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2021-10-13 16:07:19 +0200 |
commit | 6e2ef0ea7f31936dce5c6c60610eafedf636657f (patch) | |
tree | 3acb3254e65beef4cf7f295a0295926106e2d4e1 /libcrystfel | |
parent | ecb963680530131a0d08b37b439ce6b24ba7d995 (diff) |
Meson: Get zlib via wrap
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/meson.build | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libcrystfel/meson.build b/libcrystfel/meson.build index b8dc4b6c..5b10ce14 100644 --- a/libcrystfel/meson.build +++ b/libcrystfel/meson.build @@ -2,12 +2,22 @@ zlibdep = dependency('zlib', required: false) if zlibdep.found() - conf_data.set10('HAVE_ZLIB', 1) if cc.has_function('gzbuffer', prefix: '#include <zlib.h>', dependencies: zlibdep) conf_data.set10('HAVE_GZBUFFER', 1) endif +else + zlibproj = subproject('zlib') + zlibdep = zlibproj.get_variable('zlib_dep') + # Cannot check for gzbuffer in this case, because Zlib won't be built + # until compile time. However, we already know that the wrap version is + # new enough + conf_data.set10('HAVE_GZBUFFER', 1) +endif + +if zlibdep.found() + conf_data.set10('HAVE_ZLIB', 1) endif fftwdep = dependency('fftw3', required: false) |