blob: 3945e560c26ff8f361c51c80f685e6cb2660f814 [file] [log] [blame]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +02001# 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
ehmaldonado38a21322016-09-02 04:10:34 -07009import("../build/webrtc.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-07 21:37:45 -070013} else if (is_mac) {
14 import("//build/config/mac/rules.gni")
15} else if (is_ios) {
16 import("//build/config/ios/rules.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020017}
kthelgason0727f152016-08-08 09:03:23 -070018if (is_linux) {
19 import("//build/config/linux/pkg_config.gni")
20}
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020021
22group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070023 # This target shall build all targets in examples.
24 testonly = true
kjellander705ecc52016-09-15 00:53:26 -070025 public_deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020026
tkchin2ddfdba2016-08-07 21:37:45 -070027 if (is_android) {
kjellander6ceab082016-10-28 05:44:03 -070028 public_deps += [
29 ":AppRTCMobile",
30 ":AppRTCMobileTest",
31 ]
32 }
33
charujainaca3a242016-11-01 03:09:15 -070034 if (!build_with_chromium) {
35 public_deps += [ ":stun_prober" ]
36 }
37
kjellander6ceab082016-10-28 05:44:03 -070038 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020039 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020040 }
kjellander6ceab082016-10-28 05:44:03 -070041
42 if (is_linux || is_win) {
kjellander705ecc52016-09-15 00:53:26 -070043 public_deps += [
kthelgason0727f152016-08-08 09:03:23 -070044 ":peerconnection_client",
45 ":peerconnection_server",
46 ":relayserver",
47 ":stunserver",
48 ":turnserver",
49 ]
50 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020051}
52
tkchin2ddfdba2016-08-07 21:37:45 -070053if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020054 android_apk("AppRTCMobile") {
55 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020056 android_manifest = "androidapp/AndroidManifest.xml"
57
58 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020059 ":AppRTCMobile_javalib",
60 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020061 "//base:base_java",
62 "//webrtc/base:base_java",
63 ]
64
65 shared_libraries = [ "//webrtc/api:libjingle_peerconnection_so" ]
66 }
67
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020068 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020069 java_files = [
70 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
71 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
72 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
73 "androidapp/src/org/appspot/apprtc/CallActivity.java",
74 "androidapp/src/org/appspot/apprtc/CallFragment.java",
75 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
76 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
77 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
78 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
79 "androidapp/src/org/appspot/apprtc/HudFragment.java",
80 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
81 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
82 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
83 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
84 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
85 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
86 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
87 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
88 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
89 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
90 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020091 ]
92
93 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020094 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 "//webrtc/api:libjingle_peerconnection_java",
96 "//webrtc/base:base_java",
97 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
98 ]
99 }
100
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200101 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200102 resource_dirs = [ "androidapp/res" ]
103 custom_package = "org.appspot.apprtc"
104 }
105
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200106 instrumentation_test_apk("AppRTCMobileTest") {
107 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200108 android_manifest = "androidtests/AndroidManifest.xml"
109
mandermoa8bec8d2016-10-26 01:47:07 -0700110 java_files = [
mandermo9890a582016-10-27 07:26:36 -0700111 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -0700112 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
113 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
114 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200115
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200116 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200117
118 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200119 ":AppRTCMobile_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200120 "//webrtc/api:libjingle_peerconnection_java",
121 ]
mandermo9890a582016-10-27 07:26:36 -0700122
123 data = [
124 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
125 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200126 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200127}
tkchin2ddfdba2016-08-07 21:37:45 -0700128
129if (is_ios || (is_mac && target_cpu != "x86")) {
130 config("warnings_config") {
131 # GN orders flags on a target before flags from configs. The default config
132 # adds these flags so to cancel them out they need to come from a config and
133 # cannot be on the target directly.
134 if (is_ios) {
135 # Suppress compiler warnings about deprecated that triggered
136 # when moving from ios_deployment_target 7.0 to 9.0.
137 # See webrtc:5549 for more details.
138 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700139 cflags_objc = [
140 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
141 # See webrtc:6520.
142 "-Wno-objc-missing-property-synthesis",
143 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700144 }
145 }
146
147 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200148 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700149 }
150
kjellanderb62dbbe2016-09-23 00:38:52 -0700151 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700152 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200153 "objc/AppRTCMobile/common/ARDUtilities.h",
154 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700155 ]
156 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700157 ":warnings_config",
158 "//build/config/compiler:enable_arc",
159 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700160 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700161
162 deps = [
163 "../sdk:rtc_sdk_common_objc",
164 "../system_wrappers:field_trial_default",
165 "../system_wrappers:metrics_default",
166 ]
167 }
168
169 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200170 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700171
172 # GN orders flags on a target before flags from configs. The default config
173 # adds these flags so to cancel them out they need to come from a config and
174 # cannot be on the target directly.
175 cflags = [
176 "-Wno-sign-compare",
177 "-Wno-unused-variable",
178 ]
179 if (is_mac) {
180 cflags += [ "-Wno-partial-availability" ]
181 }
182 }
183
kjellanderb62dbbe2016-09-23 00:38:52 -0700184 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700185 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200186 "objc/AppRTCMobile/ARDAppClient+Internal.h",
187 "objc/AppRTCMobile/ARDAppClient.h",
188 "objc/AppRTCMobile/ARDAppClient.m",
189 "objc/AppRTCMobile/ARDAppEngineClient.h",
190 "objc/AppRTCMobile/ARDAppEngineClient.m",
191 "objc/AppRTCMobile/ARDBitrateTracker.h",
192 "objc/AppRTCMobile/ARDBitrateTracker.m",
193 "objc/AppRTCMobile/ARDCEODTURNClient.h",
194 "objc/AppRTCMobile/ARDCEODTURNClient.m",
195 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
196 "objc/AppRTCMobile/ARDJoinResponse.h",
197 "objc/AppRTCMobile/ARDJoinResponse.m",
198 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
199 "objc/AppRTCMobile/ARDMessageResponse.h",
200 "objc/AppRTCMobile/ARDMessageResponse.m",
201 "objc/AppRTCMobile/ARDRoomServerClient.h",
202 "objc/AppRTCMobile/ARDSDPUtils.h",
203 "objc/AppRTCMobile/ARDSDPUtils.m",
204 "objc/AppRTCMobile/ARDSignalingChannel.h",
205 "objc/AppRTCMobile/ARDSignalingMessage.h",
206 "objc/AppRTCMobile/ARDSignalingMessage.m",
207 "objc/AppRTCMobile/ARDStatsBuilder.h",
208 "objc/AppRTCMobile/ARDStatsBuilder.m",
209 "objc/AppRTCMobile/ARDTURNClient.h",
210 "objc/AppRTCMobile/ARDWebSocketChannel.h",
211 "objc/AppRTCMobile/ARDWebSocketChannel.m",
212 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
213 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
214 "objc/AppRTCMobile/RTCIceServer+JSON.h",
215 "objc/AppRTCMobile/RTCIceServer+JSON.m",
216 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
217 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
218 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
219 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700220 ]
221 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700222 "//build/config/compiler:enable_arc",
223 ":warnings_config",
224 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700225 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700226 deps = [
227 ":apprtc_common",
228 ":socketrocket",
229 ]
230 public_deps = [
231 "../sdk:rtc_sdk_peerconnection_objc",
232 ]
233 libs = [ "QuartzCore.framework" ]
234 }
235
236 if (is_ios) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200237 ios_app_bundle("AppRTCMobile") {
tkchin2ddfdba2016-08-07 21:37:45 -0700238 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200239 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
240 "objc/AppRTCMobile/ios/ARDMainView.h",
241 "objc/AppRTCMobile/ios/ARDMainView.m",
242 "objc/AppRTCMobile/ios/ARDMainViewController.h",
243 "objc/AppRTCMobile/ios/ARDMainViewController.m",
244 "objc/AppRTCMobile/ios/ARDStatsView.h",
245 "objc/AppRTCMobile/ios/ARDStatsView.m",
246 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
247 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
248 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
249 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
250 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
251 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
252 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
253 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700254 ]
255
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200256 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700257
258 configs += [
259 "..:common_config",
260 "//build/config/compiler:enable_arc",
261 ":warnings_config",
262 ]
263 public_configs = [ "..:common_inherited_config" ]
264
265 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200266 ":AppRTCMobile_ios_bundle_data",
tkchin2ddfdba2016-08-07 21:37:45 -0700267 ":apprtc_common",
268 ":apprtc_signaling",
269 ]
270
271 if (target_cpu == "x86") {
272 deps += [ "//testing/iossim:iossim" ]
273 }
274 }
275
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200276 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700277 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200278 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
279 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
280 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
281 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
282 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
283 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
284 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
285 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700286 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
287 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200288 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
289 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
290 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
291 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
292 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700293 "objc/Icon.png",
294 ]
295 outputs = [
296 "{{bundle_resources_dir}}/{{source_file_part}}",
297 ]
298 }
299 }
300
301 if (is_mac) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200302 rtc_static_library("AppRTCMobile_app") {
tkchin2ddfdba2016-08-07 21:37:45 -0700303 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200304 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
305 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
306 "objc/AppRTCMobile/mac/APPRTCViewController.h",
307 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700308 ]
309 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700310 "..:common_objc",
311 "//build/config/compiler:enable_arc",
312 ]
313 deps = [
314 ":apprtc_common",
315 ":apprtc_signaling",
316 ]
317 }
318
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200319 mac_app_bundle("AppRTCMobile") {
320 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700321
322 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
323
324 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200325 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700326 ]
327
328 public_configs = [ "..:common_inherited_config" ]
329
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200330 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700331
332 libs = [ "AppKit.framework" ]
333
334 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200335 ":AppRTCMobile_app",
tkchin2ddfdba2016-08-07 21:37:45 -0700336 ]
337 }
338 }
339
340 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200341 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700342 }
343
344 config("socketrocket_warning_config") {
345 # GN orders flags on a target before flags from configs. The default config
346 # adds these flags so to cancel them out they need to come from a config and
347 # cannot be on the target directly.
348 cflags = [
349 "-Wno-deprecated-declarations",
350 "-Wno-nonnull",
351 "-Wno-objc-missing-property-synthesis",
352 "-Wno-semicolon-before-method-body",
353 "-Wno-unused-variable",
354 ]
355
henrika27d8b612016-09-21 04:13:00 -0700356 cflags_objc = [
357 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
358 "-Wno-objc-missing-property-synthesis",
359
360 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
361 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
362 "-Wno-unused-result",
363 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700364
365 if (is_mac) {
366 cflags += [ "-Wno-partial-availability" ]
367 }
368 }
369
kjellanderb62dbbe2016-09-23 00:38:52 -0700370 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700371 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200372 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
373 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700374 ]
375 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700376 "//build/config/compiler:enable_arc",
377 ":socketrocket_warning_config",
378 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700379 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700380
381 libs = [
382 "CFNetwork.framework",
383 "icucore",
384 ]
385 }
386}
kthelgason0727f152016-08-08 09:03:23 -0700387
388if (is_linux || is_win) {
389 if (is_linux) {
390 pkg_config("gtk2_config") {
391 # Gtk requires gmodule, but it does not list it as a dependency in some
392 # misconfigured systems.
393 packages = [
394 "gmodule-2.0",
395 "gtk+-2.0",
396 "gthread-2.0",
397 ]
398 }
399 }
400
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700401 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700402 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700403 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700404 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700405 # Disable warnings failing when compiling with Clang on Windows.
406 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
407 "-Wno-format",
408
409 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
410 # for -Wno-reorder and -Wno-sign-compare
411 "-Wno-reorder",
412 "-Wno-sign-compare",
413 ]
414 }
kjellanderd4626e52016-09-07 02:33:01 -0700415 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700416 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700417 # Needed to compile on Linux 32-bit.
418 "-Wno-sentinel",
419 ]
420 }
kjellander4a9abad2016-09-18 08:12:29 -0700421
422 if (is_clang) {
423 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
424 # set of warnings.
425 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
426 cflags += [ "-Wno-inconsistent-missing-override" ]
427 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700428 }
429
ehmaldonado38a21322016-09-02 04:10:34 -0700430 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700431 sources = [
432 "peerconnection/client/conductor.cc",
433 "peerconnection/client/conductor.h",
434 "peerconnection/client/defaults.cc",
435 "peerconnection/client/defaults.h",
436 "peerconnection/client/peer_connection_client.cc",
437 "peerconnection/client/peer_connection_client.h",
438 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700439
kjellandere40a7ee2016-10-16 23:56:12 -0700440 if (!build_with_chromium && is_clang) {
441 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700442 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700443 }
444 if (is_win) {
445 sources += [
446 "peerconnection/client/flagdefs.h",
447 "peerconnection/client/main.cc",
448 "peerconnection/client/main_wnd.cc",
449 "peerconnection/client/main_wnd.h",
450 ]
451 cflags = [ "/wd4245" ]
452 configs += [ "//build/config/win:windowed" ]
453 }
454 if (is_linux) {
455 sources += [
456 "peerconnection/client/linux/main.cc",
457 "peerconnection/client/linux/main_wnd.cc",
458 "peerconnection/client/linux/main_wnd.h",
459 ]
460 libs = [
461 "X11",
462 "Xcomposite",
463 "Xext",
464 "Xrender",
465 ]
466 public_configs = [ ":gtk2_config" ]
467 }
468 deps = [
nisse9f8e37b2016-09-01 01:06:23 -0700469 "//third_party/libyuv",
kthelgason0727f152016-08-08 09:03:23 -0700470 "//webrtc/api:libjingle_peerconnection",
471 "//webrtc/system_wrappers:field_trial_default",
472 "//webrtc/system_wrappers:metrics_default",
473 ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700474 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700475 if (rtc_build_json) {
476 deps += [ "//third_party/jsoncpp" ]
477 }
478 }
kjellanderd4626e52016-09-07 02:33:01 -0700479
ehmaldonado38a21322016-09-02 04:10:34 -0700480 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700481 sources = [
482 "peerconnection/server/data_socket.cc",
483 "peerconnection/server/data_socket.h",
484 "peerconnection/server/main.cc",
485 "peerconnection/server/peer_channel.cc",
486 "peerconnection/server/peer_channel.h",
487 "peerconnection/server/utils.cc",
488 "peerconnection/server/utils.h",
489 ]
490 deps = [
491 "//webrtc:webrtc_common",
492 "//webrtc/base:rtc_base_approved",
493 "//webrtc/tools:command_line_parser",
494 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700495 if (!build_with_chromium && is_clang) {
496 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700497 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700498 }
499 }
ehmaldonado38a21322016-09-02 04:10:34 -0700500 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700501 sources = [
502 "relayserver/relayserver_main.cc",
503 ]
504 deps = [
505 "//webrtc/base:rtc_base_approved",
506 "//webrtc/pc:rtc_pc",
507 "//webrtc/system_wrappers:field_trial_default",
508 "//webrtc/system_wrappers:metrics_default",
509 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700510 if (!build_with_chromium && is_clang) {
511 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700512 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700513 }
514 }
ehmaldonado38a21322016-09-02 04:10:34 -0700515 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700516 sources = [
517 "turnserver/turnserver_main.cc",
518 ]
519 deps = [
520 "//webrtc/base:rtc_base_approved",
521 "//webrtc/pc:rtc_pc",
522 "//webrtc/system_wrappers:field_trial_default",
523 "//webrtc/system_wrappers:metrics_default",
524 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700525 if (!build_with_chromium && is_clang) {
526 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700527 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700528 }
529 }
ehmaldonado38a21322016-09-02 04:10:34 -0700530 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700531 sources = [
532 "stunserver/stunserver_main.cc",
533 ]
534 deps = [
535 "//webrtc/base:rtc_base_approved",
536 "//webrtc/pc:rtc_pc",
537 "//webrtc/system_wrappers:field_trial_default",
538 "//webrtc/system_wrappers:metrics_default",
539 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700540 if (!build_with_chromium && is_clang) {
541 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700542 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700543 }
544 }
545}
charujainaca3a242016-11-01 03:09:15 -0700546
547if (!build_with_chromium) {
548 # Doesn't build within Chrome on Win.
549 rtc_executable("stun_prober") {
550 sources = [
551 "stunprober/main.cc",
552 ]
553
554 if (!build_with_chromium && is_clang) {
555 # Suppress warnings from Chrome's Clang plugins.
556 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
557 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
558 }
559
560 deps = [
561 "../p2p:libstunprober",
562 "../p2p:rtc_p2p",
563 "../system_wrappers:field_trial_default",
564 ]
565 }
566}