mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
Use relative RPATH paths
This commit is contained in:
parent
ab84c029c4
commit
01e40b31fe
@ -358,6 +358,16 @@ macro (HDF_DIR_PATHS package_prefix)
|
|||||||
endif ()
|
endif ()
|
||||||
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}")
|
||||||
|
else ()
|
||||||
|
set (CMAKE_INSTALL_RPATH "\$ORIGIN/../${${package_prefix}_INSTALL_LIB_DIR}")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
|
if (DEFINED ADDITIONAL_CMAKE_PREFIX_PATH AND EXISTS "${ADDITIONAL_CMAKE_PREFIX_PATH}")
|
||||||
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
|
set (CMAKE_PREFIX_PATH ${ADDITIONAL_CMAKE_PREFIX_PATH} ${CMAKE_PREFIX_PATH})
|
||||||
endif ()
|
endif ()
|
||||||
|
Loading…
Reference in New Issue
Block a user