diff --git a/CMakeFilters.cmake b/CMakeFilters.cmake index f755d0a676f..eb44584f073 100644 --- a/CMakeFilters.cmake +++ b/CMakeFilters.cmake @@ -173,8 +173,8 @@ if (HDF5_ENABLE_SZIP_SUPPORT) set(libaec_USE_STATIC_LIBS ${HDF5_USE_LIBAEC_STATIC}) set(SZIP_FOUND FALSE) # Search pure Config mode, there is not a FindSZIP module available - find_package ({LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) - set(H5_SZIP_FOUND ${{LIBAEC_PACKAGE_NAME}_FOUND}) + find_package (${LIBAEC_PACKAGE_NAME} NAMES ${LIBAEC_PACKAGE_NAME}${HDF_PACKAGE_EXT} OPTIONAL_COMPONENTS ${LIBAEC_SEARCH_TYPE}) + set(H5_SZIP_FOUND ${${LIBAEC_PACKAGE_NAME}_FOUND}) if (H5_SZIP_FOUND) set (H5_SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR}) set (H5_SZIP_INCLUDE_DIRS ${H5_SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR}) diff --git a/CMakeInstallation.cmake b/CMakeInstallation.cmake index 6211c959e99..7d9199f1fa2 100644 --- a/CMakeInstallation.cmake +++ b/CMakeInstallation.cmake @@ -465,11 +465,12 @@ The HDF5 data model, file format, API, library, and tools are open and distribut endif () endif () if (H5_SZIP_FOUND AND SZIP_USE_EXTERNAL) + set (SZIP_PROJNAME "${LIBAEC_PACKAGE_NAME}") if (WIN32) - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;ALL;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};ALL;/") else () - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;libraries;/") - set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};SZIP;configinstall;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};libraries;/") + set (CPACK_INSTALL_CMAKE_PROJECTS "${CPACK_INSTALL_CMAKE_PROJECTS};${H5_SZIP_INCLUDE_DIR_GEN};${SZIP_PROJNAME};configinstall;/") endif () endif () if (PLUGIN_FOUND AND PLUGIN_USE_EXTERNAL) diff --git a/config/cmake/scripts/HDF5options.cmake b/config/cmake/scripts/HDF5options.cmake index 79373b95b88..0da95c87f6f 100644 --- a/config/cmake/scripts/HDF5options.cmake +++ b/config/cmake/scripts/HDF5options.cmake @@ -65,6 +65,8 @@ set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ALLOW_EXTERNAL_SUPPORT:STRIN #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include") #set(ENV{SZIP_ROOT} "some_location") #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include") +#set(ENV{libaec_ROOT} "some_location") +#set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -Dlibaec_LIBRARY:FILEPATH=some_location/lib/libaec.lib -Dlibaec_INCLUDE_DIR:PATH=some_location/include") ### disable using ext zlib #set (ADD_BUILD_OPTIONS "${ADD_BUILD_OPTIONS} -DHDF5_ENABLE_ZLIB_SUPPORT:BOOL=OFF") diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index d4a06ff9b4c..22b23bed0d0 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -285,19 +285,20 @@ IV. Further considerations web site. The HDF5 2."X"."Y" product requires a minimum CMake version 3.18. If you are using VS2022, the CMake minimum version is 3.21. - 2. If you plan to use Zlib or Szip (libaec): + 2. If you plan to use Zlib or Szip (aka libaec): A. Download the binary packages and install them in a central location. For example on Windows, create a folder extlibs and install the packages there. Add the following CMake options: -DZLIB_LIBRARY:FILEPATH=some_location/lib/zlib.lib -DZLIB_INCLUDE_DIR:PATH=some_location/include -DZLIB_USE_EXTERNAL:BOOL=OFF - -DSZIP_LIBRARY:FILEPATH=some_location/lib/szlib.lib + -DSZIP_LIBRARY:FILEPATH=some_location/lib/libszaec.lib -DSZIP_INCLUDE_DIR:PATH=some_location/include + -Dlibaec_LIBRARY:FILEPATH=some_location/lib/libaec.lib + -Dlibaec_INCLUDE_DIR:PATH=some_location/include -DSZIP_USE_EXTERNAL:BOOL=OFF - (For libaec use -Dlibaec_* options instead of -DSZIP_* options) where "some_location" is the full path to the extlibs folder. - Also the appropriate environment variable must be set; + Also if the appropriate environment variable is set, the above options are not required; set(ENV{ZLIB_ROOT} "some_location") set(ENV{SZIP_ROOT} "some_location") set(ENV{libaec_ROOT} "some_location") @@ -312,6 +313,8 @@ IV. Further considerations ZLIB_GIT_BRANCH="some_branch" SZIP_GIT_URL:STRING="https://some_location/szip" SZIP_GIT_BRANCH="some_branch" + LIBAEC_GIT_URL:STRING="https://some_location/liaec" + LIBAEC_GIT_BRANCH="some_branch" where "some_location" is the URL to the GIT repository and "some_branch" is a branch in the repository, usually the default. Also set CMAKE_BUILD_TYPE to the configuration type. @@ -510,6 +513,8 @@ These five steps are described in detail below. is: * SZIP_INCLUDE_DIR:PATH= * SZIP_LIBRARY:FILEPATH= + * libaec_INCLUDE_DIR:PATH= + * libaec_LIBRARY:FILEPATH= * ZLIB_INCLUDE_DIR:PATH= * ZLIB_LIBRARY:FILEPATH= * :BOOL=[ON | OFF] @@ -734,6 +739,8 @@ These five steps are described in detail below. ZLIB_GIT_BRANCH="${git_branch}" SZIP_GIT_URL:STRING="https://${git_url}/szip" SZIP_GIT_BRANCH="${git_branch}" + LIBAEC_GIT_URL:STRING="https://${git_url}/libaec" + LIBAEC_GIT_BRANCH="${git_branch}" PLUGIN_GIT_URL:STRING="https://${git_url}/plugin" PLUGIN_GIT_BRANCH="${git_branch}" ${git_url} should be changed to your location and ${git_branch} is