mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-17 07:37:51 +01:00

If a WebRTC build target requires gmock it has to include test/gmock.h and just depend on //test:test_support. Unfortunately //testtest_support was a leaky abstraction because it wasn't propagating the correct -I compiler flag. To make everything work, all the targets that use gmock started also to depend on //testing/gmock (even if they were not including any gmock header directly). This CL makes //testtest_support propagate the include path up in the dependency chain so it is possible to remove unused dependencies. Note: all_dependent_configs should probably be used in the original gmock target. There is an ongoing discussion about it. This CL solves the problem on WebRTC side and it is forward compatible. TBR=phoglund@webrtc.org Bug: webrtc:8603 Change-Id: If08daf2ce9a6431a6e881a236743b4ec33b59ea7 Reviewed-on: https://webrtc-review.googlesource.com/44340 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Oleh Prypin <oprypin@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21776}
404 lines
9.2 KiB
Text
404 lines
9.2 KiB
Text
# Copyright (c) 2015 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("api") {
|
|
visibility = [ "*" ]
|
|
deps = []
|
|
|
|
if (!build_with_mozilla) {
|
|
deps += [ ":libjingle_peerconnection_api" ]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("call_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"call/audio_sink.h",
|
|
]
|
|
|
|
deps = [
|
|
# TODO(kjellander): Add remaining dependencies when webrtc:4243 is done.
|
|
":audio_mixer_api",
|
|
":transport_api",
|
|
"..:webrtc_common",
|
|
"../rtc_base:rtc_base_approved",
|
|
"audio_codecs:audio_codecs_api",
|
|
]
|
|
}
|
|
|
|
rtc_static_library("libjingle_peerconnection_api") {
|
|
visibility = [ "*" ]
|
|
cflags = []
|
|
sources = [
|
|
"candidate.cc",
|
|
"candidate.h",
|
|
"cryptoparams.h",
|
|
"datachannelinterface.h",
|
|
"dtmfsenderinterface.h",
|
|
"jsep.cc",
|
|
"jsep.h",
|
|
"jsepicecandidate.h",
|
|
"jsepsessiondescription.h",
|
|
"mediaconstraintsinterface.cc",
|
|
"mediaconstraintsinterface.h",
|
|
"mediastreaminterface.cc",
|
|
"mediastreaminterface.h",
|
|
"mediastreamproxy.h",
|
|
"mediastreamtrackproxy.h",
|
|
"mediatypes.cc",
|
|
"mediatypes.h",
|
|
"notifier.h",
|
|
"peerconnectionfactoryproxy.h",
|
|
"peerconnectionproxy.h",
|
|
"proxy.cc",
|
|
"proxy.h",
|
|
"rtcerror.cc",
|
|
"rtcerror.h",
|
|
"rtp_headers.cc",
|
|
"rtp_headers.h",
|
|
"rtpparameters.cc",
|
|
"rtpparameters.h",
|
|
"rtpreceiverinterface.h",
|
|
"rtpsenderinterface.h",
|
|
"rtptransceiverinterface.h",
|
|
"setremotedescriptionobserverinterface.h",
|
|
"statstypes.cc",
|
|
"statstypes.h",
|
|
"turncustomizer.h",
|
|
"umametrics.cc",
|
|
"umametrics.h",
|
|
"videosinkinterface.h",
|
|
"videosourceinterface.cc",
|
|
"videosourceinterface.h",
|
|
"videosourceproxy.h",
|
|
]
|
|
|
|
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 = [
|
|
":array_view",
|
|
":audio_options_api",
|
|
":optional",
|
|
":peerconnection_and_implicit_call_api",
|
|
":rtc_stats_api",
|
|
":video_frame_api",
|
|
"audio_codecs:audio_codecs_api",
|
|
|
|
# Basically, don't add stuff here. You might break sensitive downstream
|
|
# targets like pnacl. API should not depend on anything outside of this
|
|
# file, really. All these should arguably go away in time.
|
|
"..:typedefs",
|
|
"..:webrtc_common",
|
|
"../media:rtc_media_config",
|
|
"../modules/audio_processing:audio_processing_statistics",
|
|
"../rtc_base:checks",
|
|
"../rtc_base:deprecation",
|
|
"../rtc_base:rtc_base",
|
|
"../rtc_base:rtc_base_approved",
|
|
"../rtc_base:stringutils",
|
|
]
|
|
if (is_nacl) {
|
|
# This is needed by .h files included from rtc_base.
|
|
deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("peerconnection_and_implicit_call_api") {
|
|
visibility = [ "*" ]
|
|
|
|
# The peerconnectioninterface.h file pulls in call/callfactoryinterface.h
|
|
# and the entire call module with it. We need to either get rid of this
|
|
# dependency or pull most of call/ into the API. For now, silence the warnings
|
|
# this creates since it creates a circular dependency (call very much depends
|
|
# on API). See bugs.webrtc.org/8667.
|
|
check_includes = false
|
|
sources = [
|
|
"peerconnectioninterface.h",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("libjingle_logging_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"rtceventlogoutput.h",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("ortc_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"ortc/mediadescription.cc",
|
|
"ortc/mediadescription.h",
|
|
"ortc/ortcfactoryinterface.h",
|
|
"ortc/ortcrtpreceiverinterface.h",
|
|
"ortc/ortcrtpsenderinterface.h",
|
|
"ortc/packettransportinterface.h",
|
|
"ortc/rtptransportcontrollerinterface.h",
|
|
"ortc/rtptransportinterface.h",
|
|
"ortc/sessiondescription.cc",
|
|
"ortc/sessiondescription.h",
|
|
"ortc/srtptransportinterface.h",
|
|
"ortc/udptransportinterface.h",
|
|
]
|
|
|
|
# For mediastreaminterface.h, etc.
|
|
# TODO(deadbeef): Create a separate target for the common things ORTC and
|
|
# PeerConnection code shares, so that ortc_api can depend on that instead of
|
|
# libjingle_peerconnection_api.
|
|
deps = [
|
|
":libjingle_peerconnection_api",
|
|
":optional",
|
|
"..:webrtc_common",
|
|
"../rtc_base:rtc_base",
|
|
]
|
|
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" ]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("rtc_stats_api") {
|
|
visibility = [ "*" ]
|
|
cflags = []
|
|
sources = [
|
|
"stats/rtcstats.h",
|
|
"stats/rtcstats_objects.h",
|
|
"stats/rtcstatscollectorcallback.h",
|
|
"stats/rtcstatsreport.h",
|
|
]
|
|
|
|
deps = [
|
|
"../rtc_base:checks",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("audio_mixer_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"audio/audio_mixer.h",
|
|
]
|
|
|
|
deps = [
|
|
"../modules:module_api",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("audio_options_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"audio_options.h",
|
|
]
|
|
|
|
deps = [
|
|
":optional",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("transport_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"call/transport.h",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("fec_controller_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"fec_controller.h",
|
|
]
|
|
|
|
deps = [
|
|
"../common_video:common_video",
|
|
"../modules:module_api",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("video_frame_api") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"video/video_content_type.cc",
|
|
"video/video_content_type.h",
|
|
"video/video_frame.cc",
|
|
"video/video_frame.h",
|
|
"video/video_frame_buffer.cc",
|
|
"video/video_frame_buffer.h",
|
|
"video/video_rotation.h",
|
|
"video/video_timing.cc",
|
|
"video/video_timing.h",
|
|
]
|
|
|
|
deps = [
|
|
"../rtc_base:checks",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("video_frame_api_i420") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"video/i420_buffer.cc",
|
|
"video/i420_buffer.h",
|
|
]
|
|
deps = [
|
|
":video_frame_api",
|
|
"../rtc_base:checks",
|
|
"../rtc_base:rtc_base",
|
|
"../system_wrappers",
|
|
"//third_party/libyuv",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("array_view") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"array_view.h",
|
|
]
|
|
deps = [
|
|
"../rtc_base:checks",
|
|
"../rtc_base:type_traits",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("optional") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"optional.cc",
|
|
"optional.h",
|
|
]
|
|
deps = [
|
|
":array_view",
|
|
"../rtc_base:checks",
|
|
"../rtc_base:sanitizer",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("refcountedbase") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"refcountedbase.h",
|
|
]
|
|
deps = [
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("libjingle_peerconnection_test_api") {
|
|
visibility = [ "*" ]
|
|
testonly = true
|
|
sources = [
|
|
"test/fakeconstraints.h",
|
|
]
|
|
|
|
deps = [
|
|
":libjingle_peerconnection_api",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
}
|
|
|
|
if (rtc_include_tests) {
|
|
rtc_source_set("mock_audio_mixer") {
|
|
testonly = true
|
|
sources = [
|
|
"test/mock_audio_mixer.h",
|
|
]
|
|
|
|
deps = [
|
|
":audio_mixer_api",
|
|
"../test:test_support",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("mock_rtp") {
|
|
testonly = true
|
|
sources = [
|
|
"test/mock_rtpreceiver.h",
|
|
"test/mock_rtpsender.h",
|
|
]
|
|
|
|
deps = [
|
|
":libjingle_peerconnection_api",
|
|
"../test:test_support",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("mock_video_codec_factory") {
|
|
testonly = true
|
|
sources = [
|
|
"test/mock_video_decoder_factory.h",
|
|
"test/mock_video_encoder_factory.h",
|
|
]
|
|
|
|
deps = [
|
|
"../api/video_codecs:video_codecs_api",
|
|
"../test:test_support",
|
|
]
|
|
}
|
|
|
|
rtc_source_set("fakemetricsobserver") {
|
|
testonly = true
|
|
sources = [
|
|
"fakemetricsobserver.cc",
|
|
"fakemetricsobserver.h",
|
|
]
|
|
deps = [
|
|
"../api:peerconnection_and_implicit_call_api",
|
|
"../media:rtc_media_base",
|
|
"../rtc_base:checks",
|
|
"../rtc_base:rtc_base_approved",
|
|
]
|
|
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 (!build_with_mozilla) {
|
|
deps += [ ":libjingle_peerconnection_api" ]
|
|
}
|
|
}
|
|
|
|
rtc_source_set("rtc_api_unittests") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"array_view_unittest.cc",
|
|
"optional_unittest.cc",
|
|
"ortc/mediadescription_unittest.cc",
|
|
"ortc/sessiondescription_unittest.cc",
|
|
"rtcerror_unittest.cc",
|
|
"rtpparameters_unittest.cc",
|
|
]
|
|
|
|
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 = [
|
|
":array_view",
|
|
":libjingle_peerconnection_api",
|
|
":libjingle_peerconnection_test_api",
|
|
":optional",
|
|
":ortc_api",
|
|
"../rtc_base:checks",
|
|
"../rtc_base:rtc_base_approved",
|
|
"../rtc_base:rtc_base_tests_utils",
|
|
"../test:test_support",
|
|
]
|
|
}
|
|
}
|