...
- Edit the root
UserMacros.cmake
file in the HDF5 source code:.
Go to this directory in the CMake source code:CMake-hdf5-N.N.N/hdf5-N.N.N/config/cmake/UserMacros/
You will find the fileWindows_MT.cmake
, which contains information on what needs to be done.
In general, you will need to either replace or edit thehdf5-N.N.N/UserMacros.cmake
file so that theWindows_MT.cmake
file can be found.
(On Windows, copy the entire file toUserMacros.cmake
.) - Edit
HDF5Options.cmake
in theCMake-hdf5-N.N.N
directory and add the BUILD_STATIC_CRT_LIBS option:.
set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DBUILD_STATIC_CRT_LIBS:BOOL=ON")
...