Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Set CMAKE_INSTALL_RPATH
Browse files Browse the repository at this point in the history
To easily run executables in `$DEST/bin`, depending on libraries
in `$DEST/lib`.

Signed-off-by: Laurent Bonnans <[email protected]>
  • Loading branch information
lbonn committed Jan 8, 2020
1 parent 6e37d96 commit f78aebd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)")
endif ()
endif()

# helpful for debugging installed executables, see `man ld-linux.so`
set(CMAKE_INSTALL_RPATH "$ORIGIN/../lib")

# prevent visibility warnings from the linker
if (APPLE)
link_libraries("-Wl,-w")
Expand Down

0 comments on commit f78aebd

Please sign in to comment.