|
@@ -291,14 +291,16 @@ if (USE_GNUTLS)
|
|
|
IMPORTED_LINK_INTERFACE_LANGUAGES C
|
|
|
IMPORTED_LOCATION "${GNUTLS_LIBRARIES}")
|
|
|
endif()
|
|
|
+ target_compile_definitions(datachannel PRIVATE USE_GNUTLS=1)
|
|
|
+ target_compile_definitions(datachannel-static PRIVATE USE_GNUTLS=1)
|
|
|
+ target_link_libraries(datachannel PRIVATE GnuTLS::GnuTLS)
|
|
|
+ target_link_libraries(datachannel-static PRIVATE GnuTLS::GnuTLS)
|
|
|
if (NOT NO_WEBSOCKET)
|
|
|
- # Needed for SHA1
|
|
|
+ # Needed for SHA1, it should be present as GnuTLS cryptography backend
|
|
|
find_package(Nettle REQUIRED)
|
|
|
+ target_link_libraries(datachannel PRIVATE Nettle::Nettle)
|
|
|
+ target_link_libraries(datachannel-static PRIVATE Nettle::Nettle)
|
|
|
endif()
|
|
|
- target_compile_definitions(datachannel PRIVATE USE_GNUTLS=1)
|
|
|
- target_compile_definitions(datachannel-static PRIVATE USE_GNUTLS=1)
|
|
|
- target_link_libraries(datachannel PRIVATE GnuTLS::GnuTLS Nettle::Nettle)
|
|
|
- target_link_libraries(datachannel-static PRIVATE GnuTLS::GnuTLS Nettle::Nettle)
|
|
|
else()
|
|
|
if(APPLE)
|
|
|
# This is a bug in CMake that causes it to prefer the system version over
|
|
@@ -407,13 +409,17 @@ endif()
|
|
|
if(NOT NO_EXAMPLES)
|
|
|
set(JSON_BuildTests OFF CACHE INTERNAL "")
|
|
|
add_subdirectory(deps/json EXCLUDE_FROM_ALL)
|
|
|
- add_subdirectory(examples/client)
|
|
|
- add_subdirectory(examples/client-benchmark)
|
|
|
-if(NOT NO_MEDIA)
|
|
|
- add_subdirectory(examples/media)
|
|
|
- add_subdirectory(examples/sfu-media)
|
|
|
- add_subdirectory(examples/streamer)
|
|
|
-endif()
|
|
|
+ if(NOT NO_WEBSOCKET)
|
|
|
+ add_subdirectory(examples/client)
|
|
|
+ add_subdirectory(examples/client-benchmark)
|
|
|
+ endif()
|
|
|
+ if(NOT NO_MEDIA)
|
|
|
+ add_subdirectory(examples/media)
|
|
|
+ add_subdirectory(examples/sfu-media)
|
|
|
+ endif()
|
|
|
+ if(NOT NO_MEDIA AND NOT NO_WEBSOCKET)
|
|
|
+ add_subdirectory(examples/streamer)
|
|
|
+ endif()
|
|
|
add_subdirectory(examples/copy-paste)
|
|
|
add_subdirectory(examples/copy-paste-capi)
|
|
|
endif()
|