blob: 2bf01448e7c435be53f41e99e2d63fe7fcee9389 [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",
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +020028 ":AppRTCMobile_stubbed_video_io_test_apk",
29 ":AppRTCMobile_test_apk",
George Zhou2770c3d2018-03-07 09:58:54 -080030 ":libwebrtc_unity",
kjellander6ceab082016-10-28 05:44:03 -070031 ]
Sami Kalliomäki3e77afd2018-03-08 16:43:16 +010032
33 # TODO(sakal): We include some code from the tests. Remove this dependency
34 # and remove this if-clause.
35 if (rtc_include_tests) {
36 deps += [ "androidnativeapi:androidnativeapi" ]
37 }
kjellander6ceab082016-10-28 05:44:03 -070038 }
39
charujainaca3a242016-11-01 03:09:15 -070040 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010041 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 03:09:15 -070042 }
43
kjellander6ceab082016-10-28 05:44:03 -070044 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010045 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020046 }
kjellander6ceab082016-10-28 05:44:03 -070047
48 if (is_linux || is_win) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010049 deps += [
kthelgason0727f152016-08-08 09:03:23 -070050 ":peerconnection_client",
51 ":peerconnection_server",
52 ":relayserver",
53 ":stunserver",
54 ":turnserver",
55 ]
56 }
George Zhou2770c3d2018-03-07 09:58:54 -080057
58 if (is_android || is_win) {
59 deps += [ ":webrtc_unity_plugin" ]
60 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020061}
62
tkchin2ddfdba2016-08-07 21:37:45 -070063if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000064 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080065 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020066 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020067 android_manifest = "androidapp/AndroidManifest.xml"
68
69 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020070 ":AppRTCMobile_javalib",
71 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070072 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020073 ]
74
jianjun.zhuc0247402017-07-11 06:20:45 -070075 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020076 }
77
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000078 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -080079 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +010080 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -080081
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020082 java_files = [
83 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -080084 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020085 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
86 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
87 "androidapp/src/org/appspot/apprtc/CallActivity.java",
88 "androidapp/src/org/appspot/apprtc/CallFragment.java",
89 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
90 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
91 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
92 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
93 "androidapp/src/org/appspot/apprtc/HudFragment.java",
94 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -080096 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
henrika5641fbb2018-02-21 14:12:53 +010097 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020098 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
99 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
100 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
101 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
102 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
103 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
104 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
105 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200106 ]
107
108 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200109 ":AppRTCMobile_resources",
Paulina Hensman17071682018-03-26 16:10:29 +0200110 "../modules/audio_device:audio_device_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700111 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200112 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200113 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200114 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 09:33:30 +0200115 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200116 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200117 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200118 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700119 "../sdk/android:libjingle_peerconnection_java",
120 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200121 "../sdk/android:peerconnection_java",
122 "../sdk/android:screencapturer_java",
123 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200124 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200125 "../sdk/android:video_api_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200126 "../sdk/android:video_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700127 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomäki06e363a2018-03-22 13:42:50 +0100128 "//third_party/jsr-305:jsr_305_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200129 ]
130 }
131
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200132 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800133 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200134 resource_dirs = [ "androidapp/res" ]
135 custom_package = "org.appspot.apprtc"
136 }
137
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200138 rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200139 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200140 android_manifest = "androidtests/AndroidManifest.xml"
141
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100142 java_files = [
143 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
144 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200145
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200146 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200147
148 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200149 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700150 "../sdk/android:libjingle_peerconnection_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200151 "../sdk/android:video_java",
sakalcb79d512017-01-11 06:21:26 -0800152 "//third_party/android_support_test_runner:runner_java",
153 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200154 ]
155 }
mandermoa6069e82017-01-16 02:23:09 -0800156
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200157 group("video_quality_loopback_test") {
158 testonly = true
159
160 deps = [
161 ":AppRTCMobile_stubbed_video_io_test_apk",
162 "../rtc_tools:frame_analyzer_host",
163 ]
164
165 data = [
166 "../build/android/adb_reverse_forwarder.py",
167 "../examples/androidtests/video_quality_loopback_test.py",
168 "../resources/reference_video_640x360_30fps.y4m",
169 "../rtc_tools/barcode_tools/barcode_decoder.py",
170 "../rtc_tools/barcode_tools/helper_functions.py",
171 "../rtc_tools/compare_videos.py",
172 "../rtc_tools/testing/prebuilt_apprtc.zip",
173 "../rtc_tools/testing/golang/linux/go.tar.gz",
174 "../rtc_tools/testing/build_apprtc.py",
175 "../rtc_tools/testing/utils.py",
176 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
177 "../tools_webrtc/video_quality_toolchain/linux/zxing",
178 "${root_out_dir}/frame_analyzer_host",
179 ]
180 }
181
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200182 rtc_instrumentation_test_apk("AppRTCMobile_stubbed_video_io_test_apk") {
mandermoa6069e82017-01-16 02:23:09 -0800183 apk_name = "AppRTCMobileTestStubbedVideoIO"
184 android_manifest = "androidtests/AndroidManifest.xml"
185
oprypin30cda5e2017-04-24 04:15:13 -0700186 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800187
188 apk_under_test = ":AppRTCMobile"
189
190 deps = [
191 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700192 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800193 "//third_party/android_support_test_runner:rules_java",
194 "//third_party/android_support_test_runner:runner_java",
195 "//third_party/espresso:espresso_all_java",
196 "//third_party/hamcrest:hamcrest_java",
197 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800198 ]
Mirko Bonadei6d800032018-09-17 12:45:10 +0000199
200 data = [
Mirko Bonadei6d800032018-09-17 12:45:10 +0000201 "../resources/reference_video_640x360_30fps.y4m",
Mirko Bonadei6d800032018-09-17 12:45:10 +0000202 ]
mandermoa6069e82017-01-16 02:23:09 -0800203 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200204}
tkchin2ddfdba2016-08-07 21:37:45 -0700205
206if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700207 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200208 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700209 }
210
kjellanderb62dbbe2016-09-23 00:38:52 -0700211 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800212 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700213 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200214 "objc/AppRTCMobile/common/ARDUtilities.h",
215 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700216 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700217 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700218
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200219 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100220 # iOS must use WebRTC.framework which is dynamically linked.
kthelgason5901d9d2017-08-16 07:28:03 -0700221 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200222 "../sdk:framework_objc+link",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100223 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000224 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700225 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200226 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700227 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200228 "../sdk:mac_framework_objc+link",
kthelgason5901d9d2017-08-16 07:28:03 -0700229 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000230 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700231 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200232 }
tkchin2ddfdba2016-08-07 21:37:45 -0700233 }
234
235 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200236 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700237 }
238
kjellanderb62dbbe2016-09-23 00:38:52 -0700239 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800240 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700241 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200242 "objc/AppRTCMobile/ARDAppClient+Internal.h",
243 "objc/AppRTCMobile/ARDAppClient.h",
244 "objc/AppRTCMobile/ARDAppClient.m",
245 "objc/AppRTCMobile/ARDAppEngineClient.h",
246 "objc/AppRTCMobile/ARDAppEngineClient.m",
247 "objc/AppRTCMobile/ARDBitrateTracker.h",
248 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700249 "objc/AppRTCMobile/ARDCaptureController.h",
250 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200251 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
252 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200253 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
254 "objc/AppRTCMobile/ARDJoinResponse.h",
255 "objc/AppRTCMobile/ARDJoinResponse.m",
256 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
257 "objc/AppRTCMobile/ARDMessageResponse.h",
258 "objc/AppRTCMobile/ARDMessageResponse.m",
259 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700260 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
261 "objc/AppRTCMobile/ARDSettingsModel.h",
262 "objc/AppRTCMobile/ARDSettingsModel.m",
263 "objc/AppRTCMobile/ARDSettingsStore.h",
264 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200265 "objc/AppRTCMobile/ARDSignalingChannel.h",
266 "objc/AppRTCMobile/ARDSignalingMessage.h",
267 "objc/AppRTCMobile/ARDSignalingMessage.m",
268 "objc/AppRTCMobile/ARDStatsBuilder.h",
269 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800270 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200271 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800272 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200273 "objc/AppRTCMobile/ARDWebSocketChannel.h",
274 "objc/AppRTCMobile/ARDWebSocketChannel.m",
275 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
276 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
277 "objc/AppRTCMobile/RTCIceServer+JSON.h",
278 "objc/AppRTCMobile/RTCIceServer+JSON.m",
279 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
280 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
281 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
282 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700283 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700284 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700285 deps = [
286 ":apprtc_common",
287 ":socketrocket",
288 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200289 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100290 # iOS must use WebRTC.framework which is dynamically linked.
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100291 deps += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200292 "../sdk:framework_objc+link",
293 "../sdk:ios_framework_bundle",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200294 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100295 } else {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200296 deps += [ "../sdk:mac_framework_objc+link" ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200297 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000298 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700299 }
300
301 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800302 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100303 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800304 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700305 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100306 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200307 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100308 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
309 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200310 "objc/AppRTCMobile/ios/ARDMainView.h",
311 "objc/AppRTCMobile/ios/ARDMainView.m",
312 "objc/AppRTCMobile/ios/ARDMainViewController.h",
313 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700314 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
315 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200316 "objc/AppRTCMobile/ios/ARDStatsView.h",
317 "objc/AppRTCMobile/ios/ARDStatsView.m",
318 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
319 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
320 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
321 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200322 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
323 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200324 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
325 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800326 ]
denicija77bfd7c2016-11-15 00:41:26 -0800327
328 deps = [
329 ":apprtc_common",
330 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200331 "../sdk:framework_objc+link",
332 "../sdk:ios_framework_bundle",
denicija77bfd7c2016-11-15 00:41:26 -0800333 ]
334 }
335
336 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800337 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800338 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200339 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700340 ]
341
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200342 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700343
denicija77bfd7c2016-11-15 00:41:26 -0800344 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700345 public_configs = [ "..:common_inherited_config" ]
346
347 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200348 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 00:41:26 -0800349 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100350 "../sdk:framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200351 "../sdk:ios_framework_bundle",
tkchin2ddfdba2016-08-07 21:37:45 -0700352 ]
353
Anders Carlsson358f2e02018-06-04 10:24:37 +0200354 if (rtc_apprtcmobile_broadcast_extension) {
355 deps += [
356 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
357 ":AppRTCMobileBroadcastUpload_extension_bundle",
358 ]
359 }
360
tkchin2ddfdba2016-08-07 21:37:45 -0700361 if (target_cpu == "x86") {
362 deps += [ "//testing/iossim:iossim" ]
363 }
364 }
365
Anders Carlsson358f2e02018-06-04 10:24:37 +0200366 if (rtc_apprtcmobile_broadcast_extension) {
367 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
368 testonly = true
369 public_deps = [
370 ":AppRTCMobileBroadcastUpload",
371 ]
372 sources = [
373 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
374 ]
375 outputs = [
376 "{{bundle_plugins_dir}}/{{source_file_part}}",
377 ]
378 }
379
380 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
381 testonly = true
382 public_deps = [
383 ":AppRTCMobileBroadcastSetupUI",
384 ]
385 sources = [
386 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
387 ]
388 outputs = [
389 "{{bundle_plugins_dir}}/{{source_file_part}}",
390 ]
391 }
392
393 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
Anders Carlsson358f2e02018-06-04 10:24:37 +0200394 testonly = true
395 sources = [
396 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
397 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
398 ]
399
400 deps = [
Anders Carlsson358f2e02018-06-04 10:24:37 +0200401 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200402 "../sdk:framework_objc+link",
403 "../sdk:ios_framework_bundle",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200404 ]
405
406 libs = [ "ReplayKit.framework" ]
407 }
408
409 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
410 testonly = true
411 configs += [ "..:common_config" ]
412 public_configs = [ "..:common_inherited_config" ]
413
414 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
415
416 deps = [
417 ":AppRTCMobileBroadcastUpload_lib",
418 "../sdk:framework_objc",
419 ]
420 }
421
422 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
423 sources = [
424 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
425 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
426 ]
427
428 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
429
430 libs = [ "ReplayKit.framework" ]
431
432 deps = [
433 ":AppRTCMobile_ios_bundle_data",
434 ]
435 }
436 }
437
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200438 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700439 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200440 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100441
442 # Sample video taken from https://media.xiph.org/video/derf/
443 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200444 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
445 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
446 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
447 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
448 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
449 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
450 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700451 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
452 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200453 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
454 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
455 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
456 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
457 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700458 "objc/Icon-120.png",
459 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700460 "objc/Icon.png",
461 ]
462 outputs = [
463 "{{bundle_resources_dir}}/{{source_file_part}}",
464 ]
465 }
Anders Carlsson73119182018-03-15 09:41:03 +0100466
467 rtc_static_library("ObjCNativeAPIDemo_lib") {
468 testonly = true
469 sources = [
470 "objcnativeapi/objc/NADAppDelegate.h",
471 "objcnativeapi/objc/NADAppDelegate.m",
472 "objcnativeapi/objc/NADViewController.h",
473 "objcnativeapi/objc/NADViewController.mm",
474 "objcnativeapi/objc/objccallclient.h",
475 "objcnativeapi/objc/objccallclient.mm",
476 ]
477
478 if (!build_with_chromium && is_clang) {
479 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
480 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
481 }
482
483 deps = [
484 "../api:libjingle_peerconnection_api",
485 "../api/audio_codecs:builtin_audio_decoder_factory",
486 "../api/audio_codecs:builtin_audio_encoder_factory",
487 "../logging:rtc_event_log_impl_base",
488 "../media:rtc_audio_video",
489 "../modules/audio_processing:audio_processing",
490 "../pc:libjingle_peerconnection",
491 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200492 "../sdk:base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100493 "../sdk:default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200494 "../sdk:helpers_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100495 "../sdk:native_api",
496 "../sdk:ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200497 "../sdk:videocapture_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100498 "../sdk:videotoolbox_objc",
499 "../system_wrappers:field_trial_default",
500 "../system_wrappers:metrics_default",
501 "../system_wrappers:runtime_enabled_features_default",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200502 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100503 ]
504
505 if (current_cpu == "arm64") {
506 deps += [ "../sdk:metal_objc" ]
507 }
508 }
509
510 ios_app_bundle("ObjCNativeAPIDemo") {
511 testonly = true
512 sources = [
513 "objcnativeapi/objc/main.m",
514 ]
515
516 info_plist = "objcnativeapi/Info.plist"
517
518 configs += [ "..:common_config" ]
519 public_configs = [ "..:common_inherited_config" ]
520
521 deps = [
522 ":ObjCNativeAPIDemo_lib",
523 ]
524
525 if (target_cpu == "x86") {
526 deps += [ "//testing/iossim:iossim" ]
527 }
528 }
tkchin2ddfdba2016-08-07 21:37:45 -0700529 }
530
531 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800532 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800533 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700534 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200535 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
536 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
537 "objc/AppRTCMobile/mac/APPRTCViewController.h",
538 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700539 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700540 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700541 deps = [
542 ":apprtc_common",
543 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200544 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700545 ]
546 }
547
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200548 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800549 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200550 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700551
tkchin2ddfdba2016-08-07 21:37:45 -0700552 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200553 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700554 ]
555
556 public_configs = [ "..:common_inherited_config" ]
557
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200558 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700559
560 libs = [ "AppKit.framework" ]
561
562 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800563 ":AppRTCMobile_lib",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200564 "../sdk:mac_framework_bundle",
565 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700566 ]
567 }
568 }
569
570 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200571 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700572 }
573
574 config("socketrocket_warning_config") {
575 # GN orders flags on a target before flags from configs. The default config
576 # adds these flags so to cancel them out they need to come from a config and
577 # cannot be on the target directly.
578 cflags = [
579 "-Wno-deprecated-declarations",
580 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700581 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800582 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700583 ]
584
henrika27d8b612016-09-21 04:13:00 -0700585 cflags_objc = [
586 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
587 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700588 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700589 }
590
kjellanderb62dbbe2016-09-23 00:38:52 -0700591 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800592 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700593 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200594 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
595 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700596 ]
kthelgasonc0977102017-04-24 00:57:16 -0700597 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700598 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700599
600 libs = [
601 "CFNetwork.framework",
602 "icucore",
603 ]
604 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800605
606 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800607 # TODO(kthelgason): compile xctests on mac when chromium supports it.
608 if (is_ios) {
609 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100610 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800611 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800612 include_dirs = [
613 "objc/AppRTCMobile",
614 "objc/AppRTCMobile/ios",
615 ]
kthelgason4065a572017-02-14 04:58:56 -0800616 sources = [
617 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100618 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800619 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
620 ]
kjellander1993b1d2017-03-06 00:29:21 -0800621 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800622 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100623 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100624 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200625 "../sdk:framework_objc+link",
626 "../sdk:ios_framework_bundle",
kthelgason4065a572017-02-14 04:58:56 -0800627 "//build/config/ios:xctest",
628 "//third_party/ocmock",
629 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800630 }
631
kthelgason4065a572017-02-14 04:58:56 -0800632 rtc_ios_xctest_test("apprtcmobile_tests") {
633 info_plist = "objc/AppRTCMobile/ios/Info.plist"
634 sources = [
635 "objc/AppRTCMobile/ios/main.m",
636 ]
637 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100638 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800639 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100640 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800641 ]
642 ldflags = [ "-all_load" ]
643 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800644 }
645 }
tkchin2ddfdba2016-08-07 21:37:45 -0700646}
kthelgason0727f152016-08-08 09:03:23 -0700647
648if (is_linux || is_win) {
ehmaldonado38a21322016-09-02 04:10:34 -0700649 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800650 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700651 sources = [
652 "peerconnection/client/conductor.cc",
653 "peerconnection/client/conductor.h",
654 "peerconnection/client/defaults.cc",
655 "peerconnection/client/defaults.h",
656 "peerconnection/client/peer_connection_client.cc",
657 "peerconnection/client/peer_connection_client.h",
658 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700659
kjellandere40a7ee2016-10-16 23:56:12 -0700660 if (!build_with_chromium && is_clang) {
661 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700662 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700663 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100664 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100665 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200666 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100667 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100668 "../rtc_base:stringutils",
Artem Titove41c4332018-07-25 15:04:28 +0200669 "../rtc_base/third_party/sigslot",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100670 ]
kthelgason0727f152016-08-08 09:03:23 -0700671 if (is_win) {
672 sources += [
673 "peerconnection/client/flagdefs.h",
674 "peerconnection/client/main.cc",
675 "peerconnection/client/main_wnd.cc",
676 "peerconnection/client/main_wnd.h",
677 ]
kthelgason0727f152016-08-08 09:03:23 -0700678 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700679 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700680 }
681 if (is_linux) {
682 sources += [
683 "peerconnection/client/linux/main.cc",
684 "peerconnection/client/linux/main_wnd.cc",
685 "peerconnection/client/linux/main_wnd.h",
686 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200687 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700688 libs = [
689 "X11",
690 "Xcomposite",
691 "Xext",
692 "Xrender",
693 ]
thomasandersonef16e992016-12-13 02:57:43 -0800694 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700695 }
kjellander1993b1d2017-03-06 00:29:21 -0800696
697 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100698 "../api:libjingle_peerconnection_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200699 "../api/audio_codecs:builtin_audio_decoder_factory",
700 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200701 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200702 "../api/video_codecs:builtin_video_decoder_factory",
703 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100704 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200705 "../modules/audio_device:audio_device",
706 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700707 "../modules/video_capture:video_capture_module",
708 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700709 "../rtc_base:rtc_base",
710 "../rtc_base:rtc_base_approved",
711 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700712 "../system_wrappers:field_trial_default",
713 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000714 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800715 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800716 ]
kthelgason0727f152016-08-08 09:03:23 -0700717 }
kjellanderd4626e52016-09-07 02:33:01 -0700718
ehmaldonado38a21322016-09-02 04:10:34 -0700719 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800720 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700721 sources = [
722 "peerconnection/server/data_socket.cc",
723 "peerconnection/server/data_socket.h",
724 "peerconnection/server/main.cc",
725 "peerconnection/server/peer_channel.cc",
726 "peerconnection/server/peer_channel.h",
727 "peerconnection/server/utils.cc",
728 "peerconnection/server/utils.h",
729 ]
730 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700731 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700732 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100733 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700734 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700735 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700736 if (!build_with_chromium && is_clang) {
737 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700738 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700739 }
740 }
ehmaldonado38a21322016-09-02 04:10:34 -0700741 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800742 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700743 sources = [
744 "relayserver/relayserver_main.cc",
745 ]
746 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700747 "../p2p:rtc_p2p",
748 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700749 "../rtc_base:rtc_base",
750 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700751 "../system_wrappers:field_trial_default",
752 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000753 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700754 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700755 if (!build_with_chromium && is_clang) {
756 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700757 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700758 }
759 }
ehmaldonado38a21322016-09-02 04:10:34 -0700760 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800761 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700762 sources = [
763 "turnserver/turnserver_main.cc",
764 ]
765 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700766 "../p2p:rtc_p2p",
767 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700768 "../rtc_base:rtc_base",
769 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700770 "../system_wrappers:field_trial_default",
771 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000772 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700773 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700774 if (!build_with_chromium && is_clang) {
775 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700776 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700777 }
778 }
ehmaldonado38a21322016-09-02 04:10:34 -0700779 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800780 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700781 sources = [
782 "stunserver/stunserver_main.cc",
783 ]
784 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700785 "../p2p:rtc_p2p",
786 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700787 "../rtc_base:rtc_base",
788 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700789 "../system_wrappers:field_trial_default",
790 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000791 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700792 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700793 if (!build_with_chromium && is_clang) {
794 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700795 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700796 }
797 }
798}
charujainaca3a242016-11-01 03:09:15 -0700799
qiangchen42f96d52017-08-08 17:08:03 -0700800if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700801 rtc_shared_library("webrtc_unity_plugin") {
802 testonly = true
803 sources = [
804 "unityplugin/simple_peer_connection.cc",
805 "unityplugin/simple_peer_connection.h",
806 "unityplugin/unity_plugin_apis.cc",
807 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700808 "unityplugin/video_observer.cc",
809 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700810 ]
qiangchen42f96d52017-08-08 17:08:03 -0700811
812 if (is_android) {
813 sources += [
814 "unityplugin/classreferenceholder.cc",
815 "unityplugin/classreferenceholder.h",
816 "unityplugin/jni_onload.cc",
817 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800818 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700819 }
820
gyzhouad7cad82017-05-11 16:10:03 -0700821 if (!build_with_chromium && is_clang) {
822 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
823 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
824 }
qiangchen42f96d52017-08-08 17:08:03 -0700825 if (is_win) {
Mirko Bonadeif957dd92018-07-11 10:47:42 +0200826 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-08 17:08:03 -0700827 }
gyzhouad7cad82017-05-11 16:10:03 -0700828 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100829 "../api:libjingle_peerconnection_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800830 "../api/audio_codecs:builtin_audio_decoder_factory",
831 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200832 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100833 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100834 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700835 "../media:rtc_media",
836 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800837 "../modules/audio_device:audio_device",
838 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700839 "../modules/video_capture:video_capture_module",
840 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700841 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700842 "../system_wrappers:field_trial_default",
843 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000844 "../system_wrappers:runtime_enabled_features_default",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200845 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700846 ]
qiangchen42f96d52017-08-08 17:08:03 -0700847 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800848 deps += [
849 "../modules/utility:utility",
850 "../sdk/android:libjingle_peerconnection_jni",
851 ]
qiangchen42f96d52017-08-08 17:08:03 -0700852 }
853 }
854}
855
856if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000857 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700858 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
859 deps = [
860 "../rtc_base:base_java",
861 "../sdk/android:libjingle_peerconnection_java",
862 ]
863 }
864
865 dist_jar("libwebrtc_unity") {
866 _target_dir_name = get_label_info(":$target_name", "dir")
867 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800868 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700869 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800870 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200871 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700872 deps = [
873 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200874 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700875 "../rtc_base:base_java",
876 "../sdk/android:libjingle_peerconnection_java",
877 "../sdk/android:libjingle_peerconnection_metrics_default_java",
878 ]
gyzhouad7cad82017-05-11 16:10:03 -0700879 }
880}
881
charujainaca3a242016-11-01 03:09:15 -0700882if (!build_with_chromium) {
883 # Doesn't build within Chrome on Win.
884 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800885 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700886 sources = [
887 "stunprober/main.cc",
888 ]
889
890 if (!build_with_chromium && is_clang) {
891 # Suppress warnings from Chrome's Clang plugins.
892 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
893 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
894 }
895
896 deps = [
897 "../p2p:libstunprober",
898 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100899 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700900 "../rtc_base:rtc_base",
901 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100902 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700903 "../system_wrappers:field_trial_default",
904 ]
905 }
906}