blob: 03cbd6bca0e24b8f649c51ba80f79eda7cbe1446 [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 ]
kjellander6ceab082016-10-28 05:44:03 -070016 if (!build_with_chromium) {
17 # TODO(kjellander): Move this to examples or tools.
18 public_deps += [ ":stun_prober" ]
19 }
kjellanderc76dc952016-06-03 03:09:32 -070020}
21
22config("rtc_p2p_inherited_config") {
23 defines = [ "FEATURE_ENABLE_VOICEMAIL" ]
24}
25
kjellanderb62dbbe2016-09-23 00:38:52 -070026rtc_static_library("rtc_p2p") {
kjellanderc76dc952016-06-03 03:09:32 -070027 sources = [
28 "base/asyncstuntcpsocket.cc",
29 "base/asyncstuntcpsocket.h",
30 "base/basicpacketsocketfactory.cc",
31 "base/basicpacketsocketfactory.h",
32 "base/candidate.h",
33 "base/common.h",
kjellander5023d412016-06-18 04:23:01 -070034 "base/dtlstransport.h",
kjellanderc76dc952016-06-03 03:09:32 -070035 "base/dtlstransportchannel.cc",
36 "base/dtlstransportchannel.h",
37 "base/p2pconstants.cc",
38 "base/p2pconstants.h",
39 "base/p2ptransport.cc",
40 "base/p2ptransport.h",
41 "base/p2ptransportchannel.cc",
42 "base/p2ptransportchannel.h",
43 "base/packetsocketfactory.h",
johana9c7cfa2016-10-18 15:38:38 -070044 "base/packettransportinterface.h",
kjellanderc76dc952016-06-03 03:09:32 -070045 "base/port.cc",
46 "base/port.h",
47 "base/portallocator.cc",
48 "base/portallocator.h",
49 "base/portinterface.h",
50 "base/pseudotcp.cc",
51 "base/pseudotcp.h",
52 "base/relayport.cc",
53 "base/relayport.h",
kjellander5023d412016-06-18 04:23:01 -070054 "base/session.cc",
55 "base/session.h",
kjellanderc76dc952016-06-03 03:09:32 -070056 "base/sessiondescription.cc",
57 "base/sessiondescription.h",
kjellanderc76dc952016-06-03 03:09:32 -070058 "base/stun.cc",
59 "base/stun.h",
60 "base/stunport.cc",
61 "base/stunport.h",
62 "base/stunrequest.cc",
63 "base/stunrequest.h",
kjellanderc76dc952016-06-03 03:09:32 -070064 "base/tcpport.cc",
65 "base/tcpport.h",
66 "base/transport.cc",
67 "base/transport.h",
68 "base/transportchannel.cc",
69 "base/transportchannel.h",
70 "base/transportchannelimpl.h",
71 "base/transportcontroller.cc",
72 "base/transportcontroller.h",
73 "base/transportdescription.cc",
74 "base/transportdescription.h",
75 "base/transportdescriptionfactory.cc",
76 "base/transportdescriptionfactory.h",
77 "base/transportinfo.h",
78 "base/turnport.cc",
79 "base/turnport.h",
kjellanderc76dc952016-06-03 03:09:32 -070080 "base/udpport.h",
81 "client/basicportallocator.cc",
82 "client/basicportallocator.h",
kjellanderc76dc952016-06-03 03:09:32 -070083 "client/socketmonitor.cc",
84 "client/socketmonitor.h",
85 ]
86
87 defines = [ "FEATURE_ENABLE_SSL" ]
88
89 deps = [
90 "../base:rtc_base",
kjellanderc76dc952016-06-03 03:09:32 -070091 ]
92
93 if (rtc_build_expat) {
94 deps += [ "//third_party/expat" ]
95 public_deps = [
96 "//third_party/expat",
97 ]
98 }
99
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700100 public_configs = [ ":rtc_p2p_inherited_config" ]
kjellanderc76dc952016-06-03 03:09:32 -0700101
kjellander5023d412016-06-18 04:23:01 -0700102 if (build_with_chromium) {
103 if (is_nacl) {
104 deps += [ "//native_client_sdk/src/libraries/nacl_io" ]
105 }
106 } else {
107 sources += [
108 "base/relayserver.cc",
109 "base/relayserver.h",
110 "base/stunserver.cc",
111 "base/stunserver.h",
112 "base/turnserver.cc",
113 "base/turnserver.h",
114 ]
kjellanderc76dc952016-06-03 03:09:32 -0700115 defines += [
116 "FEATURE_ENABLE_VOICEMAIL",
117 "FEATURE_ENABLE_PSTN",
118 ]
119
kjellandere40a7ee2016-10-16 23:56:12 -0700120 if (!build_with_chromium && is_clang) {
121 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700122 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700123 }
124 }
125
126 if (rtc_use_quic) {
127 deps = [
128 "//third_party/libquic",
129 ]
130 sources += [
131 "quic/quicconnectionhelper.cc",
132 "quic/quicconnectionhelper.h",
133 "quic/quicsession.cc",
134 "quic/quicsession.h",
135 "quic/quictransport.cc",
136 "quic/quictransport.h",
137 "quic/quictransportchannel.cc",
138 "quic/quictransportchannel.h",
139 "quic/reliablequicstream.cc",
140 "quic/reliablequicstream.h",
141 ]
142 public_deps += [ "//third_party/libquic" ]
143 }
144}
145
kjellanderb62dbbe2016-09-23 00:38:52 -0700146rtc_static_library("libstunprober") {
kjellanderc76dc952016-06-03 03:09:32 -0700147 sources = [
148 "stunprober/stunprober.cc",
149 ]
150
151 if (!build_with_chromium && is_clang) {
152 # Suppress warnings from Chrome's Clang plugins.
153 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700154 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellanderc76dc952016-06-03 03:09:32 -0700155 }
156
157 deps = [
158 "..:webrtc_common",
159 "../base:rtc_base",
160 ]
161}
wjywbs5a601d92016-08-31 14:03:52 -0700162
Per3f9dd7c2016-09-01 17:05:55 +0200163if (!build_with_chromium) {
164 # Doesn't build within Chrome on Win.
ehmaldonado38a21322016-09-02 04:10:34 -0700165 rtc_executable("stun_prober") {
Per3f9dd7c2016-09-01 17:05:55 +0200166 sources = [
167 "stunprober/main.cc",
168 ]
169
Per3f9dd7c2016-09-01 17:05:55 +0200170 if (!build_with_chromium && is_clang) {
171 # Suppress warnings from Chrome's Clang plugins.
172 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
ehmaldonado38a21322016-09-02 04:10:34 -0700173 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
Per3f9dd7c2016-09-01 17:05:55 +0200174 }
175
176 deps = [
177 ":libstunprober",
178 ":rtc_p2p",
179 "../system_wrappers:field_trial_default",
180 ]
wjywbs5a601d92016-08-31 14:03:52 -0700181 }
wjywbs5a601d92016-08-31 14:03:52 -0700182}