GN: Refactor webrtc/base/BUILD.gn
Move the all_dependent_configs configurations into a single config for better readability. Sync the Mac and iOS frameworks between the GYP and the GN build. Many entries that used to be default included in https://code.google.com/p/chromium/codesearch#chromium/src/build/config/BUILD.gn are no longer implicitly added for Mac, so to ensure they are they're added back for the Mac build. NOTRY=True Review URL: https://codereview.webrtc.org/1914913002 Cr-Commit-Position: refs/heads/master@{#12484}
This commit is contained in:
parent
84ba8b6f45
commit
b1f1406e06
@ -47,34 +47,29 @@ config("openssl_config") {
|
||||
]
|
||||
}
|
||||
|
||||
config("ios_config") {
|
||||
libs = [
|
||||
"AVFoundation.framework",
|
||||
"CFNetwork.framework",
|
||||
config("rtc_base_all_dependent_config") {
|
||||
if (is_ios) {
|
||||
libs = [
|
||||
"CFNetwork.framework",
|
||||
|
||||
#"Foundation.framework", # Already included in //build/config:default_libs.
|
||||
"Security.framework",
|
||||
"SystemConfiguration.framework",
|
||||
|
||||
#"UIKit.framework", # Already included in //build/config:default_libs.
|
||||
]
|
||||
}
|
||||
|
||||
config("mac_config") {
|
||||
libs = [
|
||||
"Cocoa.framework",
|
||||
|
||||
#"Foundation.framework", # Already included in //build/config:default_libs.
|
||||
#"IOKit.framework", # Already included in //build/config:default_libs.
|
||||
#"Security.framework", # Already included in //build/config:default_libs.
|
||||
"SystemConfiguration.framework",
|
||||
]
|
||||
}
|
||||
|
||||
config("mac_x86_config") {
|
||||
libs = [
|
||||
#"Carbon.framework", # Already included in //build/config:default_libs.
|
||||
]
|
||||
#"Foundation.framework", # Already in //build/config:default_libs.
|
||||
"Security.framework",
|
||||
"SystemConfiguration.framework",
|
||||
"UIKit.framework", # Already in //build/config:default_libs.
|
||||
]
|
||||
}
|
||||
if (is_mac) {
|
||||
libs = [
|
||||
"Cocoa.framework",
|
||||
"Foundation.framework",
|
||||
"IOKit.framework",
|
||||
"Security.framework",
|
||||
"SystemConfiguration.framework",
|
||||
]
|
||||
if (current_cpu == "x86") {
|
||||
libs = [ "Carbon.framework" ] # Already in //build/config:default_libs.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (is_linux && !build_with_chromium) {
|
||||
@ -209,6 +204,8 @@ static_library("rtc_base") {
|
||||
":rtc_base_config",
|
||||
]
|
||||
|
||||
all_dependent_configs = [ ":rtc_base_all_dependent_config" ]
|
||||
|
||||
defines = [ "LOGGING=1" ]
|
||||
|
||||
sources = [
|
||||
@ -495,9 +492,6 @@ static_library("rtc_base") {
|
||||
}
|
||||
|
||||
if (is_ios || is_mac) {
|
||||
if (is_ios) {
|
||||
all_dependent_configs = [ ":ios_config" ]
|
||||
}
|
||||
sources += [
|
||||
"maccocoathreadhelper.h",
|
||||
"maccocoathreadhelper.mm",
|
||||
@ -536,12 +530,6 @@ static_library("rtc_base") {
|
||||
"macutils.cc",
|
||||
"macutils.h",
|
||||
]
|
||||
|
||||
all_dependent_configs = [ ":mac_config" ]
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
all_dependent_configs += [ ":mac_x86_config" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user