|
@@ -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_JSON "Use system Nlohmann JSON" OFF)
|
|
|
option(NO_WEBSOCKET "Disable WebSocket support" OFF)
|
|
|
option(NO_MEDIA "Disable media transport support" OFF)
|
|
|
option(NO_EXAMPLES "Disable examples" OFF)
|
|
@@ -473,7 +474,11 @@ endif()
|
|
|
# Examples
|
|
|
if(NOT NO_EXAMPLES)
|
|
|
set(JSON_BuildTests OFF CACHE INTERNAL "")
|
|
|
- add_subdirectory(deps/json EXCLUDE_FROM_ALL)
|
|
|
+ if(USE_SYSTEM_JSON)
|
|
|
+ find_package(nlohmann_json REQUIRED)
|
|
|
+ else()
|
|
|
+ add_subdirectory(deps/json EXCLUDE_FROM_ALL)
|
|
|
+ endif()
|
|
|
|
|
|
if(NOT NO_WEBSOCKET)
|
|
|
add_subdirectory(examples/client)
|