From b0a476735d0dab4cf9b948d68d536843e56ab425 Mon Sep 17 00:00:00 2001 From: srcejon Date: Tue, 8 Oct 2024 22:00:19 +0100 Subject: [PATCH] Fix flac on Mac --- external/CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index dc97cb3d8..137e77f26 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -855,7 +855,9 @@ if(ENABLE_CHANNELRX_REMOTETCPSINK) if (WIN32) set(FLAC_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/FLAC.lib" CACHE INTERNAL "") elseif (LINUX) - set(FLAC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libFLAC${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") + set(FLAC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/flac/src/flac-build/src/libFLAC/libFLAC${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") + elseif (APPLE) + set(FLAC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/flac/src/flac-build/src/libFLAC/libFLAC${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") elseif (EMSCRIPTEN) set(FLAC_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/flac/src/flac-build/src/libFLAC/libFLAC.a" CACHE INTERNAL "") endif() @@ -875,10 +877,9 @@ if(ENABLE_CHANNELRX_REMOTETCPSINK) if (WIN32) install(FILES "${SDRANGEL_BINARY_BIN_DIR}/FLAC${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}") elseif (APPLE) - set(FLAC_LIBRARIES "${binary_dir}/flac/libFLAC${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "") - install(DIRECTORY "${binary_dir}/libFLAC" DESTINATION "${INSTALL_LIB_DIR}" + install(DIRECTORY "${EXTERNAL_BUILD_LIBRARIES}/flac/src/flac-build/src/libFLAC" DESTINATION "${INSTALL_LIB_DIR}" FILES_MATCHING PATTERN "libFLAC*${CMAKE_SHARED_LIBRARY_SUFFIX}") - set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}/libFLAC") + set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${EXTERNAL_BUILD_LIBRARIES}/flac/src/flac-build/src/libFLAC") endif () endif ()