aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-06-25 11:50:19 +0200
committerThomas White <taw@physics.org>2021-06-25 14:33:53 +0200
commitbe404dd09125a700a7d8d98ee65932ff6900c904 (patch)
tree9d4f979298be375920fdb17ff2634d9a1afbde4e /meson.build
parent4c7253a21570ad1ab9cf5edf94c8f598399bdb10 (diff)
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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files 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')