Skip to content

Commit e62aa6a

Browse files
SypingJaskowicz1
andauthored
fix BUILD_VOICE_SUPPORT=OFF static build (#1338)
Co-authored-by: Archie Jaskowicz <archiejaskowicz@gmail.com>
1 parent f19208e commit e62aa6a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

library/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,17 +411,20 @@ if(DPP_FORMATTERS)
411411
endif()
412412

413413
if (NOT BUILD_SHARED_LIBS)
414-
add_library(dppstatic STATIC
414+
if (HAVE_VOICE)
415+
add_library(dppstatic STATIC
415416
$<TARGET_OBJECTS:dpp>
416417
$<TARGET_OBJECTS:hpke>
417418
$<TARGET_OBJECTS:tls_syntax>
418419
$<TARGET_OBJECTS:mls_vectors>
419420
$<TARGET_OBJECTS:mlspp>
420421
$<TARGET_OBJECTS:bytes>
421-
)
422-
if (HAVE_VOICE)
422+
)
423423
target_link_libraries(dppstatic ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES} ${OPUS_LIBRARIES} -static-libgcc -static-libstdc++)
424424
else()
425+
add_library(dppstatic STATIC
426+
$<TARGET_OBJECTS:dpp>
427+
)
425428
target_link_libraries(dppstatic ${ZLIB_LIBRARIES} ${OPENSSL_LIBRARIES})
426429
endif()
427430
endif()

0 commit comments

Comments
 (0)