Skip to content

Commit 39b986c

Browse files
committed
fix rpath for macos
1 parent 9bb9f30 commit 39b986c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

cmake/cage_build_configuration.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ macro(cage_build_configuration)
2626
set(CMAKE_SKIP_BUILD_RPATH FALSE)
2727
set(CMAKE_SKIP_INSTALL_RPATH FALSE)
2828
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
29-
set(CMAKE_BUILD_RPATH "\$ORIGIN")
3029
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
31-
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
30+
if(APPLE)
31+
set(CMAKE_BUILD_RPATH "\$executable_path")
32+
set(CMAKE_INSTALL_RPATH "\$executable_path")
33+
else()
34+
set(CMAKE_BUILD_RPATH "\$ORIGIN")
35+
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
36+
endif()
3237

3338
if(MSVC)
3439
# enable UTF-8

0 commit comments

Comments
 (0)