Files
platform-external-webrtc/webrtc/pc/BUILD.gn
mbonadei 9aa3f0a200 Reland of Moving webrtc.gni up one level from build/ (patchset #1 id:1 of https://codereview.webrtc.org/2657563002/ )
Reason for revert:
Starting to work on a fix (it seems that there are third_party dependencies that depends on the path to the webrtc.gni file)

Original issue's description:
> Revert of Moving webrtc.gni up one level from build/ (patchset #1 id:1 of https://codereview.webrtc.org/2651543003/ )
>
> Reason for revert:
> This was causing the following failure: https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder/builds/838/steps/generate_build_files/logs/stdio
>
> Original issue's description:
> > Moving webrtc.gni up one level from build/
> >
> > BUG=webrtc:7030
> >
> > Review-Url: https://codereview.webrtc.org/2651543003
> > Cr-Commit-Position: refs/heads/master@{#16241}
> > Committed: 35a32700fc
>
> TBR=kjellander@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:7030
>
> Review-Url: https://codereview.webrtc.org/2657563002
> Cr-Commit-Position: refs/heads/master@{#16244}
> Committed: 69dc7dbe24

TBR=kjellander@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:7030

Review-Url: https://codereview.webrtc.org/2654773002
Cr-Commit-Position: refs/heads/master@{#16247}
2017-01-24 14:58:22 +00:00

352 lines
9.3 KiB
Plaintext

# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
import("../webrtc.gni")
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
}
group("pc") {
public_deps = [
":rtc_pc",
]
}
config("rtc_pc_config") {
defines = [ "HAVE_SRTP" ]
if (rtc_enable_sctp) {
defines += [ "HAVE_SCTP" ]
}
}
rtc_static_library("rtc_pc") {
defines = []
sources = [
"audiomonitor.cc",
"audiomonitor.h",
"bundlefilter.cc",
"bundlefilter.h",
"channel.cc",
"channel.h",
"channelmanager.cc",
"channelmanager.h",
"currentspeakermonitor.cc",
"currentspeakermonitor.h",
"mediamonitor.cc",
"mediamonitor.h",
"mediasession.cc",
"mediasession.h",
"rtcpmuxfilter.cc",
"rtcpmuxfilter.h",
"srtpfilter.cc",
"srtpfilter.h",
"voicechannel.h",
]
deps = [
"../api:call_api",
"../base:rtc_base",
"../media",
]
if (build_with_chromium) {
sources += [
"externalhmac.cc",
"externalhmac.h",
]
}
if (rtc_build_libsrtp) {
deps += [ "//third_party/libsrtp" ]
}
public_configs = [ ":rtc_pc_config" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
config("libjingle_peerconnection_warnings_config") {
# GN orders flags on a target before flags from configs. The default config
# adds these flags so to cancel them out they need to come from a config and
# cannot be on the target directly.
if (!is_win && !is_clang) {
cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
}
}
rtc_static_library("libjingle_peerconnection") {
check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
cflags = []
sources = [
"audiotrack.cc",
"audiotrack.h",
"datachannel.cc",
"datachannel.h",
"dtmfsender.cc",
"dtmfsender.h",
"jsepicecandidate.cc",
"jsepsessiondescription.cc",
"localaudiosource.cc",
"localaudiosource.h",
"mediacontroller.cc",
"mediacontroller.h",
"mediastream.cc",
"mediastream.h",
"mediastreamobserver.cc",
"mediastreamobserver.h",
"mediastreamtrack.h",
"ortcfactory.cc",
"ortcfactory.h",
"peerconnection.cc",
"peerconnection.h",
"peerconnectionfactory.cc",
"peerconnectionfactory.h",
"remoteaudiosource.cc",
"remoteaudiosource.h",
"rtcstatscollector.cc",
"rtcstatscollector.h",
"rtpreceiver.cc",
"rtpreceiver.h",
"rtpsender.cc",
"rtpsender.h",
"sctputils.cc",
"sctputils.h",
"statscollector.cc",
"statscollector.h",
"streamcollection.h",
"videocapturertracksource.cc",
"videocapturertracksource.h",
"videotrack.cc",
"videotrack.h",
"videotracksource.cc",
"videotracksource.h",
"webrtcsdp.cc",
"webrtcsdp.h",
"webrtcsession.cc",
"webrtcsession.h",
"webrtcsessiondescriptionfactory.cc",
"webrtcsessiondescriptionfactory.h",
]
configs += [ ":libjingle_peerconnection_warnings_config" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
":rtc_pc",
"../api:call_api",
"../api:rtc_stats_api",
"../call",
"../media",
"../stats",
]
public_deps = [
"../api:libjingle_peerconnection_api",
]
if (rtc_use_quic) {
sources += [
"quicdatachannel.cc",
"quicdatachannel.h",
"quicdatatransport.cc",
"quicdatatransport.h",
]
deps += [ "//third_party/libquic" ]
public_deps = [
"//third_party/libquic",
]
}
}
if (rtc_include_tests) {
config("rtc_pc_unittests_config") {
# GN orders flags on a target before flags from configs. The default config
# adds -Wall, and this flag have to be after -Wall -- so they need to
# come from a config and can't be on the target directly.
if (!is_win && !is_clang) {
cflags = [ "-Wno-maybe-uninitialized" ] # Only exists for GCC.
}
}
rtc_test("rtc_pc_unittests") {
testonly = true
sources = [
"bundlefilter_unittest.cc",
"channel_unittest.cc",
"channelmanager_unittest.cc",
"currentspeakermonitor_unittest.cc",
"mediasession_unittest.cc",
"rtcpmuxfilter_unittest.cc",
"srtpfilter_unittest.cc",
]
include_dirs = [ "//third_party/libsrtp/srtp" ]
configs += [ ":rtc_pc_unittests_config" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
if (is_win) {
libs = [ "strmiids.lib" ]
}
deps = [
":libjingle_peerconnection",
":rtc_pc",
"../base:rtc_base_tests_utils",
"../media:rtc_unittest_main",
"../system_wrappers:metrics_default",
]
if (rtc_build_libsrtp) {
deps += [ "//third_party/libsrtp" ]
}
if (is_android) {
deps += [ "//testing/android/native_test:native_test_support" ]
}
}
config("peerconnection_unittests_config") {
# The warnings below are enabled by default. Since GN orders compiler flags
# for a target before flags from configs, the only way to disable such
# warnings is by having them in a separate config, loaded from the target.
# TODO(kjellander): Make the code compile without disabling these flags.
# See https://bugs.webrtc.org/3307.
if (is_clang && is_win) {
cflags = [
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6267
# for -Wno-sign-compare
"-Wno-sign-compare",
"-Wno-unused-function",
]
}
if (!is_win) {
cflags = [ "-Wno-sign-compare" ]
}
}
rtc_test("peerconnection_unittests") {
check_includes = false # TODO(kjellander): Remove (bugs.webrtc.org/6828)
testonly = true
sources = [
"datachannel_unittest.cc",
"dtmfsender_unittest.cc",
"fakemediacontroller.h",
"jsepsessiondescription_unittest.cc",
"localaudiosource_unittest.cc",
"mediaconstraintsinterface_unittest.cc",
"mediastream_unittest.cc",
"ortcfactory_unittest.cc",
"peerconnection_unittest.cc",
"peerconnectionendtoend_unittest.cc",
"peerconnectionfactory_unittest.cc",
"peerconnectioninterface_unittest.cc",
"proxy_unittest.cc",
"rtcstats_integrationtest.cc",
"rtcstatscollector_unittest.cc",
"rtpsenderreceiver_unittest.cc",
"sctputils_unittest.cc",
"statscollector_unittest.cc",
"test/fakeaudiocapturemodule.cc",
"test/fakeaudiocapturemodule.h",
"test/fakeaudiocapturemodule_unittest.cc",
"test/fakedatachannelprovider.h",
"test/fakeperiodicvideocapturer.h",
"test/fakertccertificategenerator.h",
"test/fakevideotrackrenderer.h",
"test/fakevideotracksource.h",
"test/mock_datachannel.h",
"test/mock_peerconnection.h",
"test/mock_webrtcsession.h",
"test/mockpeerconnectionobservers.h",
"test/peerconnectiontestwrapper.cc",
"test/peerconnectiontestwrapper.h",
"test/rtcstatsobtainer.h",
"test/testsdpstrings.h",
"videocapturertracksource_unittest.cc",
"videotrack_unittest.cc",
"webrtcsdp_unittest.cc",
"webrtcsession_unittest.cc",
]
if (rtc_enable_sctp) {
defines = [ "HAVE_SCTP" ]
}
configs += [ ":peerconnection_unittests_config" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
# TODO(jschuh): Bug 1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (is_win) {
cflags = [
"/wd4245", # conversion from int to size_t, signed/unsigned mismatch.
"/wd4389", # signed/unsigned mismatch.
]
}
if (rtc_use_quic) {
public_deps = [
"//third_party/libquic",
]
sources += [
"quicdatachannel_unittest.cc",
"quicdatatransport_unittest.cc",
]
}
deps = []
if (is_android) {
sources += [
"test/androidtestinitializer.cc",
"test/androidtestinitializer.h",
]
deps += [
"//testing/android/native_test:native_test_support",
"//webrtc/sdk/android:libjingle_peerconnection_java",
"//webrtc/sdk/android:libjingle_peerconnection_jni",
]
}
deps += [
":libjingle_peerconnection",
"..:webrtc_common",
"../api:fakemetricsobserver",
"../base:rtc_base_tests_utils",
"../media:rtc_unittest_main",
"../pc:rtc_pc",
"../system_wrappers:metrics_default",
"//testing/gmock",
]
if (is_android) {
deps += [ "//testing/android/native_test:native_test_support" ]
shard_timeout = 900
}
}
}