From 0edfc5a85c4dfbbf4a2e3c84958596b2fecda60d Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 9 Mar 2022 17:33:52 -0500 Subject: [PATCH] - add $ORIGIN to rpath for Linux --- source/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 7552930d1..dce666f78 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1475,6 +1475,11 @@ if( NOT WIN32 AND NOT APPLE ) add_custom_command( TARGET ${PROJECT_NAME} POST_BUILD COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/link-make COMMAND /bin/sh -c ${CMAKE_CURRENT_BINARY_DIR}/link-make ) + set_target_properties(${PROJECT_NAME} PROPERTIES + #allow libzmusiclite.so.1 library in same folder as executable at runtime + INSTALL_RPATH "\$ORIGIN" + BUILD_WITH_INSTALL_RPATH ON + ) endif() add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD