Skip to content

Commit

Permalink
Fix RPATHs on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Jan 30, 2025
1 parent 03a714f commit 1bf6172
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ else()
endif()


# Add library directories to rpath so users don't need to use LD_LIBRARY_PATH.
# (see https://dev.my-gate.net/2021/08/04/understanding-rpath-with-cmake )
# TODO: detector MacOS and set MACOSX_RPATH to TRUE
# Add library directories to RPATH for all targets
set( CMAKE_SKIP_BUILD_RPATH FALSE )
set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib:${CMAKE_INSTALL_PREFIX}/lib/JANA/plugins" )
set( CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/lib/JANA/plugins" )
set( CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE )

# Generate a compilation database, e.g. for IDE autocompletion
Expand Down

0 comments on commit 1bf6172

Please sign in to comment.