I am building HDF5 from source (without a lot of experience doing such things) on macOS because installing from Homebrew does not add hdf5-config.cmake and related files. Can I get a recommendation on how to install to a discoverable path (i.e. so find_package(HDF5 ...
just works in a different project)?
I suppose setting INSTALLDIR
in the build-unix.sh
script should be enough, but that doesn’t seem to be the case for a couple reasons. 1) The HDF5-x-Darwin.sh
install script does not appear to respect INSTALLDIR
, and 2) If you use the --prefix
argument with the install script, the installation is still nested under HDF5-x-Darwin/HDF_GROUP/HDF5/x/
which is not discoverable.
So, how do you get an install on macOS that CMake find_package
can find without giving an explicit path hint?
As an aside, if any Homebrew savvy folks see this and want to transition the homebrew hdf5 formula to use cmake, that would be amazing!