From be404dd09125a700a7d8d98ee65932ff6900c904 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 25 Jun 2021 11:50:19 +0200 Subject: Meson: Remove fallback HDF5 search, and add required minimum version Meson's internal HDF5 search should work in all cases since 0.50.0, subject to issues documented in INSTALL.md. --- meson.build | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/meson.build b/meson.build index 680edf05..f07df9b6 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project('crystfel', 'c', version : '0.9.1', license : 'GPL3+', + meson_version : '>=0.50.0', default_options : ['buildtype=debugoptimized']) add_project_arguments('-DHAVE_CONFIG_H', language : 'c') @@ -29,17 +30,8 @@ if slurmdep.found() conf_data.set10('HAVE_SLURM', 1) endif -# HDF5 >= 1.8.21 and >= 1.10.2 has a pkg-config file: -hdf5dep = dependency('hdf5', language : 'c', required : false) - -# Otherwise, try finding it ourselves: -if not hdf5dep.found() - hdf5dep = cc.find_library('hdf5', required : false) -endif - -if not hdf5dep.found() - error('Couldn\'t find HDF5') -endif +# Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0 +hdf5dep = dependency('hdf5', language : 'c', required : true) # Request HDF5 1.10-style API add_project_arguments('-DH5_USE_110_API', language : 'c') -- cgit v1.2.3