Skip to content

Commit

Permalink
iox-828 Add CMAKE_INSTALL_RPATH to iceoryx_meta
Browse files Browse the repository at this point in the history
If iceoryx is built as shared lib we need to set an rpath to the installed shared libs so that roudi can find them
  • Loading branch information
dkroenke committed Jun 15, 2021
1 parent d00107d commit 48a58fb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions iceoryx_meta/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ include(${CMAKE_CURRENT_SOURCE_DIR}/build_options.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/tests.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/install_help_and_config.cmake)

# set rpath for finding shared libraries outside of the build-tree
# see https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling#cmake-and-the-rpath
list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
if("${isSystemDir}" STREQUAL "-1")
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
endif()

# ===== Core
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../iceoryx_utils ${CMAKE_BINARY_DIR}/utils)
Expand Down

0 comments on commit 48a58fb

Please sign in to comment.