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 | |
parent | ecb963680530131a0d08b37b439ce6b24ba7d995 (diff) |
Meson: Get zlib via wrap
-rw-r--r-- | libcrystfel/meson.build | 12 | ||||
-rw-r--r-- | subprojects/zlib.wrap | 12 |
2 files changed, 23 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) diff --git a/subprojects/zlib.wrap b/subprojects/zlib.wrap new file mode 100644 index 00000000..d471d9b3 --- /dev/null +++ b/subprojects/zlib.wrap @@ -0,0 +1,12 @@ +[wrap-file] +directory = zlib-1.2.11 +source_url = http://zlib.net/fossils/zlib-1.2.11.tar.gz +source_filename = zlib-1.2.11.tar.gz +source_hash = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 +patch_url = https://wrapdb.mesonbuild.com/v2/zlib_1.2.11-5/get_patch +patch_filename = zlib-1.2.11-5-wrap.zip +patch_hash = 728c8e24acbc2e6682fbd950fec39e2fc77528af361adb87259f8a8511434004 + +[provide] +zlib = zlib_dep + |