blob: e6b73f017d2def3ee4fec0ff3d73e0591b121782 [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",
henrikac3c2f312016-12-14 07:36:56 -080068 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020069 "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 14:55:00 +020089 ]
90
91 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020092 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020093 "//webrtc/base:base_java",
94 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
magjed768c6482016-12-06 04:29:37 -080095 "//webrtc/sdk/android:libjingle_peerconnection_java",
96 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020097 ]
98 }
99
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200100 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200101 resource_dirs = [ "androidapp/res" ]
102 custom_package = "org.appspot.apprtc"
103 }
104
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200105 instrumentation_test_apk("AppRTCMobileTest") {
106 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200107 android_manifest = "androidtests/AndroidManifest.xml"
108
mandermoa8bec8d2016-10-26 01:47:07 -0700109 java_files = [
mandermo9890a582016-10-27 07:26:36 -0700110 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -0700111 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
112 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
113 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200114
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200115 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200116
117 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200118 ":AppRTCMobile_javalib",
magjed768c6482016-12-06 04:29:37 -0800119 "//webrtc/sdk/android:libjingle_peerconnection_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200120 ]
mandermo9890a582016-10-27 07:26:36 -0700121
122 data = [
123 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
124 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200125 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200126}
tkchin2ddfdba2016-08-07 21:37:45 -0700127
128if (is_ios || (is_mac && target_cpu != "x86")) {
129 config("warnings_config") {
130 # GN orders flags on a target before flags from configs. The default config
131 # adds these flags so to cancel them out they need to come from a config and
132 # cannot be on the target directly.
133 if (is_ios) {
134 # Suppress compiler warnings about deprecated that triggered
135 # when moving from ios_deployment_target 7.0 to 9.0.
136 # See webrtc:5549 for more details.
137 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700138 cflags_objc = [
139 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
140 # See webrtc:6520.
141 "-Wno-objc-missing-property-synthesis",
142 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700143 }
144 }
145
146 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200147 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700148 }
149
kjellanderb62dbbe2016-09-23 00:38:52 -0700150 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700151 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200152 "objc/AppRTCMobile/common/ARDUtilities.h",
153 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700154 ]
155 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700156 ":warnings_config",
157 "//build/config/compiler:enable_arc",
158 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700159 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700160
161 deps = [
162 "../sdk:rtc_sdk_common_objc",
163 "../system_wrappers:field_trial_default",
164 "../system_wrappers:metrics_default",
165 ]
166 }
167
168 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200169 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700170
171 # GN orders flags on a target before flags from configs. The default config
172 # adds these flags so to cancel them out they need to come from a config and
173 # cannot be on the target directly.
174 cflags = [
175 "-Wno-sign-compare",
176 "-Wno-unused-variable",
177 ]
178 if (is_mac) {
179 cflags += [ "-Wno-partial-availability" ]
180 }
181 }
182
kjellanderb62dbbe2016-09-23 00:38:52 -0700183 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700184 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200185 "objc/AppRTCMobile/ARDAppClient+Internal.h",
186 "objc/AppRTCMobile/ARDAppClient.h",
187 "objc/AppRTCMobile/ARDAppClient.m",
188 "objc/AppRTCMobile/ARDAppEngineClient.h",
189 "objc/AppRTCMobile/ARDAppEngineClient.m",
190 "objc/AppRTCMobile/ARDBitrateTracker.h",
191 "objc/AppRTCMobile/ARDBitrateTracker.m",
192 "objc/AppRTCMobile/ARDCEODTURNClient.h",
193 "objc/AppRTCMobile/ARDCEODTURNClient.m",
194 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
195 "objc/AppRTCMobile/ARDJoinResponse.h",
196 "objc/AppRTCMobile/ARDJoinResponse.m",
197 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
198 "objc/AppRTCMobile/ARDMessageResponse.h",
199 "objc/AppRTCMobile/ARDMessageResponse.m",
200 "objc/AppRTCMobile/ARDRoomServerClient.h",
201 "objc/AppRTCMobile/ARDSDPUtils.h",
202 "objc/AppRTCMobile/ARDSDPUtils.m",
203 "objc/AppRTCMobile/ARDSignalingChannel.h",
204 "objc/AppRTCMobile/ARDSignalingMessage.h",
205 "objc/AppRTCMobile/ARDSignalingMessage.m",
206 "objc/AppRTCMobile/ARDStatsBuilder.h",
207 "objc/AppRTCMobile/ARDStatsBuilder.m",
208 "objc/AppRTCMobile/ARDTURNClient.h",
209 "objc/AppRTCMobile/ARDWebSocketChannel.h",
210 "objc/AppRTCMobile/ARDWebSocketChannel.m",
211 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
212 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
213 "objc/AppRTCMobile/RTCIceServer+JSON.h",
214 "objc/AppRTCMobile/RTCIceServer+JSON.m",
215 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
216 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
217 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
218 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700219 ]
220 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700221 "//build/config/compiler:enable_arc",
222 ":warnings_config",
223 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700224 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700225 deps = [
226 ":apprtc_common",
227 ":socketrocket",
228 ]
229 public_deps = [
230 "../sdk:rtc_sdk_peerconnection_objc",
231 ]
232 libs = [ "QuartzCore.framework" ]
233 }
234
235 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800236 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-07 21:37:45 -0700237 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200238 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
239 "objc/AppRTCMobile/ios/ARDMainView.h",
240 "objc/AppRTCMobile/ios/ARDMainView.m",
241 "objc/AppRTCMobile/ios/ARDMainViewController.h",
242 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicija2256e042016-11-09 06:26:18 -0800243 "objc/AppRTCMobile/ios/ARDSettingsModel+Private.h",
244 "objc/AppRTCMobile/ios/ARDSettingsModel.h",
245 "objc/AppRTCMobile/ios/ARDSettingsModel.m",
246 "objc/AppRTCMobile/ios/ARDSettingsStore.h",
247 "objc/AppRTCMobile/ios/ARDSettingsStore.m",
denicijad17d5362016-11-02 02:56:09 -0700248 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
249 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200250 "objc/AppRTCMobile/ios/ARDStatsView.h",
251 "objc/AppRTCMobile/ios/ARDStatsView.m",
252 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
253 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
254 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
255 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
256 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
257 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
258 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800259 ]
260 configs += [
261 "//build/config/compiler:enable_arc",
262 ":warnings_config",
263 ]
264
265 deps = [
266 ":apprtc_common",
267 ":apprtc_signaling",
268 ]
269 }
270
271 ios_app_bundle("AppRTCMobile") {
272 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200273 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700274 ]
275
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200276 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700277
denicija77bfd7c2016-11-15 00:41:26 -0800278 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700279 public_configs = [ "..:common_inherited_config" ]
280
281 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200282 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 00:41:26 -0800283 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700284 ]
285
286 if (target_cpu == "x86") {
287 deps += [ "//testing/iossim:iossim" ]
288 }
289 }
290
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200291 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700292 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200293 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
294 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
295 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
296 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
297 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
298 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
299 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
300 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700301 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
302 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200303 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
304 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
305 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
306 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
307 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700308 "objc/Icon.png",
309 ]
310 outputs = [
311 "{{bundle_resources_dir}}/{{source_file_part}}",
312 ]
313 }
314 }
315
316 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800317 rtc_static_library("AppRTCMobile_lib") {
tkchin2ddfdba2016-08-07 21:37:45 -0700318 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200319 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
320 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
321 "objc/AppRTCMobile/mac/APPRTCViewController.h",
322 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700323 ]
324 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700325 "..:common_objc",
326 "//build/config/compiler:enable_arc",
327 ]
328 deps = [
329 ":apprtc_common",
330 ":apprtc_signaling",
331 ]
332 }
333
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200334 mac_app_bundle("AppRTCMobile") {
335 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700336
337 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
338
339 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200340 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700341 ]
342
343 public_configs = [ "..:common_inherited_config" ]
344
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200345 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700346
347 libs = [ "AppKit.framework" ]
348
349 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800350 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700351 ]
352 }
353 }
354
355 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200356 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700357 }
358
359 config("socketrocket_warning_config") {
360 # GN orders flags on a target before flags from configs. The default config
361 # adds these flags so to cancel them out they need to come from a config and
362 # cannot be on the target directly.
363 cflags = [
364 "-Wno-deprecated-declarations",
365 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700366 "-Wno-semicolon-before-method-body",
367 "-Wno-unused-variable",
368 ]
369
henrika27d8b612016-09-21 04:13:00 -0700370 cflags_objc = [
371 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
372 "-Wno-objc-missing-property-synthesis",
373
374 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
375 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
376 "-Wno-unused-result",
377 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700378
379 if (is_mac) {
380 cflags += [ "-Wno-partial-availability" ]
381 }
382 }
383
kjellanderb62dbbe2016-09-23 00:38:52 -0700384 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700385 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200386 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
387 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700388 ]
389 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700390 "//build/config/compiler:enable_arc",
391 ":socketrocket_warning_config",
392 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700393 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700394
395 libs = [
396 "CFNetwork.framework",
397 "icucore",
398 ]
399 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800400
401 if (rtc_include_tests) {
402 config("rtc_apprtcmobile_config") {
403 defines = [ "GTEST_RELATIVE_PATH" ]
404 }
405
406 rtc_test("apprtcmobile_tests") {
denicija77bfd7c2016-11-15 00:41:26 -0800407 include_dirs = [ "objc/AppRTCMobile/ios" ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800408 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800409 ":AppRTCMobile_lib",
adam.fedorbcc5d872016-11-07 14:53:28 -0800410 ":apprtc_signaling",
411 "//testing/gtest",
412 "//third_party/ocmock",
413 ]
414
415 sources = [
416 "objc/AppRTCMobile/tests/ARDAppClientTest.mm",
denicija77bfd7c2016-11-15 00:41:26 -0800417 "objc/AppRTCMobile/tests/ARDSettingsModelTests.mm",
adam.fedorbcc5d872016-11-07 14:53:28 -0800418 ]
419
420 if (is_ios) {
421 info_plist = "objc/AppRTCMobile/ios/Info.plist"
422 }
423
424 configs += [
425 ":rtc_apprtcmobile_config",
426 "//build/config/compiler:enable_arc",
427 ]
428 }
429 }
tkchin2ddfdba2016-08-07 21:37:45 -0700430}
kthelgason0727f152016-08-08 09:03:23 -0700431
432if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700433 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700434 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700435 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700436 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700437 # Disable warnings failing when compiling with Clang on Windows.
438 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
439 "-Wno-format",
440
441 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
442 # for -Wno-reorder and -Wno-sign-compare
443 "-Wno-reorder",
444 "-Wno-sign-compare",
445 ]
446 }
kjellanderd4626e52016-09-07 02:33:01 -0700447 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700448 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700449 # Needed to compile on Linux 32-bit.
450 "-Wno-sentinel",
451 ]
452 }
kjellander4a9abad2016-09-18 08:12:29 -0700453
454 if (is_clang) {
455 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
456 # set of warnings.
457 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
458 cflags += [ "-Wno-inconsistent-missing-override" ]
459 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700460 }
461
ehmaldonado38a21322016-09-02 04:10:34 -0700462 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700463 sources = [
464 "peerconnection/client/conductor.cc",
465 "peerconnection/client/conductor.h",
466 "peerconnection/client/defaults.cc",
467 "peerconnection/client/defaults.h",
468 "peerconnection/client/peer_connection_client.cc",
469 "peerconnection/client/peer_connection_client.h",
470 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700471
kjellandere40a7ee2016-10-16 23:56:12 -0700472 if (!build_with_chromium && is_clang) {
473 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700474 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700475 }
476 if (is_win) {
477 sources += [
478 "peerconnection/client/flagdefs.h",
479 "peerconnection/client/main.cc",
480 "peerconnection/client/main_wnd.cc",
481 "peerconnection/client/main_wnd.h",
482 ]
483 cflags = [ "/wd4245" ]
484 configs += [ "//build/config/win:windowed" ]
485 }
thomasandersonef16e992016-12-13 02:57:43 -0800486 deps = [
487 "//third_party/libyuv",
488 "//webrtc/api:libjingle_peerconnection",
489 "//webrtc/system_wrappers:field_trial_default",
490 "//webrtc/system_wrappers:metrics_default",
491 ]
kthelgason0727f152016-08-08 09:03:23 -0700492 if (is_linux) {
493 sources += [
494 "peerconnection/client/linux/main.cc",
495 "peerconnection/client/linux/main_wnd.cc",
496 "peerconnection/client/linux/main_wnd.h",
497 ]
498 libs = [
499 "X11",
500 "Xcomposite",
501 "Xext",
502 "Xrender",
503 ]
thomasandersonef16e992016-12-13 02:57:43 -0800504 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700505 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700506 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700507 if (rtc_build_json) {
508 deps += [ "//third_party/jsoncpp" ]
509 }
510 }
kjellanderd4626e52016-09-07 02:33:01 -0700511
ehmaldonado38a21322016-09-02 04:10:34 -0700512 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700513 sources = [
514 "peerconnection/server/data_socket.cc",
515 "peerconnection/server/data_socket.h",
516 "peerconnection/server/main.cc",
517 "peerconnection/server/peer_channel.cc",
518 "peerconnection/server/peer_channel.h",
519 "peerconnection/server/utils.cc",
520 "peerconnection/server/utils.h",
521 ]
522 deps = [
523 "//webrtc:webrtc_common",
524 "//webrtc/base:rtc_base_approved",
525 "//webrtc/tools:command_line_parser",
526 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700527 if (!build_with_chromium && is_clang) {
528 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700529 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700530 }
531 }
ehmaldonado38a21322016-09-02 04:10:34 -0700532 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700533 sources = [
534 "relayserver/relayserver_main.cc",
535 ]
536 deps = [
537 "//webrtc/base:rtc_base_approved",
538 "//webrtc/pc:rtc_pc",
539 "//webrtc/system_wrappers:field_trial_default",
540 "//webrtc/system_wrappers:metrics_default",
541 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700542 if (!build_with_chromium && is_clang) {
543 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700544 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700545 }
546 }
ehmaldonado38a21322016-09-02 04:10:34 -0700547 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700548 sources = [
549 "turnserver/turnserver_main.cc",
550 ]
551 deps = [
552 "//webrtc/base:rtc_base_approved",
553 "//webrtc/pc:rtc_pc",
554 "//webrtc/system_wrappers:field_trial_default",
555 "//webrtc/system_wrappers:metrics_default",
556 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700557 if (!build_with_chromium && is_clang) {
558 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700559 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700560 }
561 }
ehmaldonado38a21322016-09-02 04:10:34 -0700562 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700563 sources = [
564 "stunserver/stunserver_main.cc",
565 ]
566 deps = [
567 "//webrtc/base:rtc_base_approved",
568 "//webrtc/pc:rtc_pc",
569 "//webrtc/system_wrappers:field_trial_default",
570 "//webrtc/system_wrappers:metrics_default",
571 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700572 if (!build_with_chromium && is_clang) {
573 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700574 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700575 }
576 }
577}
charujainaca3a242016-11-01 03:09:15 -0700578
579if (!build_with_chromium) {
580 # Doesn't build within Chrome on Win.
581 rtc_executable("stun_prober") {
582 sources = [
583 "stunprober/main.cc",
584 ]
585
586 if (!build_with_chromium && is_clang) {
587 # Suppress warnings from Chrome's Clang plugins.
588 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
589 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
590 }
591
592 deps = [
593 "../p2p:libstunprober",
594 "../p2p:rtc_p2p",
595 "../system_wrappers:field_trial_default",
596 ]
597 }
598}