Move WEBRTC_BUILD_LIBEVENT definition to base/BUILD.gn and base/base.gyp. This use all_dependent_configs (GN) / all_dependent_settings (GYP) to export WEBRTC_BUILD_LIBEVENT to all dependent targets transitively. This fixes a problem with dependent projects in Chromium that indirectly include task_queue.h
BUG=webrtc:5687 R=tommi@webrtc.org Review URL: https://codereview.webrtc.org/2153563003 . Cr-Commit-Position: refs/heads/master@{#13481}
This commit is contained in:
parent
9ad0db51a6
commit
33b9c8fb03
@ -175,10 +175,6 @@ config("common_config") {
|
||||
}
|
||||
}
|
||||
|
||||
if (rtc_enable_libevent) {
|
||||
defines += [ "WEBRTC_BUILD_LIBEVENT" ]
|
||||
}
|
||||
|
||||
if (current_cpu == "arm64") {
|
||||
defines += [ "WEBRTC_ARCH_ARM64" ]
|
||||
defines += [ "WEBRTC_HAS_NEON" ]
|
||||
|
||||
@ -187,6 +187,10 @@ static_library("rtc_base_approved") {
|
||||
}
|
||||
}
|
||||
|
||||
config("enable_libevent_config") {
|
||||
defines = [ "WEBRTC_BUILD_LIBEVENT" ]
|
||||
}
|
||||
|
||||
static_library("rtc_task_queue") {
|
||||
public_deps = [
|
||||
":rtc_base_approved",
|
||||
@ -212,6 +216,7 @@ static_library("rtc_task_queue") {
|
||||
"task_queue_libevent.cc",
|
||||
"task_queue_posix.cc",
|
||||
]
|
||||
all_dependent_configs = [ ":enable_libevent_config" ]
|
||||
} else {
|
||||
if (is_mac || is_ios) {
|
||||
sources += [
|
||||
|
||||
@ -155,6 +155,10 @@
|
||||
'task_queue_libevent.cc',
|
||||
'task_queue_posix.cc',
|
||||
],
|
||||
'defines': [ 'WEBRTC_BUILD_LIBEVENT' ],
|
||||
'all_dependent_settings': {
|
||||
'defines': [ 'WEBRTC_BUILD_LIBEVENT' ]
|
||||
},
|
||||
}, {
|
||||
# If not libevent, fall back to the other task queues.
|
||||
'conditions': [
|
||||
|
||||
@ -344,11 +344,6 @@
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['enable_libevent==1', {
|
||||
'defines': [
|
||||
'WEBRTC_BUILD_LIBEVENT',
|
||||
],
|
||||
}],
|
||||
['target_arch=="arm64"', {
|
||||
'defines': [
|
||||
'WEBRTC_ARCH_ARM64',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user