|
@@ -9,6 +9,7 @@ option(USE_GNUTLS "Use GnuTLS instead of OpenSSL" OFF)
|
|
|
option(USE_NICE "Use libnice instead of libjuice" OFF)
|
|
|
option(USE_SYSTEM_SRTP "Use system libSRTP" OFF)
|
|
|
option(USE_SYSTEM_JUICE "Use system libjuice" OFF)
|
|
|
+option(USE_SYSTEM_USRSCTP "Use system libusrsctp" OFF)
|
|
|
option(USE_SYSTEM_PLOG "Use system Plog" OFF)
|
|
|
option(USE_SYSTEM_JSON "Use system Nlohmann JSON" OFF)
|
|
|
option(NO_WEBSOCKET "Disable WebSocket support" OFF)
|
|
@@ -214,19 +215,24 @@ endif()
|
|
|
if(SCTP_DEBUG)
|
|
|
add_definitions(-DSCTP_DEBUG)
|
|
|
endif()
|
|
|
-option(sctp_build_shared_lib OFF)
|
|
|
-option(sctp_build_programs OFF)
|
|
|
-option(sctp_inet OFF)
|
|
|
-option(sctp_inet6 OFF)
|
|
|
-set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
|
|
-add_subdirectory(deps/usrsctp EXCLUDE_FROM_ALL)
|
|
|
-if (MSYS OR MINGW)
|
|
|
- target_compile_definitions(usrsctp PUBLIC -DSCTP_STDINT_INCLUDE=<stdint.h>)
|
|
|
-endif()
|
|
|
-if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
|
- target_compile_options(usrsctp PRIVATE -Wno-error=format-truncation)
|
|
|
+
|
|
|
+if(USE_SYSTEM_USRSCTP)
|
|
|
+ find_package(Usrsctp REQUIRED)
|
|
|
+else()
|
|
|
+ option(sctp_build_shared_lib OFF)
|
|
|
+ option(sctp_build_programs OFF)
|
|
|
+ option(sctp_inet OFF)
|
|
|
+ option(sctp_inet6 OFF)
|
|
|
+ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
|
|
+ add_subdirectory(deps/usrsctp EXCLUDE_FROM_ALL)
|
|
|
+ if (MSYS OR MINGW)
|
|
|
+ target_compile_definitions(usrsctp PUBLIC -DSCTP_STDINT_INCLUDE=<stdint.h>)
|
|
|
+ endif()
|
|
|
+ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
|
+ target_compile_options(usrsctp PRIVATE -Wno-error=format-truncation)
|
|
|
+ endif()
|
|
|
+ add_library(Usrsctp::Usrsctp ALIAS usrsctp)
|
|
|
endif()
|
|
|
-add_library(Usrsctp::Usrsctp ALIAS usrsctp)
|
|
|
|
|
|
add_library(datachannel SHARED
|
|
|
${LIBDATACHANNEL_SOURCES}
|