blob: a8abe97c8afc77cc1c1506546024438ab409178d [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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
Qiang Chen43fb9122017-12-20 10:47:36 -080010
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020011if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-07 21:37:45 -070014} else if (is_mac) {
15 import("//build/config/mac/rules.gni")
16} else if (is_ios) {
17 import("//build/config/ios/rules.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020018}
19
20group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070021 # This target shall build all targets in examples.
22 testonly = true
Mirko Bonadei1a339c32017-12-14 13:06:10 +010023 deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020024
tkchin2ddfdba2016-08-07 21:37:45 -070025 if (is_android) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010026 deps += [
kjellander6ceab082016-10-28 05:44:03 -070027 ":AppRTCMobile",
28 ":AppRTCMobileTest",
mandermoa6069e82017-01-16 02:23:09 -080029 ":AppRTCMobileTestStubbedVideoIO",
kjellander6ceab082016-10-28 05:44:03 -070030 ]
31 }
32
charujainaca3a242016-11-01 03:09:15 -070033 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010034 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 03:09:15 -070035 }
36
kjellander6ceab082016-10-28 05:44:03 -070037 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010038 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020039 }
kjellander6ceab082016-10-28 05:44:03 -070040
41 if (is_linux || is_win) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010042 deps += [
kthelgason0727f152016-08-08 09:03:23 -070043 ":peerconnection_client",
44 ":peerconnection_server",
45 ":relayserver",
46 ":stunserver",
47 ":turnserver",
48 ]
49 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020050}
51
tkchin2ddfdba2016-08-07 21:37:45 -070052if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000053 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080054 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020055 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",
jianjun.zhuc0247402017-07-11 06:20:45 -070061 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020062 "//base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020063 ]
64
jianjun.zhuc0247402017-07-11 06:20:45 -070065 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020066 }
67
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000068 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -080069 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +010070 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -080071
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020072 java_files = [
73 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -080074 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020075 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
76 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
77 "androidapp/src/org/appspot/apprtc/CallActivity.java",
78 "androidapp/src/org/appspot/apprtc/CallFragment.java",
79 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
80 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
81 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
82 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
83 "androidapp/src/org/appspot/apprtc/HudFragment.java",
84 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020085 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
86 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
87 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
88 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
89 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
90 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
91 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
92 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
93 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020094 ]
95
96 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020097 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070098 "../modules/audio_device:audio_device_java",
99 "../rtc_base:base_java",
100 "../sdk/android:libjingle_peerconnection_java",
101 "../sdk/android:libjingle_peerconnection_metrics_default_java",
102 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200103 ]
104 }
105
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200106 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800107 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200108 resource_dirs = [ "androidapp/res" ]
109 custom_package = "org.appspot.apprtc"
110 }
111
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000112 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200113 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200114 android_manifest = "androidtests/AndroidManifest.xml"
115
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100116 java_files = [
117 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
118 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200119
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200120 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200121
122 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200123 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700124 "../sdk/android:libjingle_peerconnection_java",
sakalcb79d512017-01-11 06:21:26 -0800125 "//third_party/android_support_test_runner:runner_java",
126 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200127 ]
128 }
mandermoa6069e82017-01-16 02:23:09 -0800129
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000130 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800131 apk_name = "AppRTCMobileTestStubbedVideoIO"
132 android_manifest = "androidtests/AndroidManifest.xml"
133
oprypin30cda5e2017-04-24 04:15:13 -0700134 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800135
136 apk_under_test = ":AppRTCMobile"
137
138 deps = [
139 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700140 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800141 "//third_party/android_support_test_runner:rules_java",
142 "//third_party/android_support_test_runner:runner_java",
143 "//third_party/espresso:espresso_all_java",
144 "//third_party/hamcrest:hamcrest_java",
145 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800146 ]
147
148 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100149 "../build/android/adb_reverse_forwarder.py",
150 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200151 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100152 "../rtc_tools/barcode_tools/barcode_decoder.py",
153 "../rtc_tools/barcode_tools/helper_functions.py",
154 "../rtc_tools/compare_videos.py",
155 "../rtc_tools/testing/prebuilt_apprtc.zip",
156 "../rtc_tools/testing/golang/linux/go.tar.gz",
157 "../rtc_tools/testing/build_apprtc.py",
158 "../rtc_tools/testing/utils.py",
159 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
160 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
161 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800162 ]
163 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200164}
tkchin2ddfdba2016-08-07 21:37:45 -0700165
166if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700167 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200168 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700169 }
170
kjellanderb62dbbe2016-09-23 00:38:52 -0700171 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800172 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700173 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200174 "objc/AppRTCMobile/common/ARDUtilities.h",
175 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700176 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700177 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700178
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200179 if (is_ios) {
kthelgason5901d9d2017-08-16 07:28:03 -0700180 deps = [
181 ":AppRTCMobile_ios_frameworks",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100182 "../sdk:common_objc",
183 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000184 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700185 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200186 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700187 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700188 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700189 "../system_wrappers:field_trial_default",
190 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000191 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700192 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200193 }
tkchin2ddfdba2016-08-07 21:37:45 -0700194 }
195
196 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200197 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700198
199 # GN orders flags on a target before flags from configs. The default config
200 # adds these flags so to cancel them out they need to come from a config and
201 # cannot be on the target directly.
202 cflags = [
203 "-Wno-sign-compare",
204 "-Wno-unused-variable",
205 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700206 }
207
kjellanderb62dbbe2016-09-23 00:38:52 -0700208 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800209 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700210 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200211 "objc/AppRTCMobile/ARDAppClient+Internal.h",
212 "objc/AppRTCMobile/ARDAppClient.h",
213 "objc/AppRTCMobile/ARDAppClient.m",
214 "objc/AppRTCMobile/ARDAppEngineClient.h",
215 "objc/AppRTCMobile/ARDAppEngineClient.m",
216 "objc/AppRTCMobile/ARDBitrateTracker.h",
217 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700218 "objc/AppRTCMobile/ARDCaptureController.h",
219 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200220 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
221 "objc/AppRTCMobile/ARDJoinResponse.h",
222 "objc/AppRTCMobile/ARDJoinResponse.m",
223 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
224 "objc/AppRTCMobile/ARDMessageResponse.h",
225 "objc/AppRTCMobile/ARDMessageResponse.m",
226 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700227 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
228 "objc/AppRTCMobile/ARDSettingsModel.h",
229 "objc/AppRTCMobile/ARDSettingsModel.m",
230 "objc/AppRTCMobile/ARDSettingsStore.h",
231 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200232 "objc/AppRTCMobile/ARDSignalingChannel.h",
233 "objc/AppRTCMobile/ARDSignalingMessage.h",
234 "objc/AppRTCMobile/ARDSignalingMessage.m",
235 "objc/AppRTCMobile/ARDStatsBuilder.h",
236 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800237 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200238 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800239 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200240 "objc/AppRTCMobile/ARDWebSocketChannel.h",
241 "objc/AppRTCMobile/ARDWebSocketChannel.m",
242 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
243 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
244 "objc/AppRTCMobile/RTCIceServer+JSON.h",
245 "objc/AppRTCMobile/RTCIceServer+JSON.m",
246 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
247 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
248 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
249 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700250 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700251 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700252 deps = [
253 ":apprtc_common",
254 ":socketrocket",
255 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200256 if (is_ios) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100257 deps += [
258 ":AppRTCMobile_ios_frameworks",
259 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200260 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100261 } else {
262 deps += [ "../sdk:peerconnection_objc" ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200263 }
tkchin2ddfdba2016-08-07 21:37:45 -0700264 libs = [ "QuartzCore.framework" ]
265 }
266
267 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800268 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800269 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700270 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100271 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200272 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100273 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
274 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200275 "objc/AppRTCMobile/ios/ARDMainView.h",
276 "objc/AppRTCMobile/ios/ARDMainView.m",
277 "objc/AppRTCMobile/ios/ARDMainViewController.h",
278 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700279 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
280 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200281 "objc/AppRTCMobile/ios/ARDStatsView.h",
282 "objc/AppRTCMobile/ios/ARDStatsView.m",
283 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
284 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
285 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
286 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200287 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
288 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200289 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
290 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800291 ]
denicija77bfd7c2016-11-15 00:41:26 -0800292
293 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200294 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800295 ":apprtc_common",
296 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100297 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800298 ]
299 }
300
301 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800302 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800303 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200304 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700305 ]
306
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200307 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700308
denicija77bfd7c2016-11-15 00:41:26 -0800309 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700310 public_configs = [ "..:common_inherited_config" ]
311
312 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200313 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800314 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800315 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100316 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700317 ]
318
319 if (target_cpu == "x86") {
320 deps += [ "//testing/iossim:iossim" ]
321 }
322 }
323
kthelgasond3adbfb2017-01-26 01:14:04 -0800324 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100325 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700326 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800327 ]
328 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400329 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800330 ]
331 outputs = [
332 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
333 ]
334 }
335
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200336 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700337 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200338 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100339
340 # Sample video taken from https://media.xiph.org/video/derf/
341 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200342 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
343 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
344 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
345 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
346 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
347 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
348 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700349 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
350 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200351 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
352 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
353 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
354 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
355 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700356 "objc/Icon-120.png",
357 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700358 "objc/Icon.png",
359 ]
360 outputs = [
361 "{{bundle_resources_dir}}/{{source_file_part}}",
362 ]
363 }
364 }
365
366 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800367 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800368 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700369 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200370 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
371 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
372 "objc/AppRTCMobile/mac/APPRTCViewController.h",
373 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700374 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700375 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700376 deps = [
377 ":apprtc_common",
378 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100379 "../sdk:metal_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700380 "../sdk:ui_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700381 ]
382 }
383
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200384 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800385 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200386 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700387
tkchin2ddfdba2016-08-07 21:37:45 -0700388 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200389 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700390 ]
391
392 public_configs = [ "..:common_inherited_config" ]
393
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200394 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700395
396 libs = [ "AppKit.framework" ]
397
398 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800399 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700400 ]
401 }
402 }
403
404 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200405 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700406 }
407
408 config("socketrocket_warning_config") {
409 # GN orders flags on a target before flags from configs. The default config
410 # adds these flags so to cancel them out they need to come from a config and
411 # cannot be on the target directly.
412 cflags = [
413 "-Wno-deprecated-declarations",
414 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700415 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800416 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700417 ]
418
henrika27d8b612016-09-21 04:13:00 -0700419 cflags_objc = [
420 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
421 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700422 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700423 }
424
kjellanderb62dbbe2016-09-23 00:38:52 -0700425 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800426 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700427 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200428 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
429 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700430 ]
kthelgasonc0977102017-04-24 00:57:16 -0700431 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700432 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700433
434 libs = [
435 "CFNetwork.framework",
436 "icucore",
437 ]
438 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800439
440 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800441 # TODO(kthelgason): compile xctests on mac when chromium supports it.
442 if (is_ios) {
443 rtc_source_set("apprtcmobile_test_sources") {
kjellander1993b1d2017-03-06 00:29:21 -0800444 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800445 include_dirs = [
446 "objc/AppRTCMobile",
447 "objc/AppRTCMobile/ios",
448 ]
449 testonly = true
450 sources = [
451 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100452 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800453 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
454 ]
kjellander1993b1d2017-03-06 00:29:21 -0800455 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800456 ":AppRTCMobile_ios_frameworks",
457 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100458 "../rtc_base:rtc_base",
459 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800460 "//build/config/ios:xctest",
461 "//third_party/ocmock",
462 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800463 }
464
kthelgason4065a572017-02-14 04:58:56 -0800465 rtc_ios_xctest_test("apprtcmobile_tests") {
466 info_plist = "objc/AppRTCMobile/ios/Info.plist"
467 sources = [
468 "objc/AppRTCMobile/ios/main.m",
469 ]
470 deps = [
471 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100472 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800473 ]
474 ldflags = [ "-all_load" ]
475 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800476 }
477 }
tkchin2ddfdba2016-08-07 21:37:45 -0700478}
kthelgason0727f152016-08-08 09:03:23 -0700479
480if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700481 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700482 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700483 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700484 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700485 # Disable warnings failing when compiling with Clang on Windows.
486 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
487 "-Wno-format",
488
489 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
490 # for -Wno-reorder and -Wno-sign-compare
491 "-Wno-reorder",
492 "-Wno-sign-compare",
493 ]
494 }
kjellanderd4626e52016-09-07 02:33:01 -0700495 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700496 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700497 # Needed to compile on Linux 32-bit.
498 "-Wno-sentinel",
499 ]
500 }
kjellander4a9abad2016-09-18 08:12:29 -0700501
502 if (is_clang) {
503 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
504 # set of warnings.
505 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
506 cflags += [ "-Wno-inconsistent-missing-override" ]
507 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700508 }
509
ehmaldonado38a21322016-09-02 04:10:34 -0700510 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800511 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700512 sources = [
513 "peerconnection/client/conductor.cc",
514 "peerconnection/client/conductor.h",
515 "peerconnection/client/defaults.cc",
516 "peerconnection/client/defaults.h",
517 "peerconnection/client/peer_connection_client.cc",
518 "peerconnection/client/peer_connection_client.h",
519 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700520
kjellandere40a7ee2016-10-16 23:56:12 -0700521 if (!build_with_chromium && is_clang) {
522 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700523 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700524 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100525 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100526 "../api:libjingle_peerconnection_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100527 "../api:video_frame_api_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100528 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100529 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100530 ]
kthelgason0727f152016-08-08 09:03:23 -0700531 if (is_win) {
532 sources += [
533 "peerconnection/client/flagdefs.h",
534 "peerconnection/client/main.cc",
535 "peerconnection/client/main_wnd.cc",
536 "peerconnection/client/main_wnd.h",
537 ]
538 cflags = [ "/wd4245" ]
539 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700540 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700541 }
542 if (is_linux) {
543 sources += [
544 "peerconnection/client/linux/main.cc",
545 "peerconnection/client/linux/main_wnd.cc",
546 "peerconnection/client/linux/main_wnd.h",
547 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200548 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700549 libs = [
550 "X11",
551 "Xcomposite",
552 "Xext",
553 "Xrender",
554 ]
thomasandersonef16e992016-12-13 02:57:43 -0800555 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700556 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700557 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800558
559 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700560 "../api:libjingle_peerconnection_test_api",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100561 "../api:peerconnection_and_implicit_call_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700562 "../api:video_frame_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200563 "../api/audio_codecs:builtin_audio_decoder_factory",
564 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100565 "../media:rtc_audio_video",
jianjun.zhuc0247402017-07-11 06:20:45 -0700566 "../modules/video_capture:video_capture_module",
567 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700568 "../rtc_base:rtc_base",
569 "../rtc_base:rtc_base_approved",
570 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700571 "../system_wrappers:field_trial_default",
572 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000573 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800574 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800575 ]
kthelgason0727f152016-08-08 09:03:23 -0700576 }
kjellanderd4626e52016-09-07 02:33:01 -0700577
ehmaldonado38a21322016-09-02 04:10:34 -0700578 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800579 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700580 sources = [
581 "peerconnection/server/data_socket.cc",
582 "peerconnection/server/data_socket.h",
583 "peerconnection/server/main.cc",
584 "peerconnection/server/peer_channel.cc",
585 "peerconnection/server/peer_channel.h",
586 "peerconnection/server/utils.cc",
587 "peerconnection/server/utils.h",
588 ]
589 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700590 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700591 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100592 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700593 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700594 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700595 if (!build_with_chromium && is_clang) {
596 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700597 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700598 }
599 }
ehmaldonado38a21322016-09-02 04:10:34 -0700600 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800601 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700602 sources = [
603 "relayserver/relayserver_main.cc",
604 ]
605 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700606 "../p2p:rtc_p2p",
607 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700608 "../rtc_base:rtc_base",
609 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700610 "../system_wrappers:field_trial_default",
611 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000612 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700613 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700614 if (!build_with_chromium && is_clang) {
615 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700616 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700617 }
618 }
ehmaldonado38a21322016-09-02 04:10:34 -0700619 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800620 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700621 sources = [
622 "turnserver/turnserver_main.cc",
623 ]
624 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700625 "../p2p:rtc_p2p",
626 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700627 "../rtc_base:rtc_base",
628 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700629 "../system_wrappers:field_trial_default",
630 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000631 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700632 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700633 if (!build_with_chromium && is_clang) {
634 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700635 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700636 }
637 }
ehmaldonado38a21322016-09-02 04:10:34 -0700638 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800639 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700640 sources = [
641 "stunserver/stunserver_main.cc",
642 ]
643 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700644 "../p2p:rtc_p2p",
645 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700646 "../rtc_base:rtc_base",
647 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700648 "../system_wrappers:field_trial_default",
649 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000650 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700651 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700652 if (!build_with_chromium && is_clang) {
653 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700654 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700655 }
656 }
657}
charujainaca3a242016-11-01 03:09:15 -0700658
qiangchen42f96d52017-08-08 17:08:03 -0700659if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700660 rtc_shared_library("webrtc_unity_plugin") {
661 testonly = true
662 sources = [
663 "unityplugin/simple_peer_connection.cc",
664 "unityplugin/simple_peer_connection.h",
665 "unityplugin/unity_plugin_apis.cc",
666 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700667 "unityplugin/video_observer.cc",
668 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700669 ]
qiangchen42f96d52017-08-08 17:08:03 -0700670
671 if (is_android) {
672 sources += [
673 "unityplugin/classreferenceholder.cc",
674 "unityplugin/classreferenceholder.h",
675 "unityplugin/jni_onload.cc",
676 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800677 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700678 }
679
gyzhouad7cad82017-05-11 16:10:03 -0700680 if (!build_with_chromium && is_clang) {
681 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
682 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
683 }
qiangchen42f96d52017-08-08 17:08:03 -0700684 if (is_win) {
685 cflags = [ "/wd4245" ]
686 configs += [
687 "//build/config/win:windowed",
688 ":peerconnection_client_warnings_config",
689 ]
690 }
gyzhouad7cad82017-05-11 16:10:03 -0700691 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100692 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700693 "../api:libjingle_peerconnection_test_api",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100694 "../api:peerconnection_and_implicit_call_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700695 "../api:video_frame_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800696 "../api/audio_codecs:builtin_audio_decoder_factory",
697 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100698 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100699 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700700 "../media:rtc_media",
701 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800702 "../modules/audio_device:audio_device",
703 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700704 "../modules/video_capture:video_capture_module",
705 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700706 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700707 "../system_wrappers:field_trial_default",
708 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000709 "../system_wrappers:runtime_enabled_features_default",
gyzhouad7cad82017-05-11 16:10:03 -0700710 ]
qiangchen42f96d52017-08-08 17:08:03 -0700711 if (is_android) {
712 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
713 }
714 }
715}
716
717if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000718 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700719 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
720 deps = [
721 "../rtc_base:base_java",
722 "../sdk/android:libjingle_peerconnection_java",
723 ]
724 }
725
726 dist_jar("libwebrtc_unity") {
727 _target_dir_name = get_label_info(":$target_name", "dir")
728 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
729 direct_deps_only = true
730 use_interface_jars = false
Oleh Prypin1e53f8a2017-12-21 22:06:21 +0100731 use_unprocessed_jars = true
Oleh Prypin86021d92017-09-24 22:29:06 +0200732 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700733 deps = [
734 ":webrtc_unity_java",
735 "../modules/audio_device:audio_device_java",
736 "../rtc_base:base_java",
737 "../sdk/android:libjingle_peerconnection_java",
738 "../sdk/android:libjingle_peerconnection_metrics_default_java",
739 ]
gyzhouad7cad82017-05-11 16:10:03 -0700740 }
741}
742
charujainaca3a242016-11-01 03:09:15 -0700743if (!build_with_chromium) {
744 # Doesn't build within Chrome on Win.
745 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800746 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700747 sources = [
748 "stunprober/main.cc",
749 ]
750
751 if (!build_with_chromium && is_clang) {
752 # Suppress warnings from Chrome's Clang plugins.
753 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
754 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
755 }
756
757 deps = [
758 "../p2p:libstunprober",
759 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100760 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700761 "../rtc_base:rtc_base",
762 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100763 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700764 "../system_wrappers:field_trial_default",
765 ]
766 }
767}