build: add options to configure libsrtp for boringssl or other libraries
Depends on https://webrtc-review.googlesource.com/c/src/+/359928 BUG=webrtc:42234521,webrtc:42224104 Change-Id: I0d6335aa5fb3f090c781bed234ed34d6c98ec299 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/359928 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Cr-Commit-Position: refs/heads/main@{#42857}
This commit is contained in:
parent
a46f10329c
commit
06a49f02bd
12
BUILD.gn
12
BUILD.gn
@ -512,6 +512,18 @@ config("common_objc") {
|
||||
frameworks = [ "Foundation.framework" ]
|
||||
}
|
||||
|
||||
if (!rtc_build_ssl) {
|
||||
config("external_ssl_library") {
|
||||
if (rtc_ssl_root != "") {
|
||||
include_dirs = [ rtc_ssl_root ]
|
||||
}
|
||||
libs = [
|
||||
"crypto",
|
||||
"ssl",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
if (!build_with_chromium) {
|
||||
# Target to build all the WebRTC production code.
|
||||
rtc_static_library("webrtc") {
|
||||
|
||||
@ -12,7 +12,7 @@ enable_java_templates = true
|
||||
# Enables assertions on safety checks in libc++.
|
||||
enable_safe_libcxx = true
|
||||
|
||||
# Don't set this variable to true when building stadalone WebRTC, it is
|
||||
# Don't set this variable to true when building standalone WebRTC, it is
|
||||
# only needed to support both WebRTC standalone and Chromium builds.
|
||||
build_with_chromium = false
|
||||
|
||||
|
||||
23
pc/BUILD.gn
23
pc/BUILD.gn
@ -34,6 +34,13 @@ if (is_android) {
|
||||
import("//build/config/android/rules.gni")
|
||||
}
|
||||
|
||||
if (rtc_build_libsrtp) {
|
||||
import("//third_party/libsrtp/options.gni")
|
||||
assert(rtc_build_ssl == libsrtp_build_boringssl,
|
||||
"Mismatch ssl build settings detected")
|
||||
assert(rtc_ssl_root == libsrtp_ssl_root, "Mismatch in ssl root detected")
|
||||
}
|
||||
|
||||
group("pc") {
|
||||
deps = [ ":rtc_pc" ]
|
||||
}
|
||||
@ -178,6 +185,10 @@ rtc_source_set("external_hmac") {
|
||||
]
|
||||
if (rtc_build_libsrtp) {
|
||||
deps += [ "//third_party/libsrtp" ]
|
||||
configs = []
|
||||
if (!rtc_build_ssl) {
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -613,6 +624,10 @@ rtc_source_set("srtp_session") {
|
||||
]
|
||||
if (rtc_build_libsrtp) {
|
||||
deps += [ "//third_party/libsrtp" ]
|
||||
configs = []
|
||||
if (!rtc_build_ssl) {
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
rtc_source_set("srtp_transport") {
|
||||
@ -1991,8 +2006,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
||||
"video_rtp_receiver_unittest.cc",
|
||||
]
|
||||
|
||||
include_dirs = [ "//third_party/libsrtp/srtp" ]
|
||||
|
||||
if (is_win) {
|
||||
libs = [ "strmiids.lib" ]
|
||||
}
|
||||
@ -2100,8 +2113,14 @@ if (rtc_include_tests && !build_with_chromium) {
|
||||
"//third_party/abseil-cpp/absl/types:optional",
|
||||
]
|
||||
|
||||
include_dirs = []
|
||||
configs = []
|
||||
if (rtc_build_libsrtp) {
|
||||
include_dirs += [ "//third_party/libsrtp/srtp" ]
|
||||
deps += [ "//third_party/libsrtp" ]
|
||||
if (!rtc_build_ssl) {
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
|
||||
@ -13,18 +13,6 @@ if (is_android) {
|
||||
import("//build/config/android/rules.gni")
|
||||
}
|
||||
|
||||
if (!rtc_build_ssl) {
|
||||
config("external_ssl_library") {
|
||||
if (rtc_ssl_root != "") {
|
||||
include_dirs = [ rtc_ssl_root ]
|
||||
}
|
||||
libs = [
|
||||
"crypto",
|
||||
"ssl",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
rtc_source_set("protobuf_utils") {
|
||||
sources = [ "protobuf_utils.h" ]
|
||||
if (rtc_enable_protobuf) {
|
||||
@ -1504,7 +1492,7 @@ rtc_source_set("digest") {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//third_party/boringssl" ]
|
||||
} else {
|
||||
configs += [ ":external_ssl_library" ]
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -1526,7 +1514,7 @@ rtc_library("crypto_random") {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//third_party/boringssl" ]
|
||||
} else {
|
||||
configs += [ ":external_ssl_library" ]
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -1591,7 +1579,7 @@ rtc_library("ssl") {
|
||||
]
|
||||
deps += [ ":crypto_random" ]
|
||||
|
||||
configs += [ ":external_ssl_library" ]
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
|
||||
if (build_with_chromium) {
|
||||
@ -1653,7 +1641,7 @@ rtc_library("ssl_adapter") {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//third_party/boringssl" ]
|
||||
} else {
|
||||
configs += [ ":external_ssl_library" ]
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
|
||||
@ -2211,7 +2199,7 @@ if (rtc_include_tests) {
|
||||
if (rtc_build_ssl) {
|
||||
deps += [ "//third_party/boringssl" ]
|
||||
} else {
|
||||
configs += [ ":external_ssl_library" ]
|
||||
configs += [ "..:external_ssl_library" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user