Skip to content

Commit

Permalink
chore(build): add executable-local library search paths (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak authored Oct 23, 2023
1 parent df1ab32 commit de5e3fc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,17 @@ if(WHOA_SYSTEM_LINUX OR WHOA_SYSTEM_MAC)
find_package(Threads REQUIRED)
endif()

# Library search paths
if(WHOA_SYSTEM_MAC)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "@executable_path")
elseif(WHOA_SYSTEM_LINUX)
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()

add_subdirectory(lib)
add_subdirectory(src)
add_subdirectory(test)
Expand Down

0 comments on commit de5e3fc

Please sign in to comment.