blob: fd8631c4381f10b8f627081a3d922e58c21c49cd [file] [log] [blame]
deadbeef4b1bf6c2017-02-22 23:45:38 -08001# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../webrtc.gni")
10if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
14
deadbeefe814a0d2017-02-25 18:15:09 -080015rtc_static_library("ortc") {
16 defines = []
17 sources = [
18 "ortcfactory.cc",
19 "ortcfactory.h",
20 "ortcrtpreceiveradapter.cc",
21 "ortcrtpreceiveradapter.h",
22 "ortcrtpsenderadapter.cc",
23 "ortcrtpsenderadapter.h",
24 "rtpparametersconversion.cc",
25 "rtpparametersconversion.h",
26 "rtptransportadapter.cc",
27 "rtptransportadapter.h",
28 "rtptransportcontrolleradapter.cc",
29 "rtptransportcontrolleradapter.h",
30 ]
31
32 # TODO(deadbeef): Create a separate target for the common things ORTC and
33 # PeerConnection code shares, so that ortc can depend on that instead of
34 # libjingle_peerconnection.
35 deps = [
ossueb1fde42017-05-02 06:46:30 -070036 "../api/audio_codecs:builtin_audio_decoder_factory",
37 "../api/audio_codecs:builtin_audio_encoder_factory",
mbonadeicde25282017-04-11 02:52:49 -070038 "../base:rtc_base",
39 "../base:rtc_base_approved",
40 "../call:call_interfaces",
41 "../logging:rtc_event_log_api",
42 "../media:rtc_media",
43 "../media:rtc_media_base",
mbonadeicde25282017-04-11 02:52:49 -070044 "../p2p:rtc_p2p",
deadbeefe814a0d2017-02-25 18:15:09 -080045 "../pc:libjingle_peerconnection",
mbonadeicde25282017-04-11 02:52:49 -070046 "../pc:rtc_pc",
deadbeefe814a0d2017-02-25 18:15:09 -080047 ]
48
49 public_deps = [
50 "../api:ortc_api",
51 ]
52
53 if (!build_with_chromium && is_clang) {
54 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
55 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
56 }
57}
58
deadbeef4b1bf6c2017-02-22 23:45:38 -080059if (rtc_include_tests) {
60 rtc_test("ortc_unittests") {
61 testonly = true
62
63 sources = [
deadbeefe814a0d2017-02-25 18:15:09 -080064 "ortcfactory_integrationtest.cc",
65 "ortcfactory_unittest.cc",
66 "ortcrtpreceiver_unittest.cc",
67 "ortcrtpsender_unittest.cc",
68 "rtpparametersconversion_unittest.cc",
69 "rtptransport_unittest.cc",
70 "rtptransportcontroller_unittest.cc",
zhihuangd3501ad2017-03-03 14:39:06 -080071 "srtptransport_unittest.cc",
deadbeefe814a0d2017-02-25 18:15:09 -080072 "testrtpparameters.cc",
73 "testrtpparameters.h",
deadbeef4b1bf6c2017-02-22 23:45:38 -080074 ]
75
76 deps = [
deadbeefe814a0d2017-02-25 18:15:09 -080077 ":ortc",
mbonadeicde25282017-04-11 02:52:49 -070078 "../base:rtc_base",
79 "../base:rtc_base_approved",
mbonadei9087d492017-04-25 00:35:35 -070080 "../base:rtc_base_tests_main",
deadbeefe814a0d2017-02-25 18:15:09 -080081 "../base:rtc_base_tests_utils",
mbonadei9087d492017-04-25 00:35:35 -070082 "../media:rtc_media_tests_utils",
deadbeef59edb922017-04-18 15:49:09 -070083 "../p2p:p2p_test_utils",
mbonadeicde25282017-04-11 02:52:49 -070084 "../p2p:rtc_p2p",
deadbeefe814a0d2017-02-25 18:15:09 -080085 "../pc:pc_test_utils",
86 "../system_wrappers:metrics_default",
deadbeef4b1bf6c2017-02-22 23:45:38 -080087 ]
88
deadbeefe814a0d2017-02-25 18:15:09 -080089 if (!build_with_chromium && is_clang) {
90 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
91 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
92 }
93
deadbeef4b1bf6c2017-02-22 23:45:38 -080094 if (is_android) {
95 deps += [ "//testing/android/native_test:native_test_support" ]
96 }
97 }
98}