Static Link to HDF5

Hi, I am currently working on the maintenance of a project, which relies on Fesapi V0.16.0.0. Due to a specific reason, we need to switch HDF5 Dynamically linking to Static linking. In github Fesapi project page, it is mentioned “HD5_BUILT_AS_DYNAMIC_LIB” (V0.16.0.0) and "HDF5_USE_STATIC_LIBRARIES " (V2.12.0.0) for CMake setup. Other than that, I could not find any other complete tutorial how to achieve the target in practice.

Appreciate very much with any instruction, guidelines, and tutorials, etc.

Hi,

I have never tried and I am not aware of any adopter using static linking on FESAPI.
I would start to look at CMAKE machinery for that (BUILD_SHARED_LIBS — CMake 3.31.2 Documentation) and I would prepare myself to tweak the CMakeFiles (and submit PR) if needed if I was you.