Skip to content

Commit

Permalink
Reintroduced patch to automated HDF5 to export zlib and szip as publi…
Browse files Browse the repository at this point in the history
…c dependencies
  • Loading branch information
DavidAce committed Apr 18, 2022
1 parent c77a4b8 commit f2f8822
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions cmake/external_hdf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ endif()
ExternalProject_Add(external_hdf5
# URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.1/src/hdf5-1.12.1.tar.gz
URL https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.13/hdf5-1.13.1/src/hdf5-1.13.1.tar.gz
# URL_MD5 e4f057f0a3eb4237c7799605357a584d
URL_MD5 1daffd4662ba2207a96a93272244bb77
# URL_MD5 e4f057f0a3eb4237c7799605357a584d # 1.12.1
URL_MD5 1daffd4662ba2207a96a93272244bb77 # 1.13.1
PREFIX ${CMAKE_BINARY_DIR}
# We need a patch here to get HDF5 to export zlib and szip as public dependencies on both static and shared targets
# PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/hdf5-link-public.patch.cmake
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/hdf5-link-public.patch.cmake
# We need another patch to force HDF5 to link ZLIB::ZLIB and szip-static targets rather than full paths to libraries
# PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/hdf5-link-target.patch.cmake
PATCH_COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/hdf5-link-target.patch.cmake
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
BUILD_ALWAYS TRUE
LIST_SEPARATOR |
Expand All @@ -76,10 +76,10 @@ ExternalProject_Add(external_hdf5
# -DZLIB_FOUND:BOOL=TRUE
# -DSZIP_FOUND:BOOL=TRUE
-DZLIB_LIBRARY:STRING=${ZLIB_LIBRARY} # This is to force FindZLIB.cmake to find and define a target with the correct library
-DSZIP_LIBRARY:STRING=${SZIP_LIBRARY}
# -DSZIP_LIBRARY:STRING=szip-static
# -DZLIB_STATIC_LIBRARY:STRING=ZLIB::ZLIB # This is to use target-based linking instead of hardcoding a path to file
# -DSZIP_STATIC_LIBRARY:STRING=szip-static # This is to use target-based linking instead of hardcoding a path to file
# -DSZIP_LIBRARY:STRING=${SZIP_LIBRARY}
-DSZIP_LIBRARY:STRING=szip-static
-DZLIB_STATIC_LIBRARY:STRING=ZLIB::ZLIB # This is to use target-based linking instead of hardcoding a path to file
-DSZIP_STATIC_LIBRARY:STRING=szip-static # This is to use target-based linking instead of hardcoding a path to file
-DZLIB_INCLUDE_DIR:PATH=${ZLIB_INCLUDE_DIR}
-DSZIP_INCLUDE_DIR:PATH=${SZIP_INCLUDE_DIR}
# -DZLIB_ROOT:PATH=${ZLIB_ROOT}
Expand Down

0 comments on commit f2f8822

Please sign in to comment.