blob: c6940e8d9b757aa3800636fe79bbe0783ad62fc5 [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",
henrika5641fbb2018-02-21 14:12:53 +010087 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020088 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
89 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
90 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
91 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
92 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
93 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
94 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
95 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020096 ]
97
98 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020099 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -0700100 "../modules/audio_device:audio_device_java",
101 "../rtc_base:base_java",
102 "../sdk/android:libjingle_peerconnection_java",
103 "../sdk/android:libjingle_peerconnection_metrics_default_java",
104 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200105 ]
106 }
107
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200108 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800109 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200110 resource_dirs = [ "androidapp/res" ]
111 custom_package = "org.appspot.apprtc"
112 }
113
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000114 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200115 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200116 android_manifest = "androidtests/AndroidManifest.xml"
117
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100118 java_files = [
119 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
120 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200121
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200122 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200123
124 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200125 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700126 "../sdk/android:libjingle_peerconnection_java",
sakalcb79d512017-01-11 06:21:26 -0800127 "//third_party/android_support_test_runner:runner_java",
128 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200129 ]
130 }
mandermoa6069e82017-01-16 02:23:09 -0800131
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000132 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800133 apk_name = "AppRTCMobileTestStubbedVideoIO"
134 android_manifest = "androidtests/AndroidManifest.xml"
135
oprypin30cda5e2017-04-24 04:15:13 -0700136 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800137
138 apk_under_test = ":AppRTCMobile"
139
140 deps = [
141 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700142 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800143 "//third_party/android_support_test_runner:rules_java",
144 "//third_party/android_support_test_runner:runner_java",
145 "//third_party/espresso:espresso_all_java",
146 "//third_party/hamcrest:hamcrest_java",
147 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800148 ]
149
150 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100151 "../build/android/adb_reverse_forwarder.py",
152 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200153 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100154 "../rtc_tools/barcode_tools/barcode_decoder.py",
155 "../rtc_tools/barcode_tools/helper_functions.py",
156 "../rtc_tools/compare_videos.py",
157 "../rtc_tools/testing/prebuilt_apprtc.zip",
158 "../rtc_tools/testing/golang/linux/go.tar.gz",
159 "../rtc_tools/testing/build_apprtc.py",
160 "../rtc_tools/testing/utils.py",
161 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
162 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
163 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800164 ]
165 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200166}
tkchin2ddfdba2016-08-07 21:37:45 -0700167
168if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700169 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200170 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700171 }
172
kjellanderb62dbbe2016-09-23 00:38:52 -0700173 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800174 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700175 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200176 "objc/AppRTCMobile/common/ARDUtilities.h",
177 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700178 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700179 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700180
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200181 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100182 # iOS must use WebRTC.framework which is dynamically linked.
183 # 'gn check' is disabled in order to avoid confusion and
184 # errors caused by multiple implementations.
185 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700186 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100187 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100188 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000189 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700190 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200191 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700192 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700193 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700194 "../system_wrappers:field_trial_default",
195 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000196 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700197 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200198 }
tkchin2ddfdba2016-08-07 21:37:45 -0700199 }
200
201 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200202 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700203
204 # GN orders flags on a target before flags from configs. The default config
205 # adds these flags so to cancel them out they need to come from a config and
206 # cannot be on the target directly.
207 cflags = [
208 "-Wno-sign-compare",
209 "-Wno-unused-variable",
210 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700211 }
212
kjellanderb62dbbe2016-09-23 00:38:52 -0700213 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800214 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700215 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200216 "objc/AppRTCMobile/ARDAppClient+Internal.h",
217 "objc/AppRTCMobile/ARDAppClient.h",
218 "objc/AppRTCMobile/ARDAppClient.m",
219 "objc/AppRTCMobile/ARDAppEngineClient.h",
220 "objc/AppRTCMobile/ARDAppEngineClient.m",
221 "objc/AppRTCMobile/ARDBitrateTracker.h",
222 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700223 "objc/AppRTCMobile/ARDCaptureController.h",
224 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200225 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
226 "objc/AppRTCMobile/ARDJoinResponse.h",
227 "objc/AppRTCMobile/ARDJoinResponse.m",
228 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
229 "objc/AppRTCMobile/ARDMessageResponse.h",
230 "objc/AppRTCMobile/ARDMessageResponse.m",
231 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700232 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
233 "objc/AppRTCMobile/ARDSettingsModel.h",
234 "objc/AppRTCMobile/ARDSettingsModel.m",
235 "objc/AppRTCMobile/ARDSettingsStore.h",
236 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200237 "objc/AppRTCMobile/ARDSignalingChannel.h",
238 "objc/AppRTCMobile/ARDSignalingMessage.h",
239 "objc/AppRTCMobile/ARDSignalingMessage.m",
240 "objc/AppRTCMobile/ARDStatsBuilder.h",
241 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800242 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200243 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800244 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200245 "objc/AppRTCMobile/ARDWebSocketChannel.h",
246 "objc/AppRTCMobile/ARDWebSocketChannel.m",
247 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
248 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
249 "objc/AppRTCMobile/RTCIceServer+JSON.h",
250 "objc/AppRTCMobile/RTCIceServer+JSON.m",
251 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
252 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
253 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
254 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700255 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700256 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700257 deps = [
258 ":apprtc_common",
259 ":socketrocket",
260 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200261 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100262 # iOS must use WebRTC.framework which is dynamically linked.
263 # 'gn check' is disabled in order to avoid confusion and
264 # errors caused by multiple implementations.
265 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100266 deps += [
267 ":AppRTCMobile_ios_frameworks",
268 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200269 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100270 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100271 deps += [
272 "../sdk:common_objc",
273 "../sdk:mediaconstraints_objc",
274 "../sdk:peerconnectionfactory_base_objc",
275 "../sdk:videocapture_objc",
276 "../sdk:videocodec_objc",
277 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200278 }
tkchin2ddfdba2016-08-07 21:37:45 -0700279 libs = [ "QuartzCore.framework" ]
280 }
281
282 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800283 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100284 # iOS must use WebRTC.framework which is dynamically linked.
285 # 'gn check' is disabled in order to avoid confusion and
286 # errors caused by multiple implementations.
287 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800288 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700289 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100290 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200291 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100292 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
293 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200294 "objc/AppRTCMobile/ios/ARDMainView.h",
295 "objc/AppRTCMobile/ios/ARDMainView.m",
296 "objc/AppRTCMobile/ios/ARDMainViewController.h",
297 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700298 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
299 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200300 "objc/AppRTCMobile/ios/ARDStatsView.h",
301 "objc/AppRTCMobile/ios/ARDStatsView.m",
302 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
303 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
304 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
305 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200306 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
307 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200308 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
309 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800310 ]
denicija77bfd7c2016-11-15 00:41:26 -0800311
312 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200313 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800314 ":apprtc_common",
315 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100316 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800317 ]
318 }
319
320 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800321 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800322 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200323 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700324 ]
325
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200326 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700327
denicija77bfd7c2016-11-15 00:41:26 -0800328 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700329 public_configs = [ "..:common_inherited_config" ]
330
331 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200332 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800333 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800334 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100335 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700336 ]
337
338 if (target_cpu == "x86") {
339 deps += [ "//testing/iossim:iossim" ]
340 }
341 }
342
kthelgasond3adbfb2017-01-26 01:14:04 -0800343 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100344 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700345 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800346 ]
347 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400348 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800349 ]
350 outputs = [
351 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
352 ]
353 }
354
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200355 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700356 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200357 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100358
359 # Sample video taken from https://media.xiph.org/video/derf/
360 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200361 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
362 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
363 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
364 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
365 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
366 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
367 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700368 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
369 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200370 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
371 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
372 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
373 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
374 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700375 "objc/Icon-120.png",
376 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700377 "objc/Icon.png",
378 ]
379 outputs = [
380 "{{bundle_resources_dir}}/{{source_file_part}}",
381 ]
382 }
383 }
384
385 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800386 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800387 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700388 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200389 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
390 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
391 "objc/AppRTCMobile/mac/APPRTCViewController.h",
392 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700393 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700394 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700395 deps = [
396 ":apprtc_common",
397 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100398 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100399 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100400 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700401 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100402 "../sdk:videocapture_objc",
403 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100404 "../sdk:videocodec_objc",
405 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700406 ]
407 }
408
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200409 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800410 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200411 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700412
tkchin2ddfdba2016-08-07 21:37:45 -0700413 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200414 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700415 ]
416
417 public_configs = [ "..:common_inherited_config" ]
418
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200419 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700420
421 libs = [ "AppKit.framework" ]
422
423 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800424 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700425 ]
426 }
427 }
428
429 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200430 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700431 }
432
433 config("socketrocket_warning_config") {
434 # GN orders flags on a target before flags from configs. The default config
435 # adds these flags so to cancel them out they need to come from a config and
436 # cannot be on the target directly.
437 cflags = [
438 "-Wno-deprecated-declarations",
439 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700440 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800441 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700442 ]
443
henrika27d8b612016-09-21 04:13:00 -0700444 cflags_objc = [
445 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
446 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700447 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700448 }
449
kjellanderb62dbbe2016-09-23 00:38:52 -0700450 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800451 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700452 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200453 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
454 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700455 ]
kthelgasonc0977102017-04-24 00:57:16 -0700456 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700457 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700458
459 libs = [
460 "CFNetwork.framework",
461 "icucore",
462 ]
463 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800464
465 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800466 # TODO(kthelgason): compile xctests on mac when chromium supports it.
467 if (is_ios) {
468 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100469 # iOS must use WebRTC.framework which is dynamically linked.
470 # 'gn check' is disabled in order to avoid confusion and
471 # errors caused by multiple implementations.
472 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800473 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800474 include_dirs = [
475 "objc/AppRTCMobile",
476 "objc/AppRTCMobile/ios",
477 ]
478 testonly = true
479 sources = [
480 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100481 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800482 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
483 ]
kjellander1993b1d2017-03-06 00:29:21 -0800484 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800485 ":AppRTCMobile_ios_frameworks",
486 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100487 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100488 "../rtc_base:rtc_base",
489 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800490 "//build/config/ios:xctest",
491 "//third_party/ocmock",
492 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800493 }
494
kthelgason4065a572017-02-14 04:58:56 -0800495 rtc_ios_xctest_test("apprtcmobile_tests") {
496 info_plist = "objc/AppRTCMobile/ios/Info.plist"
497 sources = [
498 "objc/AppRTCMobile/ios/main.m",
499 ]
500 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100501 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800502 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100503 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800504 ]
505 ldflags = [ "-all_load" ]
506 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800507 }
508 }
tkchin2ddfdba2016-08-07 21:37:45 -0700509}
kthelgason0727f152016-08-08 09:03:23 -0700510
511if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700512 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700513 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700514 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700515 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700516 # Disable warnings failing when compiling with Clang on Windows.
517 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
518 "-Wno-format",
519
520 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
521 # for -Wno-reorder and -Wno-sign-compare
522 "-Wno-reorder",
523 "-Wno-sign-compare",
524 ]
525 }
kjellanderd4626e52016-09-07 02:33:01 -0700526 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700527 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700528 # Needed to compile on Linux 32-bit.
529 "-Wno-sentinel",
530 ]
531 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700532 }
533
ehmaldonado38a21322016-09-02 04:10:34 -0700534 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800535 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700536 sources = [
537 "peerconnection/client/conductor.cc",
538 "peerconnection/client/conductor.h",
539 "peerconnection/client/defaults.cc",
540 "peerconnection/client/defaults.h",
541 "peerconnection/client/peer_connection_client.cc",
542 "peerconnection/client/peer_connection_client.h",
543 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700544
kjellandere40a7ee2016-10-16 23:56:12 -0700545 if (!build_with_chromium && is_clang) {
546 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700547 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700548 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100549 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100550 "../api:libjingle_peerconnection_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100551 "../api:video_frame_api_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100552 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100553 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100554 ]
kthelgason0727f152016-08-08 09:03:23 -0700555 if (is_win) {
556 sources += [
557 "peerconnection/client/flagdefs.h",
558 "peerconnection/client/main.cc",
559 "peerconnection/client/main_wnd.cc",
560 "peerconnection/client/main_wnd.h",
561 ]
562 cflags = [ "/wd4245" ]
563 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700564 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700565 }
566 if (is_linux) {
567 sources += [
568 "peerconnection/client/linux/main.cc",
569 "peerconnection/client/linux/main_wnd.cc",
570 "peerconnection/client/linux/main_wnd.h",
571 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200572 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700573 libs = [
574 "X11",
575 "Xcomposite",
576 "Xext",
577 "Xrender",
578 ]
thomasandersonef16e992016-12-13 02:57:43 -0800579 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700580 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700581 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800582
583 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100584 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700585 "../api:libjingle_peerconnection_test_api",
586 "../api:video_frame_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200587 "../api/audio_codecs:builtin_audio_decoder_factory",
588 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100589 "../media:rtc_audio_video",
jianjun.zhuc0247402017-07-11 06:20:45 -0700590 "../modules/video_capture:video_capture_module",
591 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700592 "../rtc_base:rtc_base",
593 "../rtc_base:rtc_base_approved",
594 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700595 "../system_wrappers:field_trial_default",
596 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000597 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800598 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800599 ]
kthelgason0727f152016-08-08 09:03:23 -0700600 }
kjellanderd4626e52016-09-07 02:33:01 -0700601
ehmaldonado38a21322016-09-02 04:10:34 -0700602 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800603 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700604 sources = [
605 "peerconnection/server/data_socket.cc",
606 "peerconnection/server/data_socket.h",
607 "peerconnection/server/main.cc",
608 "peerconnection/server/peer_channel.cc",
609 "peerconnection/server/peer_channel.h",
610 "peerconnection/server/utils.cc",
611 "peerconnection/server/utils.h",
612 ]
613 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700614 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700615 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100616 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700617 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700618 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700619 if (!build_with_chromium && is_clang) {
620 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700621 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700622 }
623 }
ehmaldonado38a21322016-09-02 04:10:34 -0700624 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800625 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700626 sources = [
627 "relayserver/relayserver_main.cc",
628 ]
629 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700630 "../p2p:rtc_p2p",
631 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700632 "../rtc_base:rtc_base",
633 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700634 "../system_wrappers:field_trial_default",
635 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000636 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700637 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700638 if (!build_with_chromium && is_clang) {
639 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700640 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700641 }
642 }
ehmaldonado38a21322016-09-02 04:10:34 -0700643 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800644 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700645 sources = [
646 "turnserver/turnserver_main.cc",
647 ]
648 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700649 "../p2p:rtc_p2p",
650 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700651 "../rtc_base:rtc_base",
652 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700653 "../system_wrappers:field_trial_default",
654 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000655 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700656 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700657 if (!build_with_chromium && is_clang) {
658 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700659 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700660 }
661 }
ehmaldonado38a21322016-09-02 04:10:34 -0700662 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800663 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700664 sources = [
665 "stunserver/stunserver_main.cc",
666 ]
667 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700668 "../p2p:rtc_p2p",
669 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700670 "../rtc_base:rtc_base",
671 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700672 "../system_wrappers:field_trial_default",
673 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000674 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700675 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700676 if (!build_with_chromium && is_clang) {
677 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700678 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700679 }
680 }
681}
charujainaca3a242016-11-01 03:09:15 -0700682
qiangchen42f96d52017-08-08 17:08:03 -0700683if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700684 rtc_shared_library("webrtc_unity_plugin") {
685 testonly = true
686 sources = [
687 "unityplugin/simple_peer_connection.cc",
688 "unityplugin/simple_peer_connection.h",
689 "unityplugin/unity_plugin_apis.cc",
690 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700691 "unityplugin/video_observer.cc",
692 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700693 ]
qiangchen42f96d52017-08-08 17:08:03 -0700694
695 if (is_android) {
696 sources += [
697 "unityplugin/classreferenceholder.cc",
698 "unityplugin/classreferenceholder.h",
699 "unityplugin/jni_onload.cc",
700 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800701 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700702 }
703
gyzhouad7cad82017-05-11 16:10:03 -0700704 if (!build_with_chromium && is_clang) {
705 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
706 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
707 }
qiangchen42f96d52017-08-08 17:08:03 -0700708 if (is_win) {
709 cflags = [ "/wd4245" ]
710 configs += [
711 "//build/config/win:windowed",
712 ":peerconnection_client_warnings_config",
713 ]
714 }
gyzhouad7cad82017-05-11 16:10:03 -0700715 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100716 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700717 "../api:libjingle_peerconnection_test_api",
718 "../api:video_frame_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800719 "../api/audio_codecs:builtin_audio_decoder_factory",
720 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100721 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100722 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700723 "../media:rtc_media",
724 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800725 "../modules/audio_device:audio_device",
726 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700727 "../modules/video_capture:video_capture_module",
728 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700729 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700730 "../system_wrappers:field_trial_default",
731 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000732 "../system_wrappers:runtime_enabled_features_default",
gyzhouad7cad82017-05-11 16:10:03 -0700733 ]
qiangchen42f96d52017-08-08 17:08:03 -0700734 if (is_android) {
735 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
736 }
737 }
738}
739
740if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000741 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700742 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
743 deps = [
744 "../rtc_base:base_java",
745 "../sdk/android:libjingle_peerconnection_java",
746 ]
747 }
748
749 dist_jar("libwebrtc_unity") {
750 _target_dir_name = get_label_info(":$target_name", "dir")
751 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
752 direct_deps_only = true
753 use_interface_jars = false
Oleh Prypin1e53f8a2017-12-21 22:06:21 +0100754 use_unprocessed_jars = true
Oleh Prypin86021d92017-09-24 22:29:06 +0200755 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700756 deps = [
757 ":webrtc_unity_java",
758 "../modules/audio_device:audio_device_java",
759 "../rtc_base:base_java",
760 "../sdk/android:libjingle_peerconnection_java",
761 "../sdk/android:libjingle_peerconnection_metrics_default_java",
762 ]
gyzhouad7cad82017-05-11 16:10:03 -0700763 }
764}
765
charujainaca3a242016-11-01 03:09:15 -0700766if (!build_with_chromium) {
767 # Doesn't build within Chrome on Win.
768 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800769 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700770 sources = [
771 "stunprober/main.cc",
772 ]
773
774 if (!build_with_chromium && is_clang) {
775 # Suppress warnings from Chrome's Clang plugins.
776 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
777 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
778 }
779
780 deps = [
781 "../p2p:libstunprober",
782 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100783 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700784 "../rtc_base:rtc_base",
785 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100786 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700787 "../system_wrappers:field_trial_default",
788 ]
789 }
790}