hdf5: get include directory from config-tool

hdf5's config-tools will not show compile arguments (including the
include directory) if called without `-c`. Make sure to get both the
compile and link arguments.
pull/8432/head
Michael Kuhn 4 years ago committed by Jussi Pakkanen
parent fad0a498fb
commit 2d8d21d5bc
  1. 7
      mesonbuild/dependencies/hdf5.py

@ -126,8 +126,11 @@ class HDF5ConfigToolDependency(ConfigToolDependency):
if not self.is_found:
return
args = self.get_config_value(['-show', '-noshlib' if kwargs.get('static', False) else '-shlib'], 'args')
for arg in args[1:]:
# We first need to call the tool with -c to get the compile arguments
# and then without -c to get the link arguments.
args = self.get_config_value(['-show', '-c'], 'args')[1:]
args += self.get_config_value(['-show', '-noshlib' if kwargs.get('static', False) else '-shlib'], 'args')[1:]
for arg in args:
if arg.startswith(('-I', '-f', '-D')) or arg == '-pthread':
self.compile_args.append(arg)
elif arg.startswith(('-L', '-l', '-Wl')):

Loading…
Cancel
Save