Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
Turn on RPATH on generated shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ince committed Oct 19, 2018
1 parent ee2195c commit 4cf8ad9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ set(INSTALL_INCLUDEDIR ${CMAKE_INSTALL_INCLUDEDIR}/${SEABOLT_NAME} CACHE PATH "I
set(INSTALL_CMAKEDIR ${CMAKE_INSTALL_CMAKEDIR} CACHE PATH "Installation directory for CMake files")
set(INSTALL_PKGCONFIGDIR ${CMAKE_INSTALL_PKGCONFIGDIR} CACHE PATH "Installation directory for pkg-config files")

file(RELATIVE_PATH _rel ${CMAKE_INSTALL_PREFIX}/${INSTALL_BINDIR} ${CMAKE_INSTALL_PREFIX})
if (APPLE)
set(_rpath "@loader_path/${_rel}")
else ()
set(_rpath "\$ORIGIN/${_rel}")
endif ()
file(TO_NATIVE_PATH "${_rpath}/${INSTALL_LIBDIR}" LIB_RPATH)

include(TestBigEndian)
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if (IS_BIG_ENDIAN)
Expand Down
1 change: 1 addition & 0 deletions src/seabolt/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,5 @@ set_target_properties(${SEABOLT_SHARED}
OUTPUT_NAME "${SEABOLT_NAME}"
PUBLIC_HEADER "${public_header_files};${CMAKE_BINARY_DIR}/${INSTALL_INCLUDEDIR}/bolt-exports.h;${CMAKE_BINARY_DIR}/${INSTALL_INCLUDEDIR}/bolt-version.h"
MACOSX_RPATH ON
INSTALL_RPATH_USE_LINK_PATH ON
WINDOWS_EXPORT_ALL_SYMBOLS OFF)

0 comments on commit 4cf8ad9

Please sign in to comment.