From a8243d572e989cab79dc67febccf4c0a82bce4cc Mon Sep 17 00:00:00 2001 From: Franco Venturi Date: Sun, 9 Jun 2024 18:51:26 -0400 Subject: [PATCH] test #3 --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ca2171..ce752b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,6 +68,15 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" target_link_options(sdrPlaySupport PRIVATE -pthread) endif () +# XCode on MacOS requires rpath for SDRplay API library +if(APPLE) + add_custom_command( + TARGET sdrPlaySupport POST_BUILD + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -add-rpath /usr/local/lib "$" + COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change libsdrplay_api.so.3 @rpath/libsdrplay_api.so.3 "$" + ) +endif(APPLE) + ######################################################################## # uninstall target ########################################################################