From e62aa6a6a697ec09989b5abb2d1114626a28de7e Mon Sep 17 00:00:00 2001 From: Rafael Date: Sun, 1 Dec 2024 21:58:09 +0100 Subject: [PATCH] fix BUILD_VOICE_SUPPORT=OFF static build (#1338) Co-authored-by: Archie Jaskowicz --- library/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index c9714b0083..497a2defaf 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -411,17 +411,20 @@ if(DPP_FORMATTERS) endif() if (NOT BUILD_SHARED_LIBS) - add_library(dppstatic STATIC + if (HAVE_VOICE) + add_library(dppstatic STATIC $ $ $ $ $ $ - ) - if (HAVE_VOICE) + ) target_link_libraries(dppstatic ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${OPUS_LIBRARIES} -static-libgcc -static-libstdc++) else() + add_library(dppstatic STATIC + $ + ) target_link_libraries(dppstatic ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES}) endif() endif()