Open ipatch opened 1 month ago
it seems updating the cmake logic in the patch to look like the below allows the cmake run to continue without encountering the above error,
if(HOMEBREW_PREFIX)
unset(HDF5_FOUND CACHE)
# set(HDF5_ROOT "${HOMEBREW_PREFIX}/opt/hdf5" CACHE PATH "path to HDF5 installation")
# set(HDF5_DIR "/Users/chris/homebrew/opt/hdf5/lib/cmake/hdf5" CACHE PATH "")
# set(HDF5_HL_LIBRARIES "/Users/chris/homebrew/opt/hdf5/lib/libhdf5_hl.dylib")
# find_package(HDF5 COMPONENTS C HL REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C CXX HL)
message("--------------------------------------------")
message("ipatch, manually set hdf5_root, cmake build of hdf5 breaks h5cc")
message(VERBOSE "HDF5_LIBRARIES : ${HDF5_LIBRARIES}")
message(VERBOSE "HDF5_C_HL_LIBRARIES : ${HDF5_C_HL_LIBRARIES}")
message(VERBOSE "HDF5_HL_LIBRARIES : ${HDF5_HL_LIBRARIES}")
message(VERBOSE "HDF5_C_LIBRARIES : ${HDF5_C_LIBRARIES}")
message("--------------------------------------------")
else()
obviously an updated patch will be required.
some useful links below,
https://github.com/Homebrew/homebrew-core/issues/159691
https://gitweb.gentoo.org/repo/gentoo.git/tree/sci-libs/hdf5/hdf5-1.14.4_p3-r1.ebuild
the below patch file should fix the above mentioned error in this issue. all that is left is to integrate the patch file in the various freecad formulas in this repo.
using my current hdf5 patch to allow cmake to find a hdf5 installation from homebrew, the initial cmake command will complete, but if the cmake command is rerun in the same directory, the subsequent run will fail with the below error output,