mfem: fix transitive hdf5 static libs (#18457)
This commit is contained in:
parent
e58db067c3
commit
e22a0ca5cf
@ -494,10 +494,16 @@ def find_optional_library(name, prefix):
|
||||
ld_flags_from_dirs([spec['gslib'].prefix.lib], ['gs'])]
|
||||
|
||||
if '+netcdf' in spec:
|
||||
lib_flags = ld_flags_from_dirs([spec['netcdf-c'].prefix.lib],
|
||||
['netcdf'])
|
||||
hdf5 = spec['hdf5:hl']
|
||||
if hdf5.satisfies('~shared'):
|
||||
hdf5_libs = hdf5.libs
|
||||
hdf5_libs += LibraryList(find_system_libraries('libdl'))
|
||||
lib_flags += " " + ld_flags_from_library_list(hdf5_libs)
|
||||
options += [
|
||||
'NETCDF_OPT=-I%s' % spec['netcdf-c'].prefix.include,
|
||||
'NETCDF_LIB=%s' %
|
||||
ld_flags_from_dirs([spec['netcdf-c'].prefix.lib], ['netcdf'])]
|
||||
'NETCDF_LIB=%s' % lib_flags]
|
||||
|
||||
if '+zlib' in spec:
|
||||
if "@:3.3.2" in spec:
|
||||
|
@ -181,6 +181,8 @@ def configure_args(self):
|
||||
hdf5_hl = self.spec['hdf5:hl']
|
||||
cppflags.append(hdf5_hl.headers.cpp_flags)
|
||||
ldflags.append(hdf5_hl.libs.search_flags)
|
||||
if hdf5_hl.satisfies('~shared'):
|
||||
libs.append(hdf5_hl.libs.link_flags)
|
||||
|
||||
if '+parallel-netcdf' in self.spec:
|
||||
config_args.append('--enable-pnetcdf')
|
||||
|
Loading…
Reference in New Issue
Block a user