From 2f670df65e9b134bd643bd09e206cda21bc3768d Mon Sep 17 00:00:00 2001 From: Rafael Date: Wed, 27 Nov 2024 15:49:54 +0100 Subject: [PATCH] fix BUILD_VOICE_SUPPORT=OFF static build --- 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()