From 847d652c4ef179bbf94c0e322dc3277858fcf08c Mon Sep 17 00:00:00 2001 From: William F Godoy Date: Thu, 6 Aug 2020 13:09:18 -0400 Subject: Add h5cc shlib argument for correctly link hdf5 libraries respect "static" key in dependency function -shlib for static dependency -noshlib for static dependency --- mesonbuild/dependencies/hdf5.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/hdf5.py b/mesonbuild/dependencies/hdf5.py index fadd109..6a9bf2d 100644 --- a/mesonbuild/dependencies/hdf5.py +++ b/mesonbuild/dependencies/hdf5.py @@ -105,7 +105,8 @@ class HDF5Dependency(ExternalDependency): prog = ExternalProgram(wrappers[lang], silent=True) if not prog.found(): return - cmd = prog.get_command() + ['-show'] + shlib_arg = '-noshlib' if kwargs.get('static', False) else '-shlib' + cmd = prog.get_command() + [shlib_arg, '-show'] p = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, timeout=15) if p.returncode != 0: mlog.debug('Command', mlog.bold(cmd), 'failed to run:') -- cgit v1.1