From 4cf8ad9955438ca97b997f416d855179023d90c9 Mon Sep 17 00:00:00 2001 From: Ali Ince Date: Fri, 19 Oct 2018 15:01:07 +0100 Subject: [PATCH] Turn on RPATH on generated shared library --- CMakeLists.txt | 8 -------- src/seabolt/src/CMakeLists.txt | 1 + 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fc40d06..9604e816 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/seabolt/src/CMakeLists.txt b/src/seabolt/src/CMakeLists.txt index 855edf45..78a939dc 100644 --- a/src/seabolt/src/CMakeLists.txt +++ b/src/seabolt/src/CMakeLists.txt @@ -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)