blob: 7067842be86c20dca27944914309294fcf9e4ff6 [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 = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100182 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100183 "../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 {
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100262 deps += [ "../sdk:peerconnectionfactory_base_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",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100379 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100380 "../sdk:metal_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700381 "../sdk:ui_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100382 "../sdk:videocodec_objc",
383 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700384 ]
385 }
386
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200387 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800388 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200389 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700390
tkchin2ddfdba2016-08-07 21:37:45 -0700391 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200392 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700393 ]
394
395 public_configs = [ "..:common_inherited_config" ]
396
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200397 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700398
399 libs = [ "AppKit.framework" ]
400
401 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800402 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700403 ]
404 }
405 }
406
407 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200408 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700409 }
410
411 config("socketrocket_warning_config") {
412 # GN orders flags on a target before flags from configs. The default config
413 # adds these flags so to cancel them out they need to come from a config and
414 # cannot be on the target directly.
415 cflags = [
416 "-Wno-deprecated-declarations",
417 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700418 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800419 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700420 ]
421
henrika27d8b612016-09-21 04:13:00 -0700422 cflags_objc = [
423 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
424 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700425 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700426 }
427
kjellanderb62dbbe2016-09-23 00:38:52 -0700428 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800429 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700430 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200431 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
432 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700433 ]
kthelgasonc0977102017-04-24 00:57:16 -0700434 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700435 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700436
437 libs = [
438 "CFNetwork.framework",
439 "icucore",
440 ]
441 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800442
443 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800444 # TODO(kthelgason): compile xctests on mac when chromium supports it.
445 if (is_ios) {
446 rtc_source_set("apprtcmobile_test_sources") {
kjellander1993b1d2017-03-06 00:29:21 -0800447 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800448 include_dirs = [
449 "objc/AppRTCMobile",
450 "objc/AppRTCMobile/ios",
451 ]
452 testonly = true
453 sources = [
454 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100455 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800456 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
457 ]
kjellander1993b1d2017-03-06 00:29:21 -0800458 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800459 ":AppRTCMobile_ios_frameworks",
460 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100461 "../rtc_base:rtc_base",
462 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800463 "//build/config/ios:xctest",
464 "//third_party/ocmock",
465 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800466 }
467
kthelgason4065a572017-02-14 04:58:56 -0800468 rtc_ios_xctest_test("apprtcmobile_tests") {
469 info_plist = "objc/AppRTCMobile/ios/Info.plist"
470 sources = [
471 "objc/AppRTCMobile/ios/main.m",
472 ]
473 deps = [
474 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100475 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800476 ]
477 ldflags = [ "-all_load" ]
478 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800479 }
480 }
tkchin2ddfdba2016-08-07 21:37:45 -0700481}
kthelgason0727f152016-08-08 09:03:23 -0700482
483if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700484 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700485 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700486 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700487 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700488 # Disable warnings failing when compiling with Clang on Windows.
489 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
490 "-Wno-format",
491
492 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
493 # for -Wno-reorder and -Wno-sign-compare
494 "-Wno-reorder",
495 "-Wno-sign-compare",
496 ]
497 }
kjellanderd4626e52016-09-07 02:33:01 -0700498 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700499 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700500 # Needed to compile on Linux 32-bit.
501 "-Wno-sentinel",
502 ]
503 }
kjellander4a9abad2016-09-18 08:12:29 -0700504
505 if (is_clang) {
506 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
507 # set of warnings.
508 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
509 cflags += [ "-Wno-inconsistent-missing-override" ]
510 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700511 }
512
ehmaldonado38a21322016-09-02 04:10:34 -0700513 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800514 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700515 sources = [
516 "peerconnection/client/conductor.cc",
517 "peerconnection/client/conductor.h",
518 "peerconnection/client/defaults.cc",
519 "peerconnection/client/defaults.h",
520 "peerconnection/client/peer_connection_client.cc",
521 "peerconnection/client/peer_connection_client.h",
522 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700523
kjellandere40a7ee2016-10-16 23:56:12 -0700524 if (!build_with_chromium && is_clang) {
525 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700526 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700527 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100528 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100529 "../api:libjingle_peerconnection_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100530 "../api:video_frame_api_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100531 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100532 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100533 ]
kthelgason0727f152016-08-08 09:03:23 -0700534 if (is_win) {
535 sources += [
536 "peerconnection/client/flagdefs.h",
537 "peerconnection/client/main.cc",
538 "peerconnection/client/main_wnd.cc",
539 "peerconnection/client/main_wnd.h",
540 ]
541 cflags = [ "/wd4245" ]
542 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700543 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700544 }
545 if (is_linux) {
546 sources += [
547 "peerconnection/client/linux/main.cc",
548 "peerconnection/client/linux/main_wnd.cc",
549 "peerconnection/client/linux/main_wnd.h",
550 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200551 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700552 libs = [
553 "X11",
554 "Xcomposite",
555 "Xext",
556 "Xrender",
557 ]
thomasandersonef16e992016-12-13 02:57:43 -0800558 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700559 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700560 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800561
562 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100563 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700564 "../api:libjingle_peerconnection_test_api",
565 "../api:video_frame_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200566 "../api/audio_codecs:builtin_audio_decoder_factory",
567 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100568 "../media:rtc_audio_video",
jianjun.zhuc0247402017-07-11 06:20:45 -0700569 "../modules/video_capture:video_capture_module",
570 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700571 "../rtc_base:rtc_base",
572 "../rtc_base:rtc_base_approved",
573 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700574 "../system_wrappers:field_trial_default",
575 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000576 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800577 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800578 ]
kthelgason0727f152016-08-08 09:03:23 -0700579 }
kjellanderd4626e52016-09-07 02:33:01 -0700580
ehmaldonado38a21322016-09-02 04:10:34 -0700581 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800582 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700583 sources = [
584 "peerconnection/server/data_socket.cc",
585 "peerconnection/server/data_socket.h",
586 "peerconnection/server/main.cc",
587 "peerconnection/server/peer_channel.cc",
588 "peerconnection/server/peer_channel.h",
589 "peerconnection/server/utils.cc",
590 "peerconnection/server/utils.h",
591 ]
592 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700593 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700594 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100595 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700596 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700597 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700598 if (!build_with_chromium && is_clang) {
599 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700600 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700601 }
602 }
ehmaldonado38a21322016-09-02 04:10:34 -0700603 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800604 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700605 sources = [
606 "relayserver/relayserver_main.cc",
607 ]
608 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700609 "../p2p:rtc_p2p",
610 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700611 "../rtc_base:rtc_base",
612 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700613 "../system_wrappers:field_trial_default",
614 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000615 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700616 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700617 if (!build_with_chromium && is_clang) {
618 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700619 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700620 }
621 }
ehmaldonado38a21322016-09-02 04:10:34 -0700622 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800623 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700624 sources = [
625 "turnserver/turnserver_main.cc",
626 ]
627 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700628 "../p2p:rtc_p2p",
629 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700630 "../rtc_base:rtc_base",
631 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700632 "../system_wrappers:field_trial_default",
633 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000634 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700635 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700636 if (!build_with_chromium && is_clang) {
637 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700638 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700639 }
640 }
ehmaldonado38a21322016-09-02 04:10:34 -0700641 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800642 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700643 sources = [
644 "stunserver/stunserver_main.cc",
645 ]
646 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700647 "../p2p:rtc_p2p",
648 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700649 "../rtc_base:rtc_base",
650 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700651 "../system_wrappers:field_trial_default",
652 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000653 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700654 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700655 if (!build_with_chromium && is_clang) {
656 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700657 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700658 }
659 }
660}
charujainaca3a242016-11-01 03:09:15 -0700661
qiangchen42f96d52017-08-08 17:08:03 -0700662if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700663 rtc_shared_library("webrtc_unity_plugin") {
664 testonly = true
665 sources = [
666 "unityplugin/simple_peer_connection.cc",
667 "unityplugin/simple_peer_connection.h",
668 "unityplugin/unity_plugin_apis.cc",
669 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700670 "unityplugin/video_observer.cc",
671 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700672 ]
qiangchen42f96d52017-08-08 17:08:03 -0700673
674 if (is_android) {
675 sources += [
676 "unityplugin/classreferenceholder.cc",
677 "unityplugin/classreferenceholder.h",
678 "unityplugin/jni_onload.cc",
679 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800680 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700681 }
682
gyzhouad7cad82017-05-11 16:10:03 -0700683 if (!build_with_chromium && is_clang) {
684 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
685 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
686 }
qiangchen42f96d52017-08-08 17:08:03 -0700687 if (is_win) {
688 cflags = [ "/wd4245" ]
689 configs += [
690 "//build/config/win:windowed",
691 ":peerconnection_client_warnings_config",
692 ]
693 }
gyzhouad7cad82017-05-11 16:10:03 -0700694 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100695 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700696 "../api:libjingle_peerconnection_test_api",
697 "../api:video_frame_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800698 "../api/audio_codecs:builtin_audio_decoder_factory",
699 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100700 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100701 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700702 "../media:rtc_media",
703 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800704 "../modules/audio_device:audio_device",
705 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700706 "../modules/video_capture:video_capture_module",
707 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700708 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700709 "../system_wrappers:field_trial_default",
710 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000711 "../system_wrappers:runtime_enabled_features_default",
gyzhouad7cad82017-05-11 16:10:03 -0700712 ]
qiangchen42f96d52017-08-08 17:08:03 -0700713 if (is_android) {
714 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
715 }
716 }
717}
718
719if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000720 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700721 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
722 deps = [
723 "../rtc_base:base_java",
724 "../sdk/android:libjingle_peerconnection_java",
725 ]
726 }
727
728 dist_jar("libwebrtc_unity") {
729 _target_dir_name = get_label_info(":$target_name", "dir")
730 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
731 direct_deps_only = true
732 use_interface_jars = false
Oleh Prypin1e53f8a2017-12-21 22:06:21 +0100733 use_unprocessed_jars = true
Oleh Prypin86021d92017-09-24 22:29:06 +0200734 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700735 deps = [
736 ":webrtc_unity_java",
737 "../modules/audio_device:audio_device_java",
738 "../rtc_base:base_java",
739 "../sdk/android:libjingle_peerconnection_java",
740 "../sdk/android:libjingle_peerconnection_metrics_default_java",
741 ]
gyzhouad7cad82017-05-11 16:10:03 -0700742 }
743}
744
charujainaca3a242016-11-01 03:09:15 -0700745if (!build_with_chromium) {
746 # Doesn't build within Chrome on Win.
747 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800748 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700749 sources = [
750 "stunprober/main.cc",
751 ]
752
753 if (!build_with_chromium && is_clang) {
754 # Suppress warnings from Chrome's Clang plugins.
755 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
756 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
757 }
758
759 deps = [
760 "../p2p:libstunprober",
761 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100762 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700763 "../rtc_base:rtc_base",
764 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100765 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700766 "../system_wrappers:field_trial_default",
767 ]
768 }
769}