diff --git a/CMakePresets.json b/CMakePresets.json index 24680f16ba2..b8471423469 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -122,7 +122,7 @@ "HDF5_BUILD_GENERATORS": "ON", "HDF5_ENABLE_ALL_WARNINGS": "ON", "HDF5_MINGW_STATIC_GCC_LIBS": "ON", - "HDF5_SET_DEFAULT_RPATH": "ON", + "HDF5_APPEND_DEFAULT_RPATH": "ON", "HDF_TEST_EXPRESS": "2" } }, diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake index 5e56947725e..e3e2da75ff2 100644 --- a/config/cmake/HDFMacros.cmake +++ b/config/cmake/HDFMacros.cmake @@ -459,17 +459,17 @@ macro (HDF_DIR_PATHS package_prefix) message(STATUS "Final: ${${package_prefix}_INSTALL_DOC_DIR}") # Define the needed INSTALL_RPATH for HDF Standard binary packages - option (HDF5_SET_DEFAULT_RPATH "Set the default RPATH for the common installation" OFF) - if (HDF5_SET_DEFAULT_RPATH) + option (HDF5_APPEND_DEFAULT_RPATH "Append to the default RPATH for the HDF installation" OFF) + if (HDF5_APPEND_DEFAULT_RPATH) if (APPLE) - set (CMAKE_INSTALL_RPATH + list(APPEND CMAKE_INSTALL_RPATH "@executable_path/../${${package_prefix}_INSTALL_LIB_DIR}" "@executable_path/" "@loader_path/../${${package_prefix}_INSTALL_LIB_DIR}" "@loader_path/" ) else () - set (CMAKE_INSTALL_RPATH "\$ORIGIN/../${${package_prefix}_INSTALL_LIB_DIR}:\$ORIGIN/") + list(APPEND CMAKE_INSTALL_RPATH "\$ORIGIN/../${${package_prefix}_INSTALL_LIB_DIR}:\$ORIGIN/") endif () endif () diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index ec4319a7c3f..4e38e98a91a 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -43,7 +43,7 @@ set (HDF5_MINGW_STATIC_GCC_LIBS ON CACHE BOOL "Statically link libgcc/libstdc++" set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) set_property (CACHE HDF5_ALLOW_EXTERNAL_SUPPORT PROPERTY STRINGS NO GIT TGZ) -set (HDF5_SET_DEFAULT_RPATH ON "Set the default RPATH for the common installation" FORCE) +set (HDF5_APPEND_DEFAULT_RPATH ON "Append to the default RPATH for the HDF installation" FORCE) ######################## # compression options diff --git a/release_docs/INSTALL_CMake.txt b/release_docs/INSTALL_CMake.txt index 1afae1aa76a..38a455b18ab 100644 --- a/release_docs/INSTALL_CMake.txt +++ b/release_docs/INSTALL_CMake.txt @@ -538,7 +538,7 @@ These five steps are described in detail below. set (HDF5_BUILD_JAVA ON CACHE BOOL "Build JAVA support" FORCE) set (HDF5_ENABLE_ALL_WARNINGS ON CACHE BOOL "Enable all warnings" FORCE) set (HDF5_ALLOW_EXTERNAL_SUPPORT "TGZ" CACHE STRING "Allow External Library Building (NO GIT TGZ)" FORCE) - set (HDF5_SET_DEFAULT_RPATH ON "Set the default RPATH for the common installation" FORCE) + set (HDF5_APPEND_DEFAULT_RPATH ON "Append to the default RPATH for the HDF installation" FORCE) ######################## # compression options ######################## @@ -755,8 +755,8 @@ BUILD_STATIC_LIBS "Build Static Libraries" ON BUILD_STATIC_EXECS "Build Static Executables" OFF BUILD_TESTING "Build HDF5 Unit Testing" ON if (WINDOWS) - HDF5_DISABLE_PDB_FILES "Do not install PDB files" OFF -HDF5_SET_DEFAULT_RPATH "Set the default RPATH for the common installation" OFF + HDF5_DISABLE_PDB_FILES "Do not install PDB files" OFF +HDF5_APPEND_DEFAULT_RPATH "Append to the default RPATH for the HDF installation" OFF ---------------- HDF5 Build Options ---------------------------------------- HDF5_BUILD_CPP_LIB "Build HDF5 C++ Library" OFF diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 47dff6422ed..3865f0e69d9 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -568,9 +568,9 @@ Bug Fixes since HDF5-2.0.0 release - The RPATH settings were restored under an HDF5 option The RPATH settings were removed by a pull-request #5271, but the settings are needed - under certain conditions. The settings have been restored under the HDF5_ENABLE_RPATH option. + under certain conditions. The settings have been restored under the HDF5_APPEND_DEFAULT_RPATH option. The option is OFF by default. Typical builds using either the cacheinit.cmake file or presets - will enable the RPATH settings. + will enable the RPATH settings by appending to CMAKE_INSTALL_RPATH. - Use pre-installed libaec compression library