blob: 8c601349090b4a24af5b1b5801fb4bd2165d8a29 [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}
18
19group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070020 # This target shall build all targets in examples.
21 testonly = true
kjellander705ecc52016-09-15 00:53:26 -070022 public_deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020023
tkchin2ddfdba2016-08-07 21:37:45 -070024 if (is_android) {
kjellander6ceab082016-10-28 05:44:03 -070025 public_deps += [
26 ":AppRTCMobile",
27 ":AppRTCMobileTest",
28 ]
29 }
30
charujainaca3a242016-11-01 03:09:15 -070031 if (!build_with_chromium) {
32 public_deps += [ ":stun_prober" ]
33 }
34
kjellander6ceab082016-10-28 05:44:03 -070035 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020036 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020037 }
kjellander6ceab082016-10-28 05:44:03 -070038
39 if (is_linux || is_win) {
kjellander705ecc52016-09-15 00:53:26 -070040 public_deps += [
kthelgason0727f152016-08-08 09:03:23 -070041 ":peerconnection_client",
42 ":peerconnection_server",
43 ":relayserver",
44 ":stunserver",
45 ":turnserver",
46 ]
47 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020048}
49
tkchin2ddfdba2016-08-07 21:37:45 -070050if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020051 android_apk("AppRTCMobile") {
52 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020053 android_manifest = "androidapp/AndroidManifest.xml"
54
55 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020056 ":AppRTCMobile_javalib",
57 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020058 "//base:base_java",
59 "//webrtc/base:base_java",
60 ]
61
magjed768c6482016-12-06 04:29:37 -080062 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020063 }
64
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020065 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020066 java_files = [
67 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
68 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
69 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
70 "androidapp/src/org/appspot/apprtc/CallActivity.java",
71 "androidapp/src/org/appspot/apprtc/CallFragment.java",
72 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
73 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
74 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
75 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
76 "androidapp/src/org/appspot/apprtc/HudFragment.java",
77 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
78 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
79 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
80 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
81 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
82 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
83 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
84 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
85 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
86 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
87 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020088 ]
89
90 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020091 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020092 "//webrtc/base:base_java",
93 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
magjed768c6482016-12-06 04:29:37 -080094 "//webrtc/sdk/android:libjingle_peerconnection_java",
95 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020096 ]
97 }
98
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020099 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200100 resource_dirs = [ "androidapp/res" ]
101 custom_package = "org.appspot.apprtc"
102 }
103
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200104 instrumentation_test_apk("AppRTCMobileTest") {
105 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200106 android_manifest = "androidtests/AndroidManifest.xml"
107
mandermoa8bec8d2016-10-26 01:47:07 -0700108 java_files = [
mandermo9890a582016-10-27 07:26:36 -0700109 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -0700110 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
111 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
112 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200113
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200114 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200115
116 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200117 ":AppRTCMobile_javalib",
magjed768c6482016-12-06 04:29:37 -0800118 "//webrtc/sdk/android:libjingle_peerconnection_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200119 ]
mandermo9890a582016-10-27 07:26:36 -0700120
121 data = [
122 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
123 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200124 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200125}
tkchin2ddfdba2016-08-07 21:37:45 -0700126
127if (is_ios || (is_mac && target_cpu != "x86")) {
128 config("warnings_config") {
129 # GN orders flags on a target before flags from configs. The default config
130 # adds these flags so to cancel them out they need to come from a config and
131 # cannot be on the target directly.
132 if (is_ios) {
133 # Suppress compiler warnings about deprecated that triggered
134 # when moving from ios_deployment_target 7.0 to 9.0.
135 # See webrtc:5549 for more details.
136 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700137 cflags_objc = [
138 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
139 # See webrtc:6520.
140 "-Wno-objc-missing-property-synthesis",
141 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700142 }
143 }
144
145 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200146 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700147 }
148
kjellanderb62dbbe2016-09-23 00:38:52 -0700149 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700150 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200151 "objc/AppRTCMobile/common/ARDUtilities.h",
152 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700153 ]
154 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700155 ":warnings_config",
156 "//build/config/compiler:enable_arc",
157 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700158 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700159
160 deps = [
161 "../sdk:rtc_sdk_common_objc",
162 "../system_wrappers:field_trial_default",
163 "../system_wrappers:metrics_default",
164 ]
165 }
166
167 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200168 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700169
170 # GN orders flags on a target before flags from configs. The default config
171 # adds these flags so to cancel them out they need to come from a config and
172 # cannot be on the target directly.
173 cflags = [
174 "-Wno-sign-compare",
175 "-Wno-unused-variable",
176 ]
177 if (is_mac) {
178 cflags += [ "-Wno-partial-availability" ]
179 }
180 }
181
kjellanderb62dbbe2016-09-23 00:38:52 -0700182 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700183 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200184 "objc/AppRTCMobile/ARDAppClient+Internal.h",
185 "objc/AppRTCMobile/ARDAppClient.h",
186 "objc/AppRTCMobile/ARDAppClient.m",
187 "objc/AppRTCMobile/ARDAppEngineClient.h",
188 "objc/AppRTCMobile/ARDAppEngineClient.m",
189 "objc/AppRTCMobile/ARDBitrateTracker.h",
190 "objc/AppRTCMobile/ARDBitrateTracker.m",
191 "objc/AppRTCMobile/ARDCEODTURNClient.h",
192 "objc/AppRTCMobile/ARDCEODTURNClient.m",
193 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
194 "objc/AppRTCMobile/ARDJoinResponse.h",
195 "objc/AppRTCMobile/ARDJoinResponse.m",
196 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
197 "objc/AppRTCMobile/ARDMessageResponse.h",
198 "objc/AppRTCMobile/ARDMessageResponse.m",
199 "objc/AppRTCMobile/ARDRoomServerClient.h",
200 "objc/AppRTCMobile/ARDSDPUtils.h",
201 "objc/AppRTCMobile/ARDSDPUtils.m",
202 "objc/AppRTCMobile/ARDSignalingChannel.h",
203 "objc/AppRTCMobile/ARDSignalingMessage.h",
204 "objc/AppRTCMobile/ARDSignalingMessage.m",
205 "objc/AppRTCMobile/ARDStatsBuilder.h",
206 "objc/AppRTCMobile/ARDStatsBuilder.m",
207 "objc/AppRTCMobile/ARDTURNClient.h",
208 "objc/AppRTCMobile/ARDWebSocketChannel.h",
209 "objc/AppRTCMobile/ARDWebSocketChannel.m",
210 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
211 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
212 "objc/AppRTCMobile/RTCIceServer+JSON.h",
213 "objc/AppRTCMobile/RTCIceServer+JSON.m",
214 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
215 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
216 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
217 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700218 ]
219 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700220 "//build/config/compiler:enable_arc",
221 ":warnings_config",
222 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700223 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700224 deps = [
225 ":apprtc_common",
226 ":socketrocket",
227 ]
228 public_deps = [
229 "../sdk:rtc_sdk_peerconnection_objc",
230 ]
231 libs = [ "QuartzCore.framework" ]
232 }
233
234 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800235 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-07 21:37:45 -0700236 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200237 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
238 "objc/AppRTCMobile/ios/ARDMainView.h",
239 "objc/AppRTCMobile/ios/ARDMainView.m",
240 "objc/AppRTCMobile/ios/ARDMainViewController.h",
241 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicija2256e042016-11-09 06:26:18 -0800242 "objc/AppRTCMobile/ios/ARDSettingsModel+Private.h",
243 "objc/AppRTCMobile/ios/ARDSettingsModel.h",
244 "objc/AppRTCMobile/ios/ARDSettingsModel.m",
245 "objc/AppRTCMobile/ios/ARDSettingsStore.h",
246 "objc/AppRTCMobile/ios/ARDSettingsStore.m",
denicijad17d5362016-11-02 02:56:09 -0700247 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
248 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200249 "objc/AppRTCMobile/ios/ARDStatsView.h",
250 "objc/AppRTCMobile/ios/ARDStatsView.m",
251 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
252 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
253 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
254 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
255 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
256 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
257 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800258 ]
259 configs += [
260 "//build/config/compiler:enable_arc",
261 ":warnings_config",
262 ]
263
264 deps = [
265 ":apprtc_common",
266 ":apprtc_signaling",
267 ]
268 }
269
270 ios_app_bundle("AppRTCMobile") {
271 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200272 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700273 ]
274
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200275 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700276
denicija77bfd7c2016-11-15 00:41:26 -0800277 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700278 public_configs = [ "..:common_inherited_config" ]
279
280 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200281 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 00:41:26 -0800282 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700283 ]
284
285 if (target_cpu == "x86") {
286 deps += [ "//testing/iossim:iossim" ]
287 }
288 }
289
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200290 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700291 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200292 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
293 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
294 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
295 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
296 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
297 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
298 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
299 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700300 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
301 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200302 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
303 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
304 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
305 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
306 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700307 "objc/Icon.png",
308 ]
309 outputs = [
310 "{{bundle_resources_dir}}/{{source_file_part}}",
311 ]
312 }
313 }
314
315 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800316 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-07 21:37:45 -0700317 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200318 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
319 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
320 "objc/AppRTCMobile/mac/APPRTCViewController.h",
321 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700322 ]
323 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700324 "..:common_objc",
325 "//build/config/compiler:enable_arc",
326 ]
327 deps = [
328 ":apprtc_common",
329 ":apprtc_signaling",
330 ]
331 }
332
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200333 mac_app_bundle("AppRTCMobile") {
334 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700335
336 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
337
338 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200339 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700340 ]
341
342 public_configs = [ "..:common_inherited_config" ]
343
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200344 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700345
346 libs = [ "AppKit.framework" ]
347
348 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800349 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700350 ]
351 }
352 }
353
354 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200355 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700356 }
357
358 config("socketrocket_warning_config") {
359 # GN orders flags on a target before flags from configs. The default config
360 # adds these flags so to cancel them out they need to come from a config and
361 # cannot be on the target directly.
362 cflags = [
363 "-Wno-deprecated-declarations",
364 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700365 "-Wno-semicolon-before-method-body",
366 "-Wno-unused-variable",
367 ]
368
henrika27d8b612016-09-21 04:13:00 -0700369 cflags_objc = [
370 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
371 "-Wno-objc-missing-property-synthesis",
372
373 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
374 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
375 "-Wno-unused-result",
376 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700377
378 if (is_mac) {
379 cflags += [ "-Wno-partial-availability" ]
380 }
381 }
382
kjellanderb62dbbe2016-09-23 00:38:52 -0700383 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700384 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200385 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
386 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700387 ]
388 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700389 "//build/config/compiler:enable_arc",
390 ":socketrocket_warning_config",
391 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700392 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700393
394 libs = [
395 "CFNetwork.framework",
396 "icucore",
397 ]
398 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800399
400 if (rtc_include_tests) {
401 config("rtc_apprtcmobile_config") {
402 defines = [ "GTEST_RELATIVE_PATH" ]
403 }
404
405 rtc_test("apprtcmobile_tests") {
denicija77bfd7c2016-11-15 00:41:26 -0800406 include_dirs = [ "objc/AppRTCMobile/ios" ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800407 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800408 ":AppRTCMobile_lib",
adam.fedorbcc5d872016-11-07 14:53:28 -0800409 ":apprtc_signaling",
410 "//testing/gtest",
411 "//third_party/ocmock",
412 ]
413
414 sources = [
415 "objc/AppRTCMobile/tests/ARDAppClientTest.mm",
denicija77bfd7c2016-11-15 00:41:26 -0800416 "objc/AppRTCMobile/tests/ARDSettingsModelTests.mm",
adam.fedorbcc5d872016-11-07 14:53:28 -0800417 ]
418
419 if (is_ios) {
420 info_plist = "objc/AppRTCMobile/ios/Info.plist"
421 }
422
423 configs += [
424 ":rtc_apprtcmobile_config",
425 "//build/config/compiler:enable_arc",
426 ]
427 }
428 }
tkchin2ddfdba2016-08-07 21:37:45 -0700429}
kthelgason0727f152016-08-08 09:03:23 -0700430
431if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700432 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700433 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700434 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700435 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700436 # Disable warnings failing when compiling with Clang on Windows.
437 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
438 "-Wno-format",
439
440 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
441 # for -Wno-reorder and -Wno-sign-compare
442 "-Wno-reorder",
443 "-Wno-sign-compare",
444 ]
445 }
kjellanderd4626e52016-09-07 02:33:01 -0700446 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700447 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700448 # Needed to compile on Linux 32-bit.
449 "-Wno-sentinel",
450 ]
451 }
kjellander4a9abad2016-09-18 08:12:29 -0700452
453 if (is_clang) {
454 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
455 # set of warnings.
456 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
457 cflags += [ "-Wno-inconsistent-missing-override" ]
458 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700459 }
460
ehmaldonado38a21322016-09-02 04:10:34 -0700461 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700462 sources = [
463 "peerconnection/client/conductor.cc",
464 "peerconnection/client/conductor.h",
465 "peerconnection/client/defaults.cc",
466 "peerconnection/client/defaults.h",
467 "peerconnection/client/peer_connection_client.cc",
468 "peerconnection/client/peer_connection_client.h",
469 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700470
kjellandere40a7ee2016-10-16 23:56:12 -0700471 if (!build_with_chromium && is_clang) {
472 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700473 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700474 }
475 if (is_win) {
476 sources += [
477 "peerconnection/client/flagdefs.h",
478 "peerconnection/client/main.cc",
479 "peerconnection/client/main_wnd.cc",
480 "peerconnection/client/main_wnd.h",
481 ]
482 cflags = [ "/wd4245" ]
483 configs += [ "//build/config/win:windowed" ]
484 }
thomasandersonef16e992016-12-13 02:57:43 -0800485 deps = [
486 "//third_party/libyuv",
487 "//webrtc/api:libjingle_peerconnection",
488 "//webrtc/system_wrappers:field_trial_default",
489 "//webrtc/system_wrappers:metrics_default",
490 ]
kthelgason0727f152016-08-08 09:03:23 -0700491 if (is_linux) {
492 sources += [
493 "peerconnection/client/linux/main.cc",
494 "peerconnection/client/linux/main_wnd.cc",
495 "peerconnection/client/linux/main_wnd.h",
496 ]
497 libs = [
498 "X11",
499 "Xcomposite",
500 "Xext",
501 "Xrender",
502 ]
thomasandersonef16e992016-12-13 02:57:43 -0800503 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700504 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700505 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700506 if (rtc_build_json) {
507 deps += [ "//third_party/jsoncpp" ]
508 }
509 }
kjellanderd4626e52016-09-07 02:33:01 -0700510
ehmaldonado38a21322016-09-02 04:10:34 -0700511 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700512 sources = [
513 "peerconnection/server/data_socket.cc",
514 "peerconnection/server/data_socket.h",
515 "peerconnection/server/main.cc",
516 "peerconnection/server/peer_channel.cc",
517 "peerconnection/server/peer_channel.h",
518 "peerconnection/server/utils.cc",
519 "peerconnection/server/utils.h",
520 ]
521 deps = [
522 "//webrtc:webrtc_common",
523 "//webrtc/base:rtc_base_approved",
524 "//webrtc/tools:command_line_parser",
525 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700526 if (!build_with_chromium && is_clang) {
527 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700528 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700529 }
530 }
ehmaldonado38a21322016-09-02 04:10:34 -0700531 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700532 sources = [
533 "relayserver/relayserver_main.cc",
534 ]
535 deps = [
536 "//webrtc/base:rtc_base_approved",
537 "//webrtc/pc:rtc_pc",
538 "//webrtc/system_wrappers:field_trial_default",
539 "//webrtc/system_wrappers:metrics_default",
540 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700541 if (!build_with_chromium && is_clang) {
542 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700543 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700544 }
545 }
ehmaldonado38a21322016-09-02 04:10:34 -0700546 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700547 sources = [
548 "turnserver/turnserver_main.cc",
549 ]
550 deps = [
551 "//webrtc/base:rtc_base_approved",
552 "//webrtc/pc:rtc_pc",
553 "//webrtc/system_wrappers:field_trial_default",
554 "//webrtc/system_wrappers:metrics_default",
555 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700556 if (!build_with_chromium && is_clang) {
557 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700558 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700559 }
560 }
ehmaldonado38a21322016-09-02 04:10:34 -0700561 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700562 sources = [
563 "stunserver/stunserver_main.cc",
564 ]
565 deps = [
566 "//webrtc/base:rtc_base_approved",
567 "//webrtc/pc:rtc_pc",
568 "//webrtc/system_wrappers:field_trial_default",
569 "//webrtc/system_wrappers:metrics_default",
570 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700571 if (!build_with_chromium && is_clang) {
572 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700573 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700574 }
575 }
576}
charujainaca3a242016-11-01 03:09:15 -0700577
578if (!build_with_chromium) {
579 # Doesn't build within Chrome on Win.
580 rtc_executable("stun_prober") {
581 sources = [
582 "stunprober/main.cc",
583 ]
584
585 if (!build_with_chromium && is_clang) {
586 # Suppress warnings from Chrome's Clang plugins.
587 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
588 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
589 }
590
591 deps = [
592 "../p2p:libstunprober",
593 "../p2p:rtc_p2p",
594 "../system_wrappers:field_trial_default",
595 ]
596 }
597}