blob: a41d8c01ccd6fa118a19a2ec62781202394a6785 [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 = [
kjellanderc76dc952016-06-03 03:09:32 -070013 ":rtc_p2p",
14 ]
15}
16
17config("rtc_p2p_inherited_config") {
18 defines = [ "FEATURE_ENABLE_VOICEMAIL" ]
19}
20
kjellanderb62dbbe2016-09-23 00:38:52 -070021rtc_static_library("rtc_p2p") {
kjellanderc76dc952016-06-03 03:09:32 -070022 sources = [
23 "base/asyncstuntcpsocket.cc",
24 "base/asyncstuntcpsocket.h",
25 "base/basicpacketsocketfactory.cc",
26 "base/basicpacketsocketfactory.h",
27 "base/candidate.h",
28 "base/common.h",
kjellander5023d412016-06-18 04:23:01 -070029 "base/dtlstransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070030 "base/dtlstransportchannel.cc",
31 "base/dtlstransportchannel.h",
32 "base/p2pconstants.cc",
33 "base/p2pconstants.h",
34 "base/p2ptransport.cc",
35 "base/p2ptransport.h",
36 "base/p2ptransportchannel.cc",
37 "base/p2ptransportchannel.h",
38 "base/packetsocketfactory.h",
johana9c7cfa2016-10-18 15:38:38 -070039 "base/packettransportinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070040 "base/port.cc",
41 "base/port.h",
42 "base/portallocator.cc",
43 "base/portallocator.h",
44 "base/portinterface.h",
45 "base/pseudotcp.cc",
46 "base/pseudotcp.h",
47 "base/relayport.cc",
48 "base/relayport.h",
kjellander5023d412016-06-18 04:23:01 -070049 "base/session.cc",
50 "base/session.h",
kjellanderc76dc952016-06-03 03:09:32 -070051 "base/sessiondescription.cc",
52 "base/sessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070053 "base/stun.cc",
54 "base/stun.h",
55 "base/stunport.cc",
56 "base/stunport.h",
57 "base/stunrequest.cc",
58 "base/stunrequest.h",
kjellanderc76dc952016-06-03 03:09:32 -070059 "base/tcpport.cc",
60 "base/tcpport.h",
61 "base/transport.cc",
62 "base/transport.h",
63 "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",
76 "client/basicportallocator.cc",
77 "client/basicportallocator.h",
kjellanderc76dc952016-06-03 03:09:32 -070078 "client/socketmonitor.cc",
79 "client/socketmonitor.h",
80 ]
81
82 defines = [ "FEATURE_ENABLE_SSL" ]
83
84 deps = [
85 "../base:rtc_base",
86 "../libjingle/xmllite",
87 ]
88
89 if (rtc_build_expat) {
90 deps += [ "//third_party/expat" ]
91 public_deps = [
92 "//third_party/expat",
93 ]
94 }
95
ehmaldonadoe9cc6862016-09-05 06:10:18 -070096 public_configs = [ ":rtc_p2p_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -070097
kjellander5023d412016-06-18 04:23:01 -070098 if (build_with_chromium) {
99 if (is_nacl) {
100 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
101 }
102 } else {
103 sources += [
104 "base/relayserver.cc",
105 "base/relayserver.h",
106 "base/stunserver.cc",
107 "base/stunserver.h",
108 "base/turnserver.cc",
109 "base/turnserver.h",
110 ]
kjellanderc76dc952016-06-03 03:09:32 -0700111 defines += [
112 "FEATURE_ENABLE_VOICEMAIL",
113 "FEATURE_ENABLE_PSTN",
114 ]
115
kjellandere40a7ee2016-10-16 23:56:12 -0700116 if (!build_with_chromium && is_clang) {
117 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700118 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700119 }
120 }
121
122 if (rtc_use_quic) {
123 deps = [
124 "//third_party/libquic",
125 ]
126 sources += [
127 "quic/quicconnectionhelper.cc",
128 "quic/quicconnectionhelper.h",
129 "quic/quicsession.cc",
130 "quic/quicsession.h",
131 "quic/quictransport.cc",
132 "quic/quictransport.h",
133 "quic/quictransportchannel.cc",
134 "quic/quictransportchannel.h",
135 "quic/reliablequicstream.cc",
136 "quic/reliablequicstream.h",
137 ]
138 public_deps += [ "//third_party/libquic" ]
139 }
140}
141
kjellanderb62dbbe2016-09-23 00:38:52 -0700142rtc_static_library("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700143 sources = [
144 "stunprober/stunprober.cc",
145 ]
146
147 if (!build_with_chromium && is_clang) {
148 # Suppress warnings from Chrome's Clang plugins.
149 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700150 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700151 }
152
153 deps = [
154 "..:webrtc_common",
155 "../base:rtc_base",
156 ]
157}
wjywbs5a601d92016-08-31 14:03:52 -0700158
Per3f9dd7c2016-09-01 17:05:55 +0200159if (!build_with_chromium) {
160 # Doesn't build within Chrome on Win.
ehmaldonado38a21322016-09-02 04:10:34 -0700161 rtc_executable("stun_prober") {
Per3f9dd7c2016-09-01 17:05:55 +0200162 sources = [
163 "stunprober/main.cc",
164 ]
165
Per3f9dd7c2016-09-01 17:05:55 +0200166 if (!build_with_chromium && is_clang) {
167 # Suppress warnings from Chrome's Clang plugins.
168 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700169 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Per3f9dd7c2016-09-01 17:05:55 +0200170 }
171
172 deps = [
173 ":libstunprober",
174 ":rtc_p2p",
175 "../system_wrappers:field_trial_default",
176 ]
wjywbs5a601d92016-08-31 14:03:52 -0700177 }
wjywbs5a601d92016-08-31 14:03:52 -0700178}