Skip to content

Commit

Permalink
build: fix rpath settings for macOS builds
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Dec 18, 2024
1 parent 5020015 commit e8948ac
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ set(ENABLE_LTO ON CACHE BOOL "Enable LTO build?")
set(ENABLE_STRIP ON CACHE BOOL "Enable stripping all symbols from release binary?")
set(ENABLE_COMPILE_COMMANDS ON CACHE BOOL "Enable generating compile_commands.json?")

if (APPLE)
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()

if(USING_MSVC)
set(ENABLE_STATIC_CRT OFF CACHE BOOL "Enable MSVC static CRT?")
endif()
Expand Down

0 comments on commit e8948ac

Please sign in to comment.