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:
Per 2016-07-15 08:25:42 +02:00
parent 9ad0db51a6
commit 33b9c8fb03
4 changed files with 9 additions and 9 deletions

View File

@ -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" ]

View File

@ -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 += [

View File

@ -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': [

View File

@ -344,11 +344,6 @@
}],
],
}],
['enable_libevent==1', {
'defines': [
'WEBRTC_BUILD_LIBEVENT',
],
}],
['target_arch=="arm64"', {
'defines': [
'WEBRTC_ARCH_ARM64',