blob: ca4f70667f56edf95c299a99842998b47c98ce13 [file] [log] [blame]
Sami Kalliomaki9c0c75b2016-06-29 12:55:001# 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 11:10:349import("../build/webrtc.gni")
Sami Kalliomaki9c0c75b2016-06-29 12:55:0010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-08 04:37:4513} 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 12:55:0017}
18
19group("examples") {
kjellander6ceab082016-10-28 12:44:0320 # This target shall build all targets in examples.
21 testonly = true
kjellander705ecc52016-09-15 07:53:2622 public_deps = []
Sami Kalliomaki9c0c75b2016-06-29 12:55:0023
tkchin2ddfdba2016-08-08 04:37:4524 if (is_android) {
kjellander6ceab082016-10-28 12:44:0325 public_deps += [
26 ":AppRTCMobile",
27 ":AppRTCMobileTest",
28 ]
29 }
30
charujainaca3a242016-11-01 10:09:1531 if (!build_with_chromium) {
32 public_deps += [ ":stun_prober" ]
33 }
34
kjellander6ceab082016-10-28 12:44:0335 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertc1815cf2016-09-27 08:10:4136 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:0037 }
kjellander6ceab082016-10-28 12:44:0338
39 if (is_linux || is_win) {
kjellander705ecc52016-09-15 07:53:2640 public_deps += [
kthelgason0727f152016-08-08 16:03:2341 ":peerconnection_client",
42 ":peerconnection_server",
43 ":relayserver",
44 ":stunserver",
45 ":turnserver",
46 ]
47 }
Sami Kalliomaki9c0c75b2016-06-29 12:55:0048}
49
tkchin2ddfdba2016-08-08 04:37:4550if (is_android) {
Magnus Jedvertc1815cf2016-09-27 08:10:4151 android_apk("AppRTCMobile") {
52 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 12:55:0053 android_manifest = "androidapp/AndroidManifest.xml"
54
55 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:4156 ":AppRTCMobile_javalib",
57 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0058 "//base:base_java",
59 "//webrtc/base:base_java",
60 ]
61
magjed768c6482016-12-06 12:29:3762 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:0063 }
64
Magnus Jedvertc1815cf2016-09-27 08:10:4165 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 12:55:0066 java_files = [
67 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 15:36:5668 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0069 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
70 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
71 "androidapp/src/org/appspot/apprtc/CallActivity.java",
72 "androidapp/src/org/appspot/apprtc/CallFragment.java",
73 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
74 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
75 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
76 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
77 "androidapp/src/org/appspot/apprtc/HudFragment.java",
78 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
79 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
80 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
81 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
82 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
83 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
84 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
85 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
86 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
87 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
88 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0089 ]
90
91 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:4192 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0093 "//webrtc/base:base_java",
94 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
magjed768c6482016-12-06 12:29:3795 "//webrtc/sdk/android:libjingle_peerconnection_java",
96 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:0097 ]
98 }
99
Magnus Jedvertc1815cf2016-09-27 08:10:41100 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 12:55:00101 resource_dirs = [ "androidapp/res" ]
102 custom_package = "org.appspot.apprtc"
103 }
104
Magnus Jedvertc1815cf2016-09-27 08:10:41105 instrumentation_test_apk("AppRTCMobileTest") {
106 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 12:55:00107 android_manifest = "androidtests/AndroidManifest.xml"
108
mandermoa8bec8d2016-10-26 08:47:07109 java_files = [
mandermo9890a582016-10-27 14:26:36110 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 08:47:07111 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
112 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
113 ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:00114
Magnus Jedvertc1815cf2016-09-27 08:10:41115 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 12:55:00116
117 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:41118 ":AppRTCMobile_javalib",
sakalcb79d512017-01-11 14:21:26119 "//base:base_java_test_support",
120 "//third_party/android_support_test_runner:runner_java",
121 "//third_party/junit",
magjed768c6482016-12-06 12:29:37122 "//webrtc/sdk/android:libjingle_peerconnection_java",
Sami Kalliomaki9c0c75b2016-06-29 12:55:00123 ]
mandermo9890a582016-10-27 14:26:36124
125 data = [
126 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
127 ]
Sami Kalliomaki9c0c75b2016-06-29 12:55:00128 }
Sami Kalliomaki9c0c75b2016-06-29 12:55:00129}
tkchin2ddfdba2016-08-08 04:37:45130
131if (is_ios || (is_mac && target_cpu != "x86")) {
132 config("warnings_config") {
133 # GN orders flags on a target before flags from configs. The default config
134 # adds these flags so to cancel them out they need to come from a config and
135 # cannot be on the target directly.
136 if (is_ios) {
137 # Suppress compiler warnings about deprecated that triggered
138 # when moving from ios_deployment_target 7.0 to 9.0.
139 # See webrtc:5549 for more details.
140 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-13 03:25:34141 cflags_objc = [
142 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
143 # See webrtc:6520.
144 "-Wno-objc-missing-property-synthesis",
145 ]
tkchin2ddfdba2016-08-08 04:37:45146 }
147 }
148
149 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41150 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-08 04:37:45151 }
152
kjellanderb62dbbe2016-09-23 07:38:52153 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-08 04:37:45154 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41155 "objc/AppRTCMobile/common/ARDUtilities.h",
156 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-08 04:37:45157 ]
158 configs += [
tkchin2ddfdba2016-08-08 04:37:45159 ":warnings_config",
160 "//build/config/compiler:enable_arc",
161 ]
ehmaldonadoe9cc6862016-09-05 13:10:18162 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-08 04:37:45163
164 deps = [
165 "../sdk:rtc_sdk_common_objc",
166 "../system_wrappers:field_trial_default",
167 "../system_wrappers:metrics_default",
168 ]
169 }
170
171 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41172 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-08 04:37:45173
174 # GN orders flags on a target before flags from configs. The default config
175 # adds these flags so to cancel them out they need to come from a config and
176 # cannot be on the target directly.
177 cflags = [
178 "-Wno-sign-compare",
179 "-Wno-unused-variable",
180 ]
181 if (is_mac) {
182 cflags += [ "-Wno-partial-availability" ]
183 }
184 }
185
kjellanderb62dbbe2016-09-23 07:38:52186 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-08 04:37:45187 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41188 "objc/AppRTCMobile/ARDAppClient+Internal.h",
189 "objc/AppRTCMobile/ARDAppClient.h",
190 "objc/AppRTCMobile/ARDAppClient.m",
191 "objc/AppRTCMobile/ARDAppEngineClient.h",
192 "objc/AppRTCMobile/ARDAppEngineClient.m",
193 "objc/AppRTCMobile/ARDBitrateTracker.h",
194 "objc/AppRTCMobile/ARDBitrateTracker.m",
195 "objc/AppRTCMobile/ARDCEODTURNClient.h",
196 "objc/AppRTCMobile/ARDCEODTURNClient.m",
197 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
198 "objc/AppRTCMobile/ARDJoinResponse.h",
199 "objc/AppRTCMobile/ARDJoinResponse.m",
200 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
201 "objc/AppRTCMobile/ARDMessageResponse.h",
202 "objc/AppRTCMobile/ARDMessageResponse.m",
203 "objc/AppRTCMobile/ARDRoomServerClient.h",
204 "objc/AppRTCMobile/ARDSDPUtils.h",
205 "objc/AppRTCMobile/ARDSDPUtils.m",
206 "objc/AppRTCMobile/ARDSignalingChannel.h",
207 "objc/AppRTCMobile/ARDSignalingMessage.h",
208 "objc/AppRTCMobile/ARDSignalingMessage.m",
209 "objc/AppRTCMobile/ARDStatsBuilder.h",
210 "objc/AppRTCMobile/ARDStatsBuilder.m",
211 "objc/AppRTCMobile/ARDTURNClient.h",
212 "objc/AppRTCMobile/ARDWebSocketChannel.h",
213 "objc/AppRTCMobile/ARDWebSocketChannel.m",
214 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
215 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
216 "objc/AppRTCMobile/RTCIceServer+JSON.h",
217 "objc/AppRTCMobile/RTCIceServer+JSON.m",
218 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
219 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
220 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
221 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-08 04:37:45222 ]
223 configs += [
tkchin2ddfdba2016-08-08 04:37:45224 "//build/config/compiler:enable_arc",
225 ":warnings_config",
226 ]
ehmaldonadoe9cc6862016-09-05 13:10:18227 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-08 04:37:45228 deps = [
229 ":apprtc_common",
230 ":socketrocket",
231 ]
232 public_deps = [
233 "../sdk:rtc_sdk_peerconnection_objc",
234 ]
235 libs = [ "QuartzCore.framework" ]
236 }
237
238 if (is_ios) {
denicija77bfd7c2016-11-15 08:41:26239 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-08 04:37:45240 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41241 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
242 "objc/AppRTCMobile/ios/ARDMainView.h",
243 "objc/AppRTCMobile/ios/ARDMainView.m",
244 "objc/AppRTCMobile/ios/ARDMainViewController.h",
245 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicija2256e042016-11-09 14:26:18246 "objc/AppRTCMobile/ios/ARDSettingsModel+Private.h",
247 "objc/AppRTCMobile/ios/ARDSettingsModel.h",
248 "objc/AppRTCMobile/ios/ARDSettingsModel.m",
249 "objc/AppRTCMobile/ios/ARDSettingsStore.h",
250 "objc/AppRTCMobile/ios/ARDSettingsStore.m",
denicijad17d5362016-11-02 09:56:09251 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
252 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 08:10:41253 "objc/AppRTCMobile/ios/ARDStatsView.h",
254 "objc/AppRTCMobile/ios/ARDStatsView.m",
255 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
256 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
257 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
258 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
259 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
260 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
261 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 08:41:26262 ]
263 configs += [
264 "//build/config/compiler:enable_arc",
265 ":warnings_config",
266 ]
267
268 deps = [
269 ":apprtc_common",
270 ":apprtc_signaling",
271 ]
272 }
273
274 ios_app_bundle("AppRTCMobile") {
275 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41276 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-08 04:37:45277 ]
278
Magnus Jedvertc1815cf2016-09-27 08:10:41279 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-08 04:37:45280
denicija77bfd7c2016-11-15 08:41:26281 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-08 04:37:45282 public_configs = [ "..:common_inherited_config" ]
283
284 deps = [
Magnus Jedvertc1815cf2016-09-27 08:10:41285 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 08:41:26286 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-08 04:37:45287 ]
288
289 if (target_cpu == "x86") {
290 deps += [ "//testing/iossim:iossim" ]
291 }
292 }
293
Magnus Jedvertc1815cf2016-09-27 08:10:41294 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-08 04:37:45295 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41296 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
297 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
298 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
299 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
300 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
301 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
302 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
303 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 11:53:16304 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
305 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 08:10:41306 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
307 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
308 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
309 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
310 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-08 04:37:45311 "objc/Icon.png",
312 ]
313 outputs = [
314 "{{bundle_resources_dir}}/{{source_file_part}}",
315 ]
316 }
317 }
318
319 if (is_mac) {
denicija77bfd7c2016-11-15 08:41:26320 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-08 04:37:45321 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41322 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
323 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
324 "objc/AppRTCMobile/mac/APPRTCViewController.h",
325 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-08 04:37:45326 ]
327 configs += [
tkchin2ddfdba2016-08-08 04:37:45328 "..:common_objc",
329 "//build/config/compiler:enable_arc",
330 ]
331 deps = [
332 ":apprtc_common",
333 ":apprtc_signaling",
334 ]
335 }
336
Magnus Jedvertc1815cf2016-09-27 08:10:41337 mac_app_bundle("AppRTCMobile") {
338 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-08 04:37:45339
340 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
341
342 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41343 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-08 04:37:45344 ]
345
346 public_configs = [ "..:common_inherited_config" ]
347
Magnus Jedvertc1815cf2016-09-27 08:10:41348 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-08 04:37:45349
350 libs = [ "AppKit.framework" ]
351
352 deps = [
denicija77bfd7c2016-11-15 08:41:26353 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-08 04:37:45354 ]
355 }
356 }
357
358 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 08:10:41359 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-08 04:37:45360 }
361
362 config("socketrocket_warning_config") {
363 # GN orders flags on a target before flags from configs. The default config
364 # adds these flags so to cancel them out they need to come from a config and
365 # cannot be on the target directly.
366 cflags = [
367 "-Wno-deprecated-declarations",
368 "-Wno-nonnull",
tkchin2ddfdba2016-08-08 04:37:45369 "-Wno-semicolon-before-method-body",
370 "-Wno-unused-variable",
371 ]
372
henrika27d8b612016-09-21 11:13:00373 cflags_objc = [
374 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
375 "-Wno-objc-missing-property-synthesis",
376
377 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
378 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
379 "-Wno-unused-result",
380 ]
tkchin2ddfdba2016-08-08 04:37:45381
382 if (is_mac) {
383 cflags += [ "-Wno-partial-availability" ]
384 }
385 }
386
kjellanderb62dbbe2016-09-23 07:38:52387 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-08 04:37:45388 sources = [
Magnus Jedvertc1815cf2016-09-27 08:10:41389 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
390 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-08 04:37:45391 ]
392 configs += [
tkchin2ddfdba2016-08-08 04:37:45393 "//build/config/compiler:enable_arc",
394 ":socketrocket_warning_config",
395 ]
ehmaldonadoe9cc6862016-09-05 13:10:18396 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-08 04:37:45397
398 libs = [
399 "CFNetwork.framework",
400 "icucore",
401 ]
402 }
adam.fedorbcc5d872016-11-07 22:53:28403
404 if (rtc_include_tests) {
405 config("rtc_apprtcmobile_config") {
406 defines = [ "GTEST_RELATIVE_PATH" ]
407 }
408
409 rtc_test("apprtcmobile_tests") {
denicija77bfd7c2016-11-15 08:41:26410 include_dirs = [ "objc/AppRTCMobile/ios" ]
adam.fedorbcc5d872016-11-07 22:53:28411 deps = [
denicija77bfd7c2016-11-15 08:41:26412 ":AppRTCMobile_lib",
adam.fedorbcc5d872016-11-07 22:53:28413 ":apprtc_signaling",
414 "//testing/gtest",
415 "//third_party/ocmock",
416 ]
417
418 sources = [
419 "objc/AppRTCMobile/tests/ARDAppClientTest.mm",
denicija77bfd7c2016-11-15 08:41:26420 "objc/AppRTCMobile/tests/ARDSettingsModelTests.mm",
adam.fedorbcc5d872016-11-07 22:53:28421 ]
422
423 if (is_ios) {
424 info_plist = "objc/AppRTCMobile/ios/Info.plist"
425 }
426
427 configs += [
428 ":rtc_apprtcmobile_config",
429 "//build/config/compiler:enable_arc",
430 ]
431 }
432 }
tkchin2ddfdba2016-08-08 04:37:45433}
kthelgason0727f152016-08-08 16:03:23434
435if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 20:31:24436 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 15:12:29437 cflags = []
ehmaldonadod02fe4b2016-08-26 20:31:24438 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 15:12:29439 cflags += [
ehmaldonadod02fe4b2016-08-26 20:31:24440 # Disable warnings failing when compiling with Clang on Windows.
441 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
442 "-Wno-format",
443
444 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
445 # for -Wno-reorder and -Wno-sign-compare
446 "-Wno-reorder",
447 "-Wno-sign-compare",
448 ]
449 }
kjellanderd4626e52016-09-07 09:33:01450 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 15:12:29451 cflags += [
kjellanderd4626e52016-09-07 09:33:01452 # Needed to compile on Linux 32-bit.
453 "-Wno-sentinel",
454 ]
455 }
kjellander4a9abad2016-09-18 15:12:29456
457 if (is_clang) {
458 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
459 # set of warnings.
460 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
461 cflags += [ "-Wno-inconsistent-missing-override" ]
462 }
ehmaldonadod02fe4b2016-08-26 20:31:24463 }
464
ehmaldonado38a21322016-09-02 11:10:34465 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 16:03:23466 sources = [
467 "peerconnection/client/conductor.cc",
468 "peerconnection/client/conductor.h",
469 "peerconnection/client/defaults.cc",
470 "peerconnection/client/defaults.h",
471 "peerconnection/client/peer_connection_client.cc",
472 "peerconnection/client/peer_connection_client.h",
473 ]
ehmaldonado7a2ce0b2016-09-05 08:35:44474
kjellandere40a7ee2016-10-17 06:56:12475 if (!build_with_chromium && is_clang) {
476 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34477 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 16:03:23478 }
479 if (is_win) {
480 sources += [
481 "peerconnection/client/flagdefs.h",
482 "peerconnection/client/main.cc",
483 "peerconnection/client/main_wnd.cc",
484 "peerconnection/client/main_wnd.h",
485 ]
486 cflags = [ "/wd4245" ]
487 configs += [ "//build/config/win:windowed" ]
488 }
thomasandersonef16e992016-12-13 10:57:43489 deps = [
490 "//third_party/libyuv",
491 "//webrtc/api:libjingle_peerconnection",
492 "//webrtc/system_wrappers:field_trial_default",
493 "//webrtc/system_wrappers:metrics_default",
494 ]
kthelgason0727f152016-08-08 16:03:23495 if (is_linux) {
496 sources += [
497 "peerconnection/client/linux/main.cc",
498 "peerconnection/client/linux/main_wnd.cc",
499 "peerconnection/client/linux/main_wnd.h",
500 ]
501 libs = [
502 "X11",
503 "Xcomposite",
504 "Xext",
505 "Xrender",
506 ]
thomasandersonef16e992016-12-13 10:57:43507 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 16:03:23508 }
ehmaldonadod02fe4b2016-08-26 20:31:24509 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 16:03:23510 if (rtc_build_json) {
511 deps += [ "//third_party/jsoncpp" ]
512 }
513 }
kjellanderd4626e52016-09-07 09:33:01514
ehmaldonado38a21322016-09-02 11:10:34515 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 16:03:23516 sources = [
517 "peerconnection/server/data_socket.cc",
518 "peerconnection/server/data_socket.h",
519 "peerconnection/server/main.cc",
520 "peerconnection/server/peer_channel.cc",
521 "peerconnection/server/peer_channel.h",
522 "peerconnection/server/utils.cc",
523 "peerconnection/server/utils.h",
524 ]
525 deps = [
526 "//webrtc:webrtc_common",
527 "//webrtc/base:rtc_base_approved",
528 "//webrtc/tools:command_line_parser",
529 ]
kjellandere40a7ee2016-10-17 06:56:12530 if (!build_with_chromium && is_clang) {
531 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34532 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 16:03:23533 }
534 }
ehmaldonado38a21322016-09-02 11:10:34535 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 16:03:23536 sources = [
537 "relayserver/relayserver_main.cc",
538 ]
539 deps = [
540 "//webrtc/base:rtc_base_approved",
541 "//webrtc/pc:rtc_pc",
542 "//webrtc/system_wrappers:field_trial_default",
543 "//webrtc/system_wrappers:metrics_default",
544 ]
kjellandere40a7ee2016-10-17 06:56:12545 if (!build_with_chromium && is_clang) {
546 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34547 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 16:03:23548 }
549 }
ehmaldonado38a21322016-09-02 11:10:34550 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 16:03:23551 sources = [
552 "turnserver/turnserver_main.cc",
553 ]
554 deps = [
555 "//webrtc/base:rtc_base_approved",
556 "//webrtc/pc:rtc_pc",
557 "//webrtc/system_wrappers:field_trial_default",
558 "//webrtc/system_wrappers:metrics_default",
559 ]
kjellandere40a7ee2016-10-17 06:56:12560 if (!build_with_chromium && is_clang) {
561 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34562 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 16:03:23563 }
564 }
ehmaldonado38a21322016-09-02 11:10:34565 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 16:03:23566 sources = [
567 "stunserver/stunserver_main.cc",
568 ]
569 deps = [
570 "//webrtc/base:rtc_base_approved",
571 "//webrtc/pc:rtc_pc",
572 "//webrtc/system_wrappers:field_trial_default",
573 "//webrtc/system_wrappers:metrics_default",
574 ]
kjellandere40a7ee2016-10-17 06:56:12575 if (!build_with_chromium && is_clang) {
576 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 11:10:34577 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 16:03:23578 }
579 }
580}
charujainaca3a242016-11-01 10:09:15581
582if (!build_with_chromium) {
583 # Doesn't build within Chrome on Win.
584 rtc_executable("stun_prober") {
585 sources = [
586 "stunprober/main.cc",
587 ]
588
589 if (!build_with_chromium && is_clang) {
590 # Suppress warnings from Chrome's Clang plugins.
591 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
592 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
593 }
594
595 deps = [
596 "../p2p:libstunprober",
597 "../p2p:rtc_p2p",
598 "../system_wrappers:field_trial_default",
599 ]
600 }
601}