summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-09-26 21:04:34 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-09-26 21:04:34 (GMT)
commit8f103a935be942a4240da9e57a0f67504588948a (patch)
tree130b0379ef8b355fd4555225f182727773aed084 /config
parent873249b58bcf62d73f830d7d9ee056cd554f370d (diff)
downloadhdf5-8f103a935be942a4240da9e57a0f67504588948a.zip
hdf5-8f103a935be942a4240da9e57a0f67504588948a.tar.gz
hdf5-8f103a935be942a4240da9e57a0f67504588948a.tar.bz2
HDFFV-10594, 10332, 10531
Diffstat (limited to 'config')
-rw-r--r--config/cmake_ext_mod/HDFMacros.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake
index aa18022..147ae2f 100644
--- a/config/cmake_ext_mod/HDFMacros.cmake
+++ b/config/cmake_ext_mod/HDFMacros.cmake
@@ -358,6 +358,21 @@ macro (HDF_DIR_PATHS package_prefix)
endif ()
endif ()
+ set (CMAKE_SKIP_BUILD_RPATH FALSE)
+ set (CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+ set (CMAKE_BUILD_WITH_INSTALL_RPATH ON)
+ if (APPLE)
+ set (CMAKE_INSTALL_NAME_DIR "@rpath")
+ set (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/")
+ endif ()
+
if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
endif ()