diff options
author | Alan Antonuk <alan.antonuk@gmail.com> | 2021-04-12 05:15:58 +0000 |
---|---|---|
committer | Alan Antonuk <alan.antonuk@gmail.com> | 2021-04-11 22:37:57 -0700 |
commit | 06e551238ba58081034ca251c8c93292c6f9564d (patch) | |
tree | aa7172efc6e0c21a8176cb43b5428cbe48ab4a3a /librabbitmq | |
parent | b453ad06e549c02af858e6f0672e8b9c74dc6554 (diff) | |
download | rabbitmq-c-06e551238ba58081034ca251c8c93292c6f9564d.tar.gz |
lib: use $ORIGIN for installed rpath on non-MacOS
This sets an rpath that makes it a bit more intuitive to use when the
library is moved after installation. This matches the behavior on MacOS
platform, which is why this is not changed for MacOS platforms.
Signed-off-by: GitHub <noreply@github.com>
Diffstat (limited to 'librabbitmq')
-rw-r--r-- | librabbitmq/CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt index f84e57f..669425d 100644 --- a/librabbitmq/CMakeLists.txt +++ b/librabbitmq/CMakeLists.txt @@ -109,6 +109,10 @@ add_definitions(-DAMQP_BUILD) set(RMQ_LIBRARIES ${AMQP_SSL_LIBS} ${SOCKET_LIBRARIES} ${LIBRT} ${CMAKE_THREAD_LIBS_INIT}) if (BUILD_SHARED_LIBS) + if (NOT APPLE) + set(CMAKE_INSTALL_RPATH $ORIGIN) + endif() + add_library(rabbitmq SHARED ${RABBITMQ_SOURCES}) target_link_libraries(rabbitmq ${RMQ_LIBRARIES}) |