From e776b65b176b7a338a2eaa6eac202c0fe5ab0e7e Mon Sep 17 00:00:00 2001 From: David Lane <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 7 Mar 2026 07:23:26 -0500 Subject: [PATCH] build(homebrew): dynamic link opus (#4826) --- cmake/dependencies/common.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/dependencies/common.cmake b/cmake/dependencies/common.cmake index ed67c5cfe..119ad8e64 100644 --- a/cmake/dependencies/common.cmake +++ b/cmake/dependencies/common.cmake @@ -33,7 +33,12 @@ include_directories(SYSTEM ${MINIUPNP_INCLUDE_DIRS}) include("${CMAKE_MODULE_PATH}/dependencies/ffmpeg.cmake") # Opus -set(OPUS_USE_STATIC ON CACHE BOOL "Static linking for libopus") +# Homebrew provides opus as a dynamic library only, so disable static linking for Homebrew builds +if(SUNSHINE_BUILD_HOMEBREW) + set(OPUS_USE_STATIC OFF CACHE BOOL "Static linking for libopus") +else() + set(OPUS_USE_STATIC ON CACHE BOOL "Static linking for libopus") +endif() include("${CMAKE_MODULE_PATH}/dependencies/FindOpus.cmake") # platform specific dependencies