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()