Skip to content

Commit bc62cd1

Browse files
authored
fix: correct rpath on osx (#136)
Signed-off-by: l.feng <43399351+msclock@users.noreply.github.com>
1 parent d386c27 commit bc62cd1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cmake/install/Runpath.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ message(
3131

3232
if(APPLE)
3333
set(_rpath "@loader_path/${_rel}")
34+
list(APPEND _rpath @loader_path)
3435
else()
3536
set(_rpath "$ORIGIN/${_rel}")
37+
list(APPEND _rpath $ORIGIN)
3638
endif()
3739

3840
# Append runtime path
39-
list(APPEND CMAKE_INSTALL_RPATH ${_rpath};$ORIGIN)
41+
list(APPEND CMAKE_INSTALL_RPATH ${_rpath})
4042
message(STATUS "CMAKE_INSTALL_RPATH:${CMAKE_INSTALL_RPATH}")
4143

4244
# Skip RPATH for MinGW and Windows

0 commit comments

Comments
 (0)