blob: fd883e162fa759f5f7516ccca392b6fd82ee291c [file] [log] [blame]
kjellanderc76dc952016-06-03 03:09:32 -07001# Copyright (c) 2016 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("../build/webrtc.gni")
10
11group("p2p") {
kjellander705ecc52016-09-15 00:53:26 -070012 public_deps = [
kjellander6ceab082016-10-28 05:44:03 -070013 ":libstunprober",
kjellanderc76dc952016-06-03 03:09:32 -070014 ":rtc_p2p",
15 ]
16}
17
18config("rtc_p2p_inherited_config") {
19 defines = [ "FEATURE_ENABLE_VOICEMAIL" ]
20}
21
kjellanderb62dbbe2016-09-23 00:38:52 -070022rtc_static_library("rtc_p2p") {
kjellanderc76dc952016-06-03 03:09:32 -070023 sources = [
24 "base/asyncstuntcpsocket.cc",
25 "base/asyncstuntcpsocket.h",
26 "base/basicpacketsocketfactory.cc",
27 "base/basicpacketsocketfactory.h",
28 "base/candidate.h",
29 "base/common.h",
30 "base/dtlstransportchannel.cc",
31 "base/dtlstransportchannel.h",
zhihuang86abd6f2016-12-19 11:54:05 -080032 "base/icetransportinternal.h",
deadbeef49f34fd2016-12-06 16:22:06 -080033 "base/jseptransport.cc",
34 "base/jseptransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070035 "base/p2pconstants.cc",
36 "base/p2pconstants.h",
kjellanderc76dc952016-06-03 03:09:32 -070037 "base/p2ptransportchannel.cc",
38 "base/p2ptransportchannel.h",
39 "base/packetsocketfactory.h",
johana9c7cfa2016-10-18 15:38:38 -070040 "base/packettransportinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070041 "base/port.cc",
42 "base/port.h",
43 "base/portallocator.cc",
44 "base/portallocator.h",
45 "base/portinterface.h",
46 "base/pseudotcp.cc",
47 "base/pseudotcp.h",
48 "base/relayport.cc",
49 "base/relayport.h",
kjellander5023d412016-06-18 04:23:01 -070050 "base/session.cc",
51 "base/session.h",
kjellanderc76dc952016-06-03 03:09:32 -070052 "base/sessiondescription.cc",
53 "base/sessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070054 "base/stun.cc",
55 "base/stun.h",
56 "base/stunport.cc",
57 "base/stunport.h",
58 "base/stunrequest.cc",
59 "base/stunrequest.h",
kjellanderc76dc952016-06-03 03:09:32 -070060 "base/tcpport.cc",
61 "base/tcpport.h",
deadbeef57fd7262016-12-06 15:28:55 -080062 "base/transport.h",
kjellanderc76dc952016-06-03 03:09:32 -070063 "base/transportchannel.cc",
64 "base/transportchannel.h",
65 "base/transportchannelimpl.h",
66 "base/transportcontroller.cc",
67 "base/transportcontroller.h",
68 "base/transportdescription.cc",
69 "base/transportdescription.h",
70 "base/transportdescriptionfactory.cc",
71 "base/transportdescriptionfactory.h",
72 "base/transportinfo.h",
73 "base/turnport.cc",
74 "base/turnport.h",
kjellanderc76dc952016-06-03 03:09:32 -070075 "base/udpport.h",
johan6bedebf2016-11-09 13:44:09 -080076 "base/udptransportchannel.cc",
77 "base/udptransportchannel.h",
kjellanderc76dc952016-06-03 03:09:32 -070078 "client/basicportallocator.cc",
79 "client/basicportallocator.h",
kjellanderc76dc952016-06-03 03:09:32 -070080 "client/socketmonitor.cc",
81 "client/socketmonitor.h",
82 ]
83
84 defines = [ "FEATURE_ENABLE_SSL" ]
85
86 deps = [
87 "../base:rtc_base",
kjellanderc76dc952016-06-03 03:09:32 -070088 ]
89
90 if (rtc_build_expat) {
91 deps += [ "//third_party/expat" ]
92 public_deps = [
93 "//third_party/expat",
94 ]
95 }
96
ehmaldonadoe9cc6862016-09-05 06:10:18 -070097 public_configs = [ ":rtc_p2p_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070098
kjellander5023d412016-06-18 04:23:01 -070099 if (build_with_chromium) {
100 if (is_nacl) {
101 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
102 }
103 } else {
104 sources += [
105 "base/relayserver.cc",
106 "base/relayserver.h",
107 "base/stunserver.cc",
108 "base/stunserver.h",
109 "base/turnserver.cc",
110 "base/turnserver.h",
111 ]
kjellanderc76dc952016-06-03 03:09:32 -0700112 defines += [
113 "FEATURE_ENABLE_VOICEMAIL",
114 "FEATURE_ENABLE_PSTN",
115 ]
116
kjellandere40a7ee2016-10-16 23:56:12 -0700117 if (!build_with_chromium && is_clang) {
118 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700119 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700120 }
121 }
122
123 if (rtc_use_quic) {
124 deps = [
125 "//third_party/libquic",
126 ]
127 sources += [
128 "quic/quicconnectionhelper.cc",
129 "quic/quicconnectionhelper.h",
130 "quic/quicsession.cc",
131 "quic/quicsession.h",
132 "quic/quictransport.cc",
133 "quic/quictransport.h",
134 "quic/quictransportchannel.cc",
135 "quic/quictransportchannel.h",
136 "quic/reliablequicstream.cc",
137 "quic/reliablequicstream.h",
138 ]
139 public_deps += [ "//third_party/libquic" ]
140 }
141}
142
kjellanderb62dbbe2016-09-23 00:38:52 -0700143rtc_static_library("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700144 sources = [
145 "stunprober/stunprober.cc",
146 ]
147
148 if (!build_with_chromium && is_clang) {
149 # Suppress warnings from Chrome's Clang plugins.
150 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700151 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700152 }
153
154 deps = [
155 "..:webrtc_common",
156 "../base:rtc_base",
157 ]
158}