From e75900b6668153ffa467487d82f023a2e64063e3 Mon Sep 17 00:00:00 2001 From: srcejon Date: Fri, 1 Dec 2023 11:53:36 +0000 Subject: [PATCH] Fix sdrplay shared library name on Mac arm64, as incorrect in 3.12 API release. --- plugins/samplesource/sdrplayv3/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/samplesource/sdrplayv3/CMakeLists.txt b/plugins/samplesource/sdrplayv3/CMakeLists.txt index 15a095921..9a4d9530d 100644 --- a/plugins/samplesource/sdrplayv3/CMakeLists.txt +++ b/plugins/samplesource/sdrplayv3/CMakeLists.txt @@ -56,6 +56,13 @@ target_link_libraries(${TARGET_NAME} ${SDRPLAY_LIBRARIES} ) +# Library name is wrong in 3.12 release +if (APPLE AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm64)) + add_custom_command(TARGET ${TARGET_NAME} + POST_BUILD COMMAND + ${CMAKE_INSTALL_NAME_TOOL} -change libsdrplay_api_arm64.so.3.12 libsdrplay_api.so.3.12 $) +endif() + install(TARGETS ${TARGET_NAME} DESTINATION ${INSTALL_FOLDER}) # Install debug symbols