summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-09-26 20:47:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-09-26 20:47:19 (GMT)
commitcc8538e1ed2d521fb287426b1767479db6b67fee (patch)
tree063a4428027af95930e725618c5b951a69e74564 /config
parentab84c029c492ce8c9d3bac8e03bf07e760de9cd7 (diff)
parentd26bb4d26ce5a23804a80c16dcb53e5f3eb957e4 (diff)
downloadhdf5-cc8538e1ed2d521fb287426b1767479db6b67fee.zip
hdf5-cc8538e1ed2d521fb287426b1767479db6b67fee.tar.gz
hdf5-cc8538e1ed2d521fb287426b1767479db6b67fee.tar.bz2
Merge pull request #1258 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'd26bb4d26ce5a23804a80c16dcb53e5f3eb957e4': HDFFV-10594 - mac must be space separated HDFFV-10594 - Add rpath configuration note Add extra path option for build location Use relative RPATH paths
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 ()