blob: d87d5d6678149a13f708e7b411e1c15efe55f898 [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_server",
51 ":relayserver",
52 ":stunserver",
53 ":turnserver",
54 ]
Robin Raymondce1b1402018-11-22 20:10:11 -050055 if (current_os != "winuwp") {
56 deps += [ ":peerconnection_client" ]
57 }
kthelgason0727f152016-08-08 09:03:23 -070058 }
George Zhou2770c3d2018-03-07 09:58:54 -080059
60 if (is_android || is_win) {
61 deps += [ ":webrtc_unity_plugin" ]
62 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020063}
64
Niels Möller9862c2e2018-10-30 12:20:03 +010065rtc_source_set("read_auth_file") {
66 testonly = true
67 sources = [
68 "turnserver/read_auth_file.cc",
69 "turnserver/read_auth_file.h",
70 ]
71 deps = [
72 "../rtc_base:rtc_base",
73 ]
74}
75
76if (rtc_include_tests) {
77 rtc_test("examples_unittests") {
78 testonly = true
79 sources = [
80 "turnserver/read_auth_file_unittest.cc",
81 ]
82 deps = [
83 ":read_auth_file",
84 "../test:test_main",
85 "//test:test_support",
86 "//testing/gtest",
87 ]
88 }
89}
90
tkchin2ddfdba2016-08-07 21:37:45 -070091if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000092 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080093 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020094 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 android_manifest = "androidapp/AndroidManifest.xml"
96
97 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020098 ":AppRTCMobile_javalib",
99 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -0700100 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200101 ]
102
jianjun.zhuc0247402017-07-11 06:20:45 -0700103 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200104 }
105
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000106 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -0800107 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +0100108 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -0800109
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200110 java_files = [
111 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -0800112 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200113 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
114 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
115 "androidapp/src/org/appspot/apprtc/CallActivity.java",
116 "androidapp/src/org/appspot/apprtc/CallFragment.java",
117 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
118 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
119 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
120 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
121 "androidapp/src/org/appspot/apprtc/HudFragment.java",
122 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200123 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -0800124 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
henrika5641fbb2018-02-21 14:12:53 +0100125 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200126 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
127 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
128 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
129 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
130 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
131 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
132 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
133 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200134 ]
135
136 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200137 ":AppRTCMobile_resources",
Paulina Hensman17071682018-03-26 16:10:29 +0200138 "../modules/audio_device:audio_device_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700139 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200140 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200141 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200142 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 09:33:30 +0200143 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200144 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200145 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200146 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700147 "../sdk/android:libjingle_peerconnection_java",
148 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200149 "../sdk/android:peerconnection_java",
150 "../sdk/android:screencapturer_java",
151 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200152 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200153 "../sdk/android:video_api_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200154 "../sdk/android:video_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700155 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomäki06e363a2018-03-22 13:42:50 +0100156 "//third_party/jsr-305:jsr_305_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200157 ]
158 }
159
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200160 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800161 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200162 resource_dirs = [ "androidapp/res" ]
163 custom_package = "org.appspot.apprtc"
164 }
165
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200166 rtc_instrumentation_test_apk("AppRTCMobile_test_apk") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200167 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200168 android_manifest = "androidtests/AndroidManifest.xml"
169
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100170 java_files = [
171 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
172 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200173
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200174 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200175
176 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200177 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700178 "../sdk/android:libjingle_peerconnection_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200179 "../sdk/android:video_java",
sakalcb79d512017-01-11 06:21:26 -0800180 "//third_party/android_support_test_runner:runner_java",
181 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200182 ]
183 }
mandermoa6069e82017-01-16 02:23:09 -0800184
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200185 group("video_quality_loopback_test") {
186 testonly = true
187
188 deps = [
189 ":AppRTCMobile_stubbed_video_io_test_apk",
190 "../rtc_tools:frame_analyzer_host",
191 ]
192
193 data = [
194 "../build/android/adb_reverse_forwarder.py",
195 "../examples/androidtests/video_quality_loopback_test.py",
196 "../resources/reference_video_640x360_30fps.y4m",
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200197 "../rtc_tools/compare_videos.py",
198 "../rtc_tools/testing/prebuilt_apprtc.zip",
199 "../rtc_tools/testing/golang/linux/go.tar.gz",
200 "../rtc_tools/testing/build_apprtc.py",
201 "../rtc_tools/testing/utils.py",
202 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
Mirko Bonadeib56706f2018-09-18 11:03:39 +0200203 "${root_out_dir}/frame_analyzer_host",
204 ]
205 }
206
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200207 rtc_instrumentation_test_apk("AppRTCMobile_stubbed_video_io_test_apk") {
mandermoa6069e82017-01-16 02:23:09 -0800208 apk_name = "AppRTCMobileTestStubbedVideoIO"
209 android_manifest = "androidtests/AndroidManifest.xml"
210
oprypin30cda5e2017-04-24 04:15:13 -0700211 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800212
213 apk_under_test = ":AppRTCMobile"
214
215 deps = [
216 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700217 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800218 "//third_party/android_support_test_runner:rules_java",
219 "//third_party/android_support_test_runner:runner_java",
220 "//third_party/espresso:espresso_all_java",
221 "//third_party/hamcrest:hamcrest_java",
222 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800223 ]
Mirko Bonadei6d800032018-09-17 12:45:10 +0000224
225 data = [
Mirko Bonadei6d800032018-09-17 12:45:10 +0000226 "../resources/reference_video_640x360_30fps.y4m",
Mirko Bonadei6d800032018-09-17 12:45:10 +0000227 ]
mandermoa6069e82017-01-16 02:23:09 -0800228 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200229}
tkchin2ddfdba2016-08-07 21:37:45 -0700230
231if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700232 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200233 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700234 }
235
kjellanderb62dbbe2016-09-23 00:38:52 -0700236 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800237 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700238 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200239 "objc/AppRTCMobile/common/ARDUtilities.h",
240 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700241 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700242 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700243
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200244 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100245 # iOS must use WebRTC.framework which is dynamically linked.
kthelgason5901d9d2017-08-16 07:28:03 -0700246 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200247 "../sdk:framework_objc+link",
kthelgason5901d9d2017-08-16 07:28:03 -0700248 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200249 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700250 deps = [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200251 "../sdk:mac_framework_objc+link",
kthelgason5901d9d2017-08-16 07:28:03 -0700252 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200253 }
tkchin2ddfdba2016-08-07 21:37:45 -0700254 }
255
256 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200257 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700258 }
259
kjellanderb62dbbe2016-09-23 00:38:52 -0700260 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800261 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700262 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200263 "objc/AppRTCMobile/ARDAppClient+Internal.h",
264 "objc/AppRTCMobile/ARDAppClient.h",
265 "objc/AppRTCMobile/ARDAppClient.m",
266 "objc/AppRTCMobile/ARDAppEngineClient.h",
267 "objc/AppRTCMobile/ARDAppEngineClient.m",
268 "objc/AppRTCMobile/ARDBitrateTracker.h",
269 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700270 "objc/AppRTCMobile/ARDCaptureController.h",
271 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200272 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
273 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200274 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
275 "objc/AppRTCMobile/ARDJoinResponse.h",
276 "objc/AppRTCMobile/ARDJoinResponse.m",
277 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
278 "objc/AppRTCMobile/ARDMessageResponse.h",
279 "objc/AppRTCMobile/ARDMessageResponse.m",
280 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700281 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
282 "objc/AppRTCMobile/ARDSettingsModel.h",
283 "objc/AppRTCMobile/ARDSettingsModel.m",
284 "objc/AppRTCMobile/ARDSettingsStore.h",
285 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200286 "objc/AppRTCMobile/ARDSignalingChannel.h",
287 "objc/AppRTCMobile/ARDSignalingMessage.h",
288 "objc/AppRTCMobile/ARDSignalingMessage.m",
289 "objc/AppRTCMobile/ARDStatsBuilder.h",
290 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800291 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200292 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800293 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200294 "objc/AppRTCMobile/ARDWebSocketChannel.h",
295 "objc/AppRTCMobile/ARDWebSocketChannel.m",
296 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
297 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
298 "objc/AppRTCMobile/RTCIceServer+JSON.h",
299 "objc/AppRTCMobile/RTCIceServer+JSON.m",
300 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
301 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
302 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
303 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700304 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700305 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700306 deps = [
307 ":apprtc_common",
308 ":socketrocket",
309 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200310 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100311 # iOS must use WebRTC.framework which is dynamically linked.
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100312 deps += [
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200313 "../sdk:framework_objc+link",
314 "../sdk:ios_framework_bundle",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200315 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100316 } else {
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200317 deps += [ "../sdk:mac_framework_objc+link" ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200318 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000319 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700320 }
321
322 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800323 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100324 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800325 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700326 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100327 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200328 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100329 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
330 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200331 "objc/AppRTCMobile/ios/ARDMainView.h",
332 "objc/AppRTCMobile/ios/ARDMainView.m",
333 "objc/AppRTCMobile/ios/ARDMainViewController.h",
334 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700335 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
336 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200337 "objc/AppRTCMobile/ios/ARDStatsView.h",
338 "objc/AppRTCMobile/ios/ARDStatsView.m",
339 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
340 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
341 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
342 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200343 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
344 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200345 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
346 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800347 ]
denicija77bfd7c2016-11-15 00:41:26 -0800348
349 deps = [
350 ":apprtc_common",
351 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200352 "../sdk:framework_objc+link",
353 "../sdk:ios_framework_bundle",
denicija77bfd7c2016-11-15 00:41:26 -0800354 ]
355 }
356
357 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800358 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800359 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200360 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700361 ]
362
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200363 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700364
denicija77bfd7c2016-11-15 00:41:26 -0800365 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700366 public_configs = [ "..:common_inherited_config" ]
367
368 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200369 ":AppRTCMobile_ios_bundle_data",
denicija77bfd7c2016-11-15 00:41:26 -0800370 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100371 "../sdk:framework_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200372 "../sdk:ios_framework_bundle",
tkchin2ddfdba2016-08-07 21:37:45 -0700373 ]
374
Anders Carlsson358f2e02018-06-04 10:24:37 +0200375 if (rtc_apprtcmobile_broadcast_extension) {
376 deps += [
377 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
378 ":AppRTCMobileBroadcastUpload_extension_bundle",
379 ]
380 }
381
tkchin2ddfdba2016-08-07 21:37:45 -0700382 if (target_cpu == "x86") {
383 deps += [ "//testing/iossim:iossim" ]
384 }
385 }
386
Anders Carlsson358f2e02018-06-04 10:24:37 +0200387 if (rtc_apprtcmobile_broadcast_extension) {
388 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
389 testonly = true
390 public_deps = [
391 ":AppRTCMobileBroadcastUpload",
392 ]
393 sources = [
394 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
395 ]
396 outputs = [
397 "{{bundle_plugins_dir}}/{{source_file_part}}",
398 ]
399 }
400
401 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
402 testonly = true
403 public_deps = [
404 ":AppRTCMobileBroadcastSetupUI",
405 ]
406 sources = [
407 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
408 ]
409 outputs = [
410 "{{bundle_plugins_dir}}/{{source_file_part}}",
411 ]
412 }
413
414 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
Anders Carlsson358f2e02018-06-04 10:24:37 +0200415 testonly = true
416 sources = [
417 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
418 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
419 ]
420
421 deps = [
Anders Carlsson358f2e02018-06-04 10:24:37 +0200422 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200423 "../sdk:framework_objc+link",
424 "../sdk:ios_framework_bundle",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200425 ]
426
427 libs = [ "ReplayKit.framework" ]
428 }
429
430 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
431 testonly = true
432 configs += [ "..:common_config" ]
433 public_configs = [ "..:common_inherited_config" ]
434
435 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
436
437 deps = [
438 ":AppRTCMobileBroadcastUpload_lib",
439 "../sdk:framework_objc",
440 ]
441 }
442
443 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
444 sources = [
445 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
446 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
447 ]
448
449 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
450
451 libs = [ "ReplayKit.framework" ]
452
453 deps = [
454 ":AppRTCMobile_ios_bundle_data",
455 ]
456 }
457 }
458
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200459 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700460 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200461 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100462
463 # Sample video taken from https://media.xiph.org/video/derf/
464 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200465 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
466 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
467 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
468 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
469 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
470 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
471 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700472 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
473 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200474 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
475 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
476 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
477 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
478 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700479 "objc/Icon-120.png",
480 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700481 "objc/Icon.png",
482 ]
483 outputs = [
484 "{{bundle_resources_dir}}/{{source_file_part}}",
485 ]
486 }
Anders Carlsson73119182018-03-15 09:41:03 +0100487
488 rtc_static_library("ObjCNativeAPIDemo_lib") {
489 testonly = true
490 sources = [
491 "objcnativeapi/objc/NADAppDelegate.h",
492 "objcnativeapi/objc/NADAppDelegate.m",
493 "objcnativeapi/objc/NADViewController.h",
494 "objcnativeapi/objc/NADViewController.mm",
495 "objcnativeapi/objc/objccallclient.h",
496 "objcnativeapi/objc/objccallclient.mm",
497 ]
498
499 if (!build_with_chromium && is_clang) {
500 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
501 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
502 }
503
504 deps = [
505 "../api:libjingle_peerconnection_api",
506 "../api/audio_codecs:builtin_audio_decoder_factory",
507 "../api/audio_codecs:builtin_audio_encoder_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800508 "../api/video:builtin_video_bitrate_allocator_factory",
Anders Carlsson73119182018-03-15 09:41:03 +0100509 "../logging:rtc_event_log_impl_base",
510 "../media:rtc_audio_video",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000511 "../modules/audio_processing:api",
Anders Carlsson73119182018-03-15 09:41:03 +0100512 "../modules/audio_processing:audio_processing",
513 "../pc:libjingle_peerconnection",
514 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200515 "../sdk:base_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100516 "../sdk:default_codec_factory_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200517 "../sdk:helpers_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100518 "../sdk:native_api",
519 "../sdk:ui_objc",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200520 "../sdk:videocapture_objc",
Anders Carlsson73119182018-03-15 09:41:03 +0100521 "../sdk:videotoolbox_objc",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200522 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100523 ]
524
525 if (current_cpu == "arm64") {
526 deps += [ "../sdk:metal_objc" ]
527 }
528 }
529
530 ios_app_bundle("ObjCNativeAPIDemo") {
531 testonly = true
532 sources = [
533 "objcnativeapi/objc/main.m",
534 ]
535
536 info_plist = "objcnativeapi/Info.plist"
537
538 configs += [ "..:common_config" ]
539 public_configs = [ "..:common_inherited_config" ]
540
541 deps = [
542 ":ObjCNativeAPIDemo_lib",
543 ]
544
545 if (target_cpu == "x86") {
546 deps += [ "//testing/iossim:iossim" ]
547 }
548 }
tkchin2ddfdba2016-08-07 21:37:45 -0700549 }
550
551 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800552 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800553 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700554 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200555 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
556 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
557 "objc/AppRTCMobile/mac/APPRTCViewController.h",
558 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700559 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700560 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700561 deps = [
562 ":apprtc_common",
563 ":apprtc_signaling",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200564 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700565 ]
566 }
567
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200568 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800569 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200570 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700571
tkchin2ddfdba2016-08-07 21:37:45 -0700572 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200573 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700574 ]
575
576 public_configs = [ "..:common_inherited_config" ]
577
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200578 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700579
580 libs = [ "AppKit.framework" ]
581
582 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800583 ":AppRTCMobile_lib",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200584 "../sdk:mac_framework_bundle",
585 "../sdk:mac_framework_objc+link",
tkchin2ddfdba2016-08-07 21:37:45 -0700586 ]
587 }
588 }
589
590 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200591 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700592 }
593
594 config("socketrocket_warning_config") {
595 # GN orders flags on a target before flags from configs. The default config
596 # adds these flags so to cancel them out they need to come from a config and
597 # cannot be on the target directly.
598 cflags = [
599 "-Wno-deprecated-declarations",
600 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700601 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800602 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700603 ]
604
henrika27d8b612016-09-21 04:13:00 -0700605 cflags_objc = [
606 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
607 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700608 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700609 }
610
kjellanderb62dbbe2016-09-23 00:38:52 -0700611 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800612 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700613 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200614 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
615 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700616 ]
kthelgasonc0977102017-04-24 00:57:16 -0700617 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700618 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700619
620 libs = [
621 "CFNetwork.framework",
622 "icucore",
623 ]
624 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800625
626 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800627 # TODO(kthelgason): compile xctests on mac when chromium supports it.
628 if (is_ios) {
629 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100630 # iOS must use WebRTC.framework which is dynamically linked.
kjellander1993b1d2017-03-06 00:29:21 -0800631 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800632 include_dirs = [
633 "objc/AppRTCMobile",
634 "objc/AppRTCMobile/ios",
635 ]
kthelgason4065a572017-02-14 04:58:56 -0800636 sources = [
637 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100638 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800639 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
640 ]
kjellander1993b1d2017-03-06 00:29:21 -0800641 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800642 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100643 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100644 "../rtc_base:rtc_base",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200645 "../sdk:framework_objc+link",
646 "../sdk:ios_framework_bundle",
kthelgason4065a572017-02-14 04:58:56 -0800647 "//build/config/ios:xctest",
648 "//third_party/ocmock",
649 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800650 }
651
kthelgason4065a572017-02-14 04:58:56 -0800652 rtc_ios_xctest_test("apprtcmobile_tests") {
653 info_plist = "objc/AppRTCMobile/ios/Info.plist"
654 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100655 "objc/AppRTCMobile/tests/main.mm",
kthelgason4065a572017-02-14 04:58:56 -0800656 ]
657 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100658 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800659 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100660 "../sdk:framework_objc",
Artem Titarenko34fc3462018-11-06 12:29:29 +0100661 "//test:test_support",
kthelgason4065a572017-02-14 04:58:56 -0800662 ]
663 ldflags = [ "-all_load" ]
664 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800665 }
666 }
tkchin2ddfdba2016-08-07 21:37:45 -0700667}
kthelgason0727f152016-08-08 09:03:23 -0700668
669if (is_linux || is_win) {
ehmaldonado38a21322016-09-02 04:10:34 -0700670 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800671 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700672 sources = [
673 "peerconnection/client/conductor.cc",
674 "peerconnection/client/conductor.h",
675 "peerconnection/client/defaults.cc",
676 "peerconnection/client/defaults.h",
677 "peerconnection/client/peer_connection_client.cc",
678 "peerconnection/client/peer_connection_client.h",
679 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700680
kjellandere40a7ee2016-10-16 23:56:12 -0700681 if (!build_with_chromium && is_clang) {
682 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700683 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700684 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100685 deps = [
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100686 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100687 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200688 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100689 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100690 "../rtc_base:stringutils",
Artem Titove41c4332018-07-25 15:04:28 +0200691 "../rtc_base/third_party/sigslot",
Bjorn Terelius3e676762018-10-29 15:26:27 +0100692 "../system_wrappers:field_trial",
693 "../test:field_trial",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100694 ]
kthelgason0727f152016-08-08 09:03:23 -0700695 if (is_win) {
696 sources += [
697 "peerconnection/client/flagdefs.h",
698 "peerconnection/client/main.cc",
699 "peerconnection/client/main_wnd.cc",
700 "peerconnection/client/main_wnd.h",
701 ]
kthelgason0727f152016-08-08 09:03:23 -0700702 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700703 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700704 }
705 if (is_linux) {
706 sources += [
707 "peerconnection/client/linux/main.cc",
708 "peerconnection/client/linux/main_wnd.cc",
709 "peerconnection/client/linux/main_wnd.h",
710 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200711 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700712 libs = [
713 "X11",
714 "Xcomposite",
715 "Xext",
716 "Xrender",
717 ]
thomasandersonef16e992016-12-13 02:57:43 -0800718 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700719 }
kjellander1993b1d2017-03-06 00:29:21 -0800720
721 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100722 "../api:libjingle_peerconnection_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200723 "../api/audio_codecs:builtin_audio_decoder_factory",
724 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200725 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200726 "../api/video_codecs:builtin_video_decoder_factory",
727 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100728 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200729 "../modules/audio_device:audio_device",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000730 "../modules/audio_processing:api",
Anders Carlsson67537952018-05-03 11:28:29 +0200731 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700732 "../modules/video_capture:video_capture_module",
733 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700734 "../rtc_base:rtc_base",
735 "../rtc_base:rtc_base_approved",
736 "../rtc_base:rtc_json",
kjellander1993b1d2017-03-06 00:29:21 -0800737 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800738 ]
kthelgason0727f152016-08-08 09:03:23 -0700739 }
kjellanderd4626e52016-09-07 02:33:01 -0700740
ehmaldonado38a21322016-09-02 04:10:34 -0700741 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800742 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700743 sources = [
744 "peerconnection/server/data_socket.cc",
745 "peerconnection/server/data_socket.h",
746 "peerconnection/server/main.cc",
747 "peerconnection/server/peer_channel.cc",
748 "peerconnection/server/peer_channel.h",
749 "peerconnection/server/utils.cc",
750 "peerconnection/server/utils.h",
751 ]
752 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700753 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100754 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700755 "../rtc_tools:command_line_parser",
Bjorn Terelius3e676762018-10-29 15:26:27 +0100756 "../system_wrappers:field_trial",
757 "../test:field_trial",
kthelgason0727f152016-08-08 09:03:23 -0700758 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700759 if (!build_with_chromium && is_clang) {
760 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700761 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700762 }
763 }
ehmaldonado38a21322016-09-02 04:10:34 -0700764 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800765 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700766 sources = [
767 "relayserver/relayserver_main.cc",
768 ]
769 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700770 "../p2p:rtc_p2p",
771 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700772 "../rtc_base:rtc_base",
773 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700774 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700775 if (!build_with_chromium && is_clang) {
776 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700777 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700778 }
779 }
ehmaldonado38a21322016-09-02 04:10:34 -0700780 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800781 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700782 sources = [
783 "turnserver/turnserver_main.cc",
784 ]
785 deps = [
Niels Möller9862c2e2018-10-30 12:20:03 +0100786 ":read_auth_file",
jianjun.zhuc0247402017-07-11 06:20:45 -0700787 "../p2p:rtc_p2p",
788 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700789 "../rtc_base:rtc_base",
790 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700791 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700792 if (!build_with_chromium && is_clang) {
793 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700794 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700795 }
796 }
ehmaldonado38a21322016-09-02 04:10:34 -0700797 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800798 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700799 sources = [
800 "stunserver/stunserver_main.cc",
801 ]
802 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700803 "../p2p:rtc_p2p",
804 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700805 "../rtc_base:rtc_base",
806 "../rtc_base:rtc_base_approved",
kthelgason0727f152016-08-08 09:03:23 -0700807 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700808 if (!build_with_chromium && is_clang) {
809 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700810 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700811 }
812 }
813}
charujainaca3a242016-11-01 03:09:15 -0700814
qiangchen42f96d52017-08-08 17:08:03 -0700815if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700816 rtc_shared_library("webrtc_unity_plugin") {
817 testonly = true
818 sources = [
819 "unityplugin/simple_peer_connection.cc",
820 "unityplugin/simple_peer_connection.h",
821 "unityplugin/unity_plugin_apis.cc",
822 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700823 "unityplugin/video_observer.cc",
824 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700825 ]
qiangchen42f96d52017-08-08 17:08:03 -0700826
827 if (is_android) {
828 sources += [
829 "unityplugin/classreferenceholder.cc",
830 "unityplugin/classreferenceholder.h",
831 "unityplugin/jni_onload.cc",
832 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800833 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700834 }
835
gyzhouad7cad82017-05-11 16:10:03 -0700836 if (!build_with_chromium && is_clang) {
837 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
838 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
839 }
qiangchen42f96d52017-08-08 17:08:03 -0700840 if (is_win) {
Mirko Bonadeif957dd92018-07-11 10:47:42 +0200841 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-08 17:08:03 -0700842 }
gyzhouad7cad82017-05-11 16:10:03 -0700843 deps = [
Mirko Bonadei2ff3f492018-11-22 09:00:13 +0100844 "../api:create_peerconnection_factory",
Mirko Bonadei34814c72018-01-11 10:13:56 +0100845 "../api:libjingle_peerconnection_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800846 "../api/audio_codecs:builtin_audio_decoder_factory",
847 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200848 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100849 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100850 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700851 "../media:rtc_media",
852 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800853 "../modules/audio_device:audio_device",
Alessio Bazzicab768e882018-11-07 14:29:54 +0000854 "../modules/audio_processing:api",
Qiang Chen43fb9122017-12-20 10:47:36 -0800855 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700856 "../modules/video_capture:video_capture_module",
857 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700858 "../rtc_base:rtc_base",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200859 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700860 ]
qiangchen42f96d52017-08-08 17:08:03 -0700861 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800862 deps += [
863 "../modules/utility:utility",
864 "../sdk/android:libjingle_peerconnection_jni",
865 ]
qiangchen42f96d52017-08-08 17:08:03 -0700866 }
867 }
868}
869
870if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000871 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700872 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
873 deps = [
874 "../rtc_base:base_java",
875 "../sdk/android:libjingle_peerconnection_java",
876 ]
877 }
878
879 dist_jar("libwebrtc_unity") {
880 _target_dir_name = get_label_info(":$target_name", "dir")
881 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800882 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700883 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800884 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200885 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700886 deps = [
887 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200888 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700889 "../rtc_base:base_java",
890 "../sdk/android:libjingle_peerconnection_java",
891 "../sdk/android:libjingle_peerconnection_metrics_default_java",
892 ]
gyzhouad7cad82017-05-11 16:10:03 -0700893 }
894}
895
charujainaca3a242016-11-01 03:09:15 -0700896if (!build_with_chromium) {
897 # Doesn't build within Chrome on Win.
898 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800899 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700900 sources = [
901 "stunprober/main.cc",
902 ]
903
904 if (!build_with_chromium && is_clang) {
905 # Suppress warnings from Chrome's Clang plugins.
906 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
907 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
908 }
909
910 deps = [
911 "../p2p:libstunprober",
912 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100913 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700914 "../rtc_base:rtc_base",
915 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100916 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700917 ]
918 }
919}