Skip to content

Commit

Permalink
macos use Homebrew HDF5 if there
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 9, 2024
1 parent 99e50ff commit 6a7a336
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ use Config;
## Search for hdf5 library and include file
$ENV{HDF5_PATH} ||= '';

sub macos_get_lib_path {
return if $^O ne 'darwin';
my $pref = `brew --prefix hdf5`;
return if !$pref;
chomp $pref;
"$pref/lib";
}
sub get_lib_paths {
permutate(grep $_, (
macos_get_lib_path(),
$ENV{HDF5_PATH}."/lib",
$ENV{HDF5_PATH}."/lib64",
$ENV{HDF5_LIBDIR},
Expand Down

0 comments on commit 6a7a336

Please sign in to comment.