Skip to content

Commit 846b91e

Browse files
author
Lealem Amedie
committed
Enable DTLS-SRTP in CMake
1 parent 73d3277 commit 846b91e

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,18 @@ if(NOT WOLFSSL_SINGLE_THREADED)
268268
endif()
269269
endif()
270270

271+
# DTLS-SRTP
272+
add_option("WOLFSSL_SRTP"
273+
"Enables wolfSSL DTLS-SRTP (default: disabled)"
274+
"no" "yes;no")
275+
276+
if(WOLFSSL_SRTP)
277+
list(APPEND WOLFSSL_DEFINITIONS
278+
"-DWOLFSSL_SRTP")
279+
set(WOLFSSL_DTLS "yes")
280+
set(WOLFSSL_KEYING_MATERIAL "yes")
281+
endif()
282+
271283

272284
# DTLS
273285
add_option("WOLFSSL_DTLS"

cmake/functions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function(generate_build_flags)
5353
if(WOLFSSL_SCTP OR WOLFSSL_USER_SETTINGS)
5454
set(BUILD_SCTP "yes" PARENT_SCOPE)
5555
endif()
56-
if(WOLFSSL_DTLS_CID OR WOLFSSL_USER_SETTINGS)
56+
if(WOLFSSL_DTLS_CID OR WOLFSSL_USER_SETTINGS OR WOLFSSL_DTLS)
5757
set(BUILD_DTLS_COMMON "yes" PARENT_SCOPE)
5858
endif()
5959
set(BUILD_MCAST ${WOLFSSL_MCAST} PARENT_SCOPE)

0 commit comments

Comments
 (0)