blob: f39e23aea424a4e18ce48bd8c31e95998e343fab [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",
Qingsi Wanga4e72b72018-02-12 10:34:18 -080086 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020087 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
88 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
89 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
90 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
91 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
92 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
93 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
94 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 ]
96
97 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020098 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070099 "../modules/audio_device:audio_device_java",
100 "../rtc_base:base_java",
101 "../sdk/android:libjingle_peerconnection_java",
102 "../sdk/android:libjingle_peerconnection_metrics_default_java",
103 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200104 ]
105 }
106
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200107 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800108 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200109 resource_dirs = [ "androidapp/res" ]
110 custom_package = "org.appspot.apprtc"
111 }
112
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000113 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200114 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200115 android_manifest = "androidtests/AndroidManifest.xml"
116
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100117 java_files = [
118 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
119 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200120
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200121 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200122
123 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200124 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700125 "../sdk/android:libjingle_peerconnection_java",
sakalcb79d512017-01-11 06:21:26 -0800126 "//third_party/android_support_test_runner:runner_java",
127 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200128 ]
129 }
mandermoa6069e82017-01-16 02:23:09 -0800130
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000131 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800132 apk_name = "AppRTCMobileTestStubbedVideoIO"
133 android_manifest = "androidtests/AndroidManifest.xml"
134
oprypin30cda5e2017-04-24 04:15:13 -0700135 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800136
137 apk_under_test = ":AppRTCMobile"
138
139 deps = [
140 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700141 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800142 "//third_party/android_support_test_runner:rules_java",
143 "//third_party/android_support_test_runner:runner_java",
144 "//third_party/espresso:espresso_all_java",
145 "//third_party/hamcrest:hamcrest_java",
146 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800147 ]
148
149 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100150 "../build/android/adb_reverse_forwarder.py",
151 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200152 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100153 "../rtc_tools/barcode_tools/barcode_decoder.py",
154 "../rtc_tools/barcode_tools/helper_functions.py",
155 "../rtc_tools/compare_videos.py",
156 "../rtc_tools/testing/prebuilt_apprtc.zip",
157 "../rtc_tools/testing/golang/linux/go.tar.gz",
158 "../rtc_tools/testing/build_apprtc.py",
159 "../rtc_tools/testing/utils.py",
160 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
161 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
162 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800163 ]
164 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200165}
tkchin2ddfdba2016-08-07 21:37:45 -0700166
167if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700168 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200169 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700170 }
171
kjellanderb62dbbe2016-09-23 00:38:52 -0700172 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800173 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700174 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200175 "objc/AppRTCMobile/common/ARDUtilities.h",
176 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700177 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700178 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700179
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200180 if (is_ios) {
kthelgason5901d9d2017-08-16 07:28:03 -0700181 deps = [
182 ":AppRTCMobile_ios_frameworks",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100183 "../sdk:common_objc",
184 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000185 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700186 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200187 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700188 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700189 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700190 "../system_wrappers:field_trial_default",
191 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000192 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700193 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200194 }
tkchin2ddfdba2016-08-07 21:37:45 -0700195 }
196
197 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200198 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700199
200 # GN orders flags on a target before flags from configs. The default config
201 # adds these flags so to cancel them out they need to come from a config and
202 # cannot be on the target directly.
203 cflags = [
204 "-Wno-sign-compare",
205 "-Wno-unused-variable",
206 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700207 }
208
kjellanderb62dbbe2016-09-23 00:38:52 -0700209 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800210 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700211 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200212 "objc/AppRTCMobile/ARDAppClient+Internal.h",
213 "objc/AppRTCMobile/ARDAppClient.h",
214 "objc/AppRTCMobile/ARDAppClient.m",
215 "objc/AppRTCMobile/ARDAppEngineClient.h",
216 "objc/AppRTCMobile/ARDAppEngineClient.m",
217 "objc/AppRTCMobile/ARDBitrateTracker.h",
218 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700219 "objc/AppRTCMobile/ARDCaptureController.h",
220 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200221 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
222 "objc/AppRTCMobile/ARDJoinResponse.h",
223 "objc/AppRTCMobile/ARDJoinResponse.m",
224 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
225 "objc/AppRTCMobile/ARDMessageResponse.h",
226 "objc/AppRTCMobile/ARDMessageResponse.m",
227 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700228 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
229 "objc/AppRTCMobile/ARDSettingsModel.h",
230 "objc/AppRTCMobile/ARDSettingsModel.m",
231 "objc/AppRTCMobile/ARDSettingsStore.h",
232 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200233 "objc/AppRTCMobile/ARDSignalingChannel.h",
234 "objc/AppRTCMobile/ARDSignalingMessage.h",
235 "objc/AppRTCMobile/ARDSignalingMessage.m",
236 "objc/AppRTCMobile/ARDStatsBuilder.h",
237 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800238 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200239 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800240 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200241 "objc/AppRTCMobile/ARDWebSocketChannel.h",
242 "objc/AppRTCMobile/ARDWebSocketChannel.m",
243 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
244 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
245 "objc/AppRTCMobile/RTCIceServer+JSON.h",
246 "objc/AppRTCMobile/RTCIceServer+JSON.m",
247 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
248 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
249 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
250 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700251 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700252 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700253 deps = [
254 ":apprtc_common",
255 ":socketrocket",
256 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200257 if (is_ios) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100258 deps += [
259 ":AppRTCMobile_ios_frameworks",
260 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200261 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100262 } else {
263 deps += [ "../sdk:peerconnection_objc" ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200264 }
tkchin2ddfdba2016-08-07 21:37:45 -0700265 libs = [ "QuartzCore.framework" ]
266 }
267
268 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800269 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800270 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700271 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100272 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200273 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100274 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
275 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200276 "objc/AppRTCMobile/ios/ARDMainView.h",
277 "objc/AppRTCMobile/ios/ARDMainView.m",
278 "objc/AppRTCMobile/ios/ARDMainViewController.h",
279 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700280 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
281 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200282 "objc/AppRTCMobile/ios/ARDStatsView.h",
283 "objc/AppRTCMobile/ios/ARDStatsView.m",
284 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
285 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
286 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
287 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200288 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
289 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200290 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
291 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800292 ]
denicija77bfd7c2016-11-15 00:41:26 -0800293
294 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200295 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800296 ":apprtc_common",
297 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100298 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800299 ]
300 }
301
302 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800303 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800304 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200305 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700306 ]
307
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200308 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700309
denicija77bfd7c2016-11-15 00:41:26 -0800310 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700311 public_configs = [ "..:common_inherited_config" ]
312
313 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200314 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800315 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800316 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100317 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700318 ]
319
320 if (target_cpu == "x86") {
321 deps += [ "//testing/iossim:iossim" ]
322 }
323 }
324
kthelgasond3adbfb2017-01-26 01:14:04 -0800325 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100326 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700327 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800328 ]
329 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400330 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800331 ]
332 outputs = [
333 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
334 ]
335 }
336
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200337 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700338 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200339 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100340
341 # Sample video taken from https://media.xiph.org/video/derf/
342 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200343 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
344 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
345 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
346 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
347 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
348 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
349 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700350 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
351 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200352 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
353 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
354 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
355 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
356 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700357 "objc/Icon-120.png",
358 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700359 "objc/Icon.png",
360 ]
361 outputs = [
362 "{{bundle_resources_dir}}/{{source_file_part}}",
363 ]
364 }
365 }
366
367 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800368 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800369 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700370 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200371 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
372 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
373 "objc/AppRTCMobile/mac/APPRTCViewController.h",
374 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700375 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700376 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700377 deps = [
378 ":apprtc_common",
379 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100380 "../sdk:metal_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700381 "../sdk:ui_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700382 ]
383 }
384
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200385 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800386 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200387 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700388
tkchin2ddfdba2016-08-07 21:37:45 -0700389 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200390 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700391 ]
392
393 public_configs = [ "..:common_inherited_config" ]
394
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200395 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700396
397 libs = [ "AppKit.framework" ]
398
399 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800400 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700401 ]
402 }
403 }
404
405 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200406 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700407 }
408
409 config("socketrocket_warning_config") {
410 # GN orders flags on a target before flags from configs. The default config
411 # adds these flags so to cancel them out they need to come from a config and
412 # cannot be on the target directly.
413 cflags = [
414 "-Wno-deprecated-declarations",
415 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700416 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800417 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700418 ]
419
henrika27d8b612016-09-21 04:13:00 -0700420 cflags_objc = [
421 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
422 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700423 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700424 }
425
kjellanderb62dbbe2016-09-23 00:38:52 -0700426 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800427 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700428 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200429 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
430 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700431 ]
kthelgasonc0977102017-04-24 00:57:16 -0700432 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700433 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700434
435 libs = [
436 "CFNetwork.framework",
437 "icucore",
438 ]
439 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800440
441 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800442 # TODO(kthelgason): compile xctests on mac when chromium supports it.
443 if (is_ios) {
444 rtc_source_set("apprtcmobile_test_sources") {
kjellander1993b1d2017-03-06 00:29:21 -0800445 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800446 include_dirs = [
447 "objc/AppRTCMobile",
448 "objc/AppRTCMobile/ios",
449 ]
450 testonly = true
451 sources = [
452 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100453 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800454 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
455 ]
kjellander1993b1d2017-03-06 00:29:21 -0800456 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800457 ":AppRTCMobile_ios_frameworks",
458 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100459 "../rtc_base:rtc_base",
460 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800461 "//build/config/ios:xctest",
462 "//third_party/ocmock",
463 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800464 }
465
kthelgason4065a572017-02-14 04:58:56 -0800466 rtc_ios_xctest_test("apprtcmobile_tests") {
467 info_plist = "objc/AppRTCMobile/ios/Info.plist"
468 sources = [
469 "objc/AppRTCMobile/ios/main.m",
470 ]
471 deps = [
472 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100473 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800474 ]
475 ldflags = [ "-all_load" ]
476 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800477 }
478 }
tkchin2ddfdba2016-08-07 21:37:45 -0700479}
kthelgason0727f152016-08-08 09:03:23 -0700480
481if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700482 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700483 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700484 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700485 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700486 # Disable warnings failing when compiling with Clang on Windows.
487 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
488 "-Wno-format",
489
490 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
491 # for -Wno-reorder and -Wno-sign-compare
492 "-Wno-reorder",
493 "-Wno-sign-compare",
494 ]
495 }
kjellanderd4626e52016-09-07 02:33:01 -0700496 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700497 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700498 # Needed to compile on Linux 32-bit.
499 "-Wno-sentinel",
500 ]
501 }
kjellander4a9abad2016-09-18 08:12:29 -0700502
503 if (is_clang) {
504 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
505 # set of warnings.
506 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
507 cflags += [ "-Wno-inconsistent-missing-override" ]
508 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700509 }
510
ehmaldonado38a21322016-09-02 04:10:34 -0700511 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800512 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700513 sources = [
514 "peerconnection/client/conductor.cc",
515 "peerconnection/client/conductor.h",
516 "peerconnection/client/defaults.cc",
517 "peerconnection/client/defaults.h",
518 "peerconnection/client/peer_connection_client.cc",
519 "peerconnection/client/peer_connection_client.h",
520 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700521
kjellandere40a7ee2016-10-16 23:56:12 -0700522 if (!build_with_chromium && is_clang) {
523 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700524 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700525 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100526 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100527 "../api:libjingle_peerconnection_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100528 "../api:video_frame_api_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100529 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100530 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100531 ]
kthelgason0727f152016-08-08 09:03:23 -0700532 if (is_win) {
533 sources += [
534 "peerconnection/client/flagdefs.h",
535 "peerconnection/client/main.cc",
536 "peerconnection/client/main_wnd.cc",
537 "peerconnection/client/main_wnd.h",
538 ]
539 cflags = [ "/wd4245" ]
540 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700541 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700542 }
543 if (is_linux) {
544 sources += [
545 "peerconnection/client/linux/main.cc",
546 "peerconnection/client/linux/main_wnd.cc",
547 "peerconnection/client/linux/main_wnd.h",
548 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200549 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700550 libs = [
551 "X11",
552 "Xcomposite",
553 "Xext",
554 "Xrender",
555 ]
thomasandersonef16e992016-12-13 02:57:43 -0800556 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700557 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700558 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800559
560 deps += [
jianjun.zhuc0247402017-07-11 06:20:45 -0700561 "../api:libjingle_peerconnection_test_api",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100562 "../api:peerconnection_and_implicit_call_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700563 "../api:video_frame_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200564 "../api/audio_codecs:builtin_audio_decoder_factory",
565 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100566 "../media:rtc_audio_video",
jianjun.zhuc0247402017-07-11 06:20:45 -0700567 "../modules/video_capture:video_capture_module",
568 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700569 "../rtc_base:rtc_base",
570 "../rtc_base:rtc_base_approved",
571 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700572 "../system_wrappers:field_trial_default",
573 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000574 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800575 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800576 ]
kthelgason0727f152016-08-08 09:03:23 -0700577 }
kjellanderd4626e52016-09-07 02:33:01 -0700578
ehmaldonado38a21322016-09-02 04:10:34 -0700579 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800580 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700581 sources = [
582 "peerconnection/server/data_socket.cc",
583 "peerconnection/server/data_socket.h",
584 "peerconnection/server/main.cc",
585 "peerconnection/server/peer_channel.cc",
586 "peerconnection/server/peer_channel.h",
587 "peerconnection/server/utils.cc",
588 "peerconnection/server/utils.h",
589 ]
590 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700591 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700592 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100593 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700594 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700595 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700596 if (!build_with_chromium && is_clang) {
597 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700598 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700599 }
600 }
ehmaldonado38a21322016-09-02 04:10:34 -0700601 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800602 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700603 sources = [
604 "relayserver/relayserver_main.cc",
605 ]
606 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700607 "../p2p:rtc_p2p",
608 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700609 "../rtc_base:rtc_base",
610 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700611 "../system_wrappers:field_trial_default",
612 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000613 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700614 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700615 if (!build_with_chromium && is_clang) {
616 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700617 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700618 }
619 }
ehmaldonado38a21322016-09-02 04:10:34 -0700620 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800621 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700622 sources = [
623 "turnserver/turnserver_main.cc",
624 ]
625 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700626 "../p2p:rtc_p2p",
627 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700628 "../rtc_base:rtc_base",
629 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700630 "../system_wrappers:field_trial_default",
631 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000632 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700633 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700634 if (!build_with_chromium && is_clang) {
635 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700636 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700637 }
638 }
ehmaldonado38a21322016-09-02 04:10:34 -0700639 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800640 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700641 sources = [
642 "stunserver/stunserver_main.cc",
643 ]
644 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700645 "../p2p:rtc_p2p",
646 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700647 "../rtc_base:rtc_base",
648 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700649 "../system_wrappers:field_trial_default",
650 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000651 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700652 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700653 if (!build_with_chromium && is_clang) {
654 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700655 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700656 }
657 }
658}
charujainaca3a242016-11-01 03:09:15 -0700659
qiangchen42f96d52017-08-08 17:08:03 -0700660if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700661 rtc_shared_library("webrtc_unity_plugin") {
662 testonly = true
663 sources = [
664 "unityplugin/simple_peer_connection.cc",
665 "unityplugin/simple_peer_connection.h",
666 "unityplugin/unity_plugin_apis.cc",
667 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700668 "unityplugin/video_observer.cc",
669 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700670 ]
qiangchen42f96d52017-08-08 17:08:03 -0700671
672 if (is_android) {
673 sources += [
674 "unityplugin/classreferenceholder.cc",
675 "unityplugin/classreferenceholder.h",
676 "unityplugin/jni_onload.cc",
677 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800678 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700679 }
680
gyzhouad7cad82017-05-11 16:10:03 -0700681 if (!build_with_chromium && is_clang) {
682 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
683 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
684 }
qiangchen42f96d52017-08-08 17:08:03 -0700685 if (is_win) {
686 cflags = [ "/wd4245" ]
687 configs += [
688 "//build/config/win:windowed",
689 ":peerconnection_client_warnings_config",
690 ]
691 }
gyzhouad7cad82017-05-11 16:10:03 -0700692 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100693 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700694 "../api:libjingle_peerconnection_test_api",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100695 "../api:peerconnection_and_implicit_call_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700696 "../api:video_frame_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800697 "../api/audio_codecs:builtin_audio_decoder_factory",
698 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100699 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100700 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700701 "../media:rtc_media",
702 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800703 "../modules/audio_device:audio_device",
704 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700705 "../modules/video_capture:video_capture_module",
706 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700707 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700708 "../system_wrappers:field_trial_default",
709 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000710 "../system_wrappers:runtime_enabled_features_default",
gyzhouad7cad82017-05-11 16:10:03 -0700711 ]
qiangchen42f96d52017-08-08 17:08:03 -0700712 if (is_android) {
713 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
714 }
715 }
716}
717
718if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000719 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700720 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
721 deps = [
722 "../rtc_base:base_java",
723 "../sdk/android:libjingle_peerconnection_java",
724 ]
725 }
726
727 dist_jar("libwebrtc_unity") {
728 _target_dir_name = get_label_info(":$target_name", "dir")
729 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
730 direct_deps_only = true
731 use_interface_jars = false
Oleh Prypin1e53f8a2017-12-21 22:06:21 +0100732 use_unprocessed_jars = true
Oleh Prypin86021d92017-09-24 22:29:06 +0200733 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700734 deps = [
735 ":webrtc_unity_java",
736 "../modules/audio_device:audio_device_java",
737 "../rtc_base:base_java",
738 "../sdk/android:libjingle_peerconnection_java",
739 "../sdk/android:libjingle_peerconnection_metrics_default_java",
740 ]
gyzhouad7cad82017-05-11 16:10:03 -0700741 }
742}
743
charujainaca3a242016-11-01 03:09:15 -0700744if (!build_with_chromium) {
745 # Doesn't build within Chrome on Win.
746 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800747 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700748 sources = [
749 "stunprober/main.cc",
750 ]
751
752 if (!build_with_chromium && is_clang) {
753 # Suppress warnings from Chrome's Clang plugins.
754 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
755 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
756 }
757
758 deps = [
759 "../p2p:libstunprober",
760 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100761 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700762 "../rtc_base:rtc_base",
763 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100764 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700765 "../system_wrappers:field_trial_default",
766 ]
767 }
768}