Building with zlib (and szip) on windows

Can you get the source from github (1.14 has had three releases now) instead of ftp? Then we know we are using the same source files. (Just to eliminate any variables there)
What version of CMake are you using, CMake 3.25+ will allow use of CMakePresets which is nice because we could create a UserPresets file just for your needs.

Compression filters do have a number of options for flexibility, however I prefer to build them in-line on Windows. Even then there are options depending on if you want to download them from the source repos or use a local tgz file. The latest release has the best CMake process for this but even the earlier 1.14 releases should work well.

The HDOptions.cmake / CTestScript.cmake process we were supplying should use the config/cmake/cacheinit.cmake file and it will set most all of the options that follow.
The basic settings for using the filters from a local folder are:
-DHDF5_ALLOW_EXTERNAL_SUPPORT:STRING=TGZ
-DTGZPATH:PATH=${CTEST_SCRIPT_DIRECTORY} # this is where the build script is run from and you may need to chage this if you use the command line instead of the HDFOptions file
-DHDF5_ENABLE_SZIP_SUPPORT:BOOL=ON
-DHDF5_ENABLE_SZIP_ENCODING:BOOL=ON
-DHDF5_ENABLE_Z_LIB_SUPPORT:BOOL=ON
-DLIBAEC_TGZ_NAME:STRING=libaec-1.0.6.tar.gz or libaec-v1.1.3.tar.gz #match the filename to your version
-DZLIB_TGZ_NAME:STRING=zlib.1.3.tar.gz #match the filename to your version
-DLIBAEC_USE_LOCALCONTENT:BOOL=ON
-DZLIB_USE_LOCALCONTENT:BOOL=ON

Using the HDFOptions.cmake file you just need to add/edit these options

1 Like