blob: eee96839c6e8137b95b6bcbcfb806e9039c99f33 [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",
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 "//base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020074 ]
75
jianjun.zhuc0247402017-07-11 06:20:45 -070076 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020077 }
78
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000079 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -080080 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +010081 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -080082
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020083 java_files = [
84 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -080085 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020086 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
87 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
88 "androidapp/src/org/appspot/apprtc/CallActivity.java",
89 "androidapp/src/org/appspot/apprtc/CallFragment.java",
90 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
91 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
92 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
93 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
94 "androidapp/src/org/appspot/apprtc/HudFragment.java",
95 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020096 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -080097 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
henrika5641fbb2018-02-21 14:12:53 +010098 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020099 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
100 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
101 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
102 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
103 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
104 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
105 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
106 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200107 ]
108
109 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200110 ":AppRTCMobile_resources",
Paulina Hensman17071682018-03-26 16:10:29 +0200111 "../modules/audio_device:audio_device_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700112 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200113 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200114 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200115 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 09:33:30 +0200116 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200117 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200118 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200119 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700120 "../sdk/android:libjingle_peerconnection_java",
121 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200122 "../sdk/android:peerconnection_java",
123 "../sdk/android:screencapturer_java",
124 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200125 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200126 "../sdk/android:video_api_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
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000138 rtc_instrumentation_test_apk("AppRTCMobileTest") {
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",
sakalcb79d512017-01-11 06:21:26 -0800151 "//third_party/android_support_test_runner:runner_java",
152 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200153 ]
154 }
mandermoa6069e82017-01-16 02:23:09 -0800155
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000156 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800157 apk_name = "AppRTCMobileTestStubbedVideoIO"
158 android_manifest = "androidtests/AndroidManifest.xml"
159
oprypin30cda5e2017-04-24 04:15:13 -0700160 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800161
162 apk_under_test = ":AppRTCMobile"
163
164 deps = [
165 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700166 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800167 "//third_party/android_support_test_runner:rules_java",
168 "//third_party/android_support_test_runner:runner_java",
169 "//third_party/espresso:espresso_all_java",
170 "//third_party/hamcrest:hamcrest_java",
171 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800172 ]
173
174 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100175 "../build/android/adb_reverse_forwarder.py",
176 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200177 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100178 "../rtc_tools/barcode_tools/barcode_decoder.py",
179 "../rtc_tools/barcode_tools/helper_functions.py",
180 "../rtc_tools/compare_videos.py",
181 "../rtc_tools/testing/prebuilt_apprtc.zip",
182 "../rtc_tools/testing/golang/linux/go.tar.gz",
183 "../rtc_tools/testing/build_apprtc.py",
184 "../rtc_tools/testing/utils.py",
185 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
186 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
187 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800188 ]
189 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200190}
tkchin2ddfdba2016-08-07 21:37:45 -0700191
192if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700193 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200194 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700195 }
196
kjellanderb62dbbe2016-09-23 00:38:52 -0700197 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800198 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700199 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200200 "objc/AppRTCMobile/common/ARDUtilities.h",
201 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700202 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700203 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700204
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200205 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100206 # iOS must use WebRTC.framework which is dynamically linked.
207 # 'gn check' is disabled in order to avoid confusion and
208 # errors caused by multiple implementations.
209 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700210 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100211 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100212 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000213 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700214 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200215 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700216 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700217 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700218 "../system_wrappers:field_trial_default",
219 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000220 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700221 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200222 }
tkchin2ddfdba2016-08-07 21:37:45 -0700223 }
224
225 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200226 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700227 }
228
kjellanderb62dbbe2016-09-23 00:38:52 -0700229 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800230 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700231 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200232 "objc/AppRTCMobile/ARDAppClient+Internal.h",
233 "objc/AppRTCMobile/ARDAppClient.h",
234 "objc/AppRTCMobile/ARDAppClient.m",
235 "objc/AppRTCMobile/ARDAppEngineClient.h",
236 "objc/AppRTCMobile/ARDAppEngineClient.m",
237 "objc/AppRTCMobile/ARDBitrateTracker.h",
238 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700239 "objc/AppRTCMobile/ARDCaptureController.h",
240 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200241 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
242 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200243 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
244 "objc/AppRTCMobile/ARDJoinResponse.h",
245 "objc/AppRTCMobile/ARDJoinResponse.m",
246 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
247 "objc/AppRTCMobile/ARDMessageResponse.h",
248 "objc/AppRTCMobile/ARDMessageResponse.m",
249 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700250 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
251 "objc/AppRTCMobile/ARDSettingsModel.h",
252 "objc/AppRTCMobile/ARDSettingsModel.m",
253 "objc/AppRTCMobile/ARDSettingsStore.h",
254 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200255 "objc/AppRTCMobile/ARDSignalingChannel.h",
256 "objc/AppRTCMobile/ARDSignalingMessage.h",
257 "objc/AppRTCMobile/ARDSignalingMessage.m",
258 "objc/AppRTCMobile/ARDStatsBuilder.h",
259 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800260 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200261 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800262 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200263 "objc/AppRTCMobile/ARDWebSocketChannel.h",
264 "objc/AppRTCMobile/ARDWebSocketChannel.m",
265 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
266 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
267 "objc/AppRTCMobile/RTCIceServer+JSON.h",
268 "objc/AppRTCMobile/RTCIceServer+JSON.m",
269 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
270 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
271 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
272 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700273 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700274 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700275 deps = [
276 ":apprtc_common",
277 ":socketrocket",
278 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200279 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100280 # iOS must use WebRTC.framework which is dynamically linked.
281 # 'gn check' is disabled in order to avoid confusion and
282 # errors caused by multiple implementations.
283 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100284 deps += [
285 ":AppRTCMobile_ios_frameworks",
286 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200287 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100288 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100289 deps += [
290 "../sdk:common_objc",
291 "../sdk:mediaconstraints_objc",
292 "../sdk:peerconnectionfactory_base_objc",
293 "../sdk:videocapture_objc",
294 "../sdk:videocodec_objc",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200295 "../sdk:videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100296 "../sdk:videosource_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100297 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200298 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000299 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700300 }
301
302 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800303 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100304 # iOS must use WebRTC.framework which is dynamically linked.
305 # 'gn check' is disabled in order to avoid confusion and
306 # errors caused by multiple implementations.
307 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800308 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700309 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100310 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200311 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100312 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
313 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200314 "objc/AppRTCMobile/ios/ARDMainView.h",
315 "objc/AppRTCMobile/ios/ARDMainView.m",
316 "objc/AppRTCMobile/ios/ARDMainViewController.h",
317 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700318 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
319 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200320 "objc/AppRTCMobile/ios/ARDStatsView.h",
321 "objc/AppRTCMobile/ios/ARDStatsView.m",
322 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
323 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
324 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
325 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200326 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
327 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200328 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
329 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800330 ]
denicija77bfd7c2016-11-15 00:41:26 -0800331
332 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200333 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800334 ":apprtc_common",
335 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100336 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800337 ]
338 }
339
340 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800341 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800342 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200343 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700344 ]
345
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200346 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700347
denicija77bfd7c2016-11-15 00:41:26 -0800348 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700349 public_configs = [ "..:common_inherited_config" ]
350
351 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200352 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800353 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800354 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100355 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700356 ]
357
Anders Carlsson358f2e02018-06-04 10:24:37 +0200358 if (rtc_apprtcmobile_broadcast_extension) {
359 deps += [
360 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
361 ":AppRTCMobileBroadcastUpload_extension_bundle",
362 ]
363 }
364
tkchin2ddfdba2016-08-07 21:37:45 -0700365 if (target_cpu == "x86") {
366 deps += [ "//testing/iossim:iossim" ]
367 }
368 }
369
Anders Carlsson358f2e02018-06-04 10:24:37 +0200370 if (rtc_apprtcmobile_broadcast_extension) {
371 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
372 testonly = true
373 public_deps = [
374 ":AppRTCMobileBroadcastUpload",
375 ]
376 sources = [
377 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
378 ]
379 outputs = [
380 "{{bundle_plugins_dir}}/{{source_file_part}}",
381 ]
382 }
383
384 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
385 testonly = true
386 public_deps = [
387 ":AppRTCMobileBroadcastSetupUI",
388 ]
389 sources = [
390 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
391 ]
392 outputs = [
393 "{{bundle_plugins_dir}}/{{source_file_part}}",
394 ]
395 }
396
397 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
398 check_includes = false
399 testonly = true
400 sources = [
401 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
402 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
403 ]
404
405 deps = [
406 ":AppRTCMobile_ios_frameworks",
407 ":apprtc_signaling",
408 "../sdk:framework_objc",
409 ]
410
411 libs = [ "ReplayKit.framework" ]
412 }
413
414 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
415 testonly = true
416 configs += [ "..:common_config" ]
417 public_configs = [ "..:common_inherited_config" ]
418
419 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
420
421 deps = [
422 ":AppRTCMobileBroadcastUpload_lib",
423 "../sdk:framework_objc",
424 ]
425 }
426
427 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
428 sources = [
429 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
430 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
431 ]
432
433 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
434
435 libs = [ "ReplayKit.framework" ]
436
437 deps = [
438 ":AppRTCMobile_ios_bundle_data",
439 ]
440 }
441 }
442
kthelgasond3adbfb2017-01-26 01:14:04 -0800443 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100444 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700445 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800446 ]
447 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400448 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800449 ]
450 outputs = [
451 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
452 ]
453 }
454
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200455 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700456 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200457 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100458
459 # Sample video taken from https://media.xiph.org/video/derf/
460 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200461 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
462 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
463 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
464 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
465 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
466 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
467 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700468 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
469 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200470 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
471 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
472 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
473 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
474 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700475 "objc/Icon-120.png",
476 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700477 "objc/Icon.png",
478 ]
479 outputs = [
480 "{{bundle_resources_dir}}/{{source_file_part}}",
481 ]
482 }
Anders Carlsson73119182018-03-15 09:41:03 +0100483
484 rtc_static_library("ObjCNativeAPIDemo_lib") {
485 testonly = true
486 sources = [
487 "objcnativeapi/objc/NADAppDelegate.h",
488 "objcnativeapi/objc/NADAppDelegate.m",
489 "objcnativeapi/objc/NADViewController.h",
490 "objcnativeapi/objc/NADViewController.mm",
491 "objcnativeapi/objc/objccallclient.h",
492 "objcnativeapi/objc/objccallclient.mm",
493 ]
494
495 if (!build_with_chromium && is_clang) {
496 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
497 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
498 }
499
500 deps = [
501 "../api:libjingle_peerconnection_api",
502 "../api/audio_codecs:builtin_audio_decoder_factory",
503 "../api/audio_codecs:builtin_audio_encoder_factory",
504 "../logging:rtc_event_log_impl_base",
505 "../media:rtc_audio_video",
506 "../modules/audio_processing:audio_processing",
507 "../pc:libjingle_peerconnection",
508 "../rtc_base:rtc_base",
509 "../sdk:default_codec_factory_objc",
510 "../sdk:framework_objc",
511 "../sdk:native_api",
512 "../sdk:ui_objc",
513 "../sdk:videotoolbox_objc",
514 "../system_wrappers:field_trial_default",
515 "../system_wrappers:metrics_default",
516 "../system_wrappers:runtime_enabled_features_default",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200517 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100518 ]
519
520 if (current_cpu == "arm64") {
521 deps += [ "../sdk:metal_objc" ]
522 }
523 }
524
525 ios_app_bundle("ObjCNativeAPIDemo") {
526 testonly = true
527 sources = [
528 "objcnativeapi/objc/main.m",
529 ]
530
531 info_plist = "objcnativeapi/Info.plist"
532
533 configs += [ "..:common_config" ]
534 public_configs = [ "..:common_inherited_config" ]
535
536 deps = [
537 ":ObjCNativeAPIDemo_lib",
538 ]
539
540 if (target_cpu == "x86") {
541 deps += [ "//testing/iossim:iossim" ]
542 }
543 }
tkchin2ddfdba2016-08-07 21:37:45 -0700544 }
545
546 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800547 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800548 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700549 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200550 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
551 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
552 "objc/AppRTCMobile/mac/APPRTCViewController.h",
553 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700554 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700555 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700556 deps = [
557 ":apprtc_common",
558 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100559 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100560 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100561 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700562 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100563 "../sdk:videocapture_objc",
564 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100565 "../sdk:videocodec_objc",
566 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700567 ]
568 }
569
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200570 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800571 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200572 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700573
tkchin2ddfdba2016-08-07 21:37:45 -0700574 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200575 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700576 ]
577
578 public_configs = [ "..:common_inherited_config" ]
579
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200580 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700581
582 libs = [ "AppKit.framework" ]
583
584 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800585 ":AppRTCMobile_lib",
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.
631 # 'gn check' is disabled in order to avoid confusion and
632 # errors caused by multiple implementations.
633 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800634 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800635 include_dirs = [
636 "objc/AppRTCMobile",
637 "objc/AppRTCMobile/ios",
638 ]
639 testonly = true
640 sources = [
641 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100642 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800643 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
644 ]
kjellander1993b1d2017-03-06 00:29:21 -0800645 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800646 ":AppRTCMobile_ios_frameworks",
647 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100648 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100649 "../rtc_base:rtc_base",
650 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800651 "//build/config/ios:xctest",
652 "//third_party/ocmock",
653 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800654 }
655
kthelgason4065a572017-02-14 04:58:56 -0800656 rtc_ios_xctest_test("apprtcmobile_tests") {
657 info_plist = "objc/AppRTCMobile/ios/Info.plist"
658 sources = [
659 "objc/AppRTCMobile/ios/main.m",
660 ]
661 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100662 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800663 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100664 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800665 ]
666 ldflags = [ "-all_load" ]
667 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800668 }
669 }
tkchin2ddfdba2016-08-07 21:37:45 -0700670}
kthelgason0727f152016-08-08 09:03:23 -0700671
672if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700673 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700674 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700675 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700676 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700677 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
678 # for -Wno-reorder and -Wno-sign-compare
679 "-Wno-reorder",
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700680 ]
681 }
682 }
683
ehmaldonado38a21322016-09-02 04:10:34 -0700684 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800685 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700686 sources = [
687 "peerconnection/client/conductor.cc",
688 "peerconnection/client/conductor.h",
689 "peerconnection/client/defaults.cc",
690 "peerconnection/client/defaults.h",
691 "peerconnection/client/peer_connection_client.cc",
692 "peerconnection/client/peer_connection_client.h",
693 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700694
kjellandere40a7ee2016-10-16 23:56:12 -0700695 if (!build_with_chromium && is_clang) {
696 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700697 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700698 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100699 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100700 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200701 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100702 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100703 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100704 ]
kthelgason0727f152016-08-08 09:03:23 -0700705 if (is_win) {
706 sources += [
707 "peerconnection/client/flagdefs.h",
708 "peerconnection/client/main.cc",
709 "peerconnection/client/main_wnd.cc",
710 "peerconnection/client/main_wnd.h",
711 ]
kthelgason0727f152016-08-08 09:03:23 -0700712 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700713 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700714 }
715 if (is_linux) {
716 sources += [
717 "peerconnection/client/linux/main.cc",
718 "peerconnection/client/linux/main_wnd.cc",
719 "peerconnection/client/linux/main_wnd.h",
720 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200721 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700722 libs = [
723 "X11",
724 "Xcomposite",
725 "Xext",
726 "Xrender",
727 ]
thomasandersonef16e992016-12-13 02:57:43 -0800728 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700729 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700730 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800731
732 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100733 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700734 "../api:libjingle_peerconnection_test_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200735 "../api/audio_codecs:builtin_audio_decoder_factory",
736 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200737 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200738 "../api/video_codecs:builtin_video_decoder_factory",
739 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100740 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200741 "../modules/audio_device:audio_device",
742 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700743 "../modules/video_capture:video_capture_module",
744 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700745 "../rtc_base:rtc_base",
746 "../rtc_base:rtc_base_approved",
747 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700748 "../system_wrappers:field_trial_default",
749 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000750 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800751 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800752 ]
kthelgason0727f152016-08-08 09:03:23 -0700753 }
kjellanderd4626e52016-09-07 02:33:01 -0700754
ehmaldonado38a21322016-09-02 04:10:34 -0700755 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800756 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700757 sources = [
758 "peerconnection/server/data_socket.cc",
759 "peerconnection/server/data_socket.h",
760 "peerconnection/server/main.cc",
761 "peerconnection/server/peer_channel.cc",
762 "peerconnection/server/peer_channel.h",
763 "peerconnection/server/utils.cc",
764 "peerconnection/server/utils.h",
765 ]
766 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700767 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700768 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100769 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700770 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700771 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700772 if (!build_with_chromium && is_clang) {
773 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700774 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700775 }
776 }
ehmaldonado38a21322016-09-02 04:10:34 -0700777 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800778 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700779 sources = [
780 "relayserver/relayserver_main.cc",
781 ]
782 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700783 "../p2p:rtc_p2p",
784 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700785 "../rtc_base:rtc_base",
786 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700787 "../system_wrappers:field_trial_default",
788 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000789 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700790 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700791 if (!build_with_chromium && is_clang) {
792 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700793 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700794 }
795 }
ehmaldonado38a21322016-09-02 04:10:34 -0700796 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800797 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700798 sources = [
799 "turnserver/turnserver_main.cc",
800 ]
801 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700802 "../p2p:rtc_p2p",
803 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700804 "../rtc_base:rtc_base",
805 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700806 "../system_wrappers:field_trial_default",
807 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000808 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700809 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700810 if (!build_with_chromium && is_clang) {
811 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700812 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700813 }
814 }
ehmaldonado38a21322016-09-02 04:10:34 -0700815 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800816 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700817 sources = [
818 "stunserver/stunserver_main.cc",
819 ]
820 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700821 "../p2p:rtc_p2p",
822 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700823 "../rtc_base:rtc_base",
824 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700825 "../system_wrappers:field_trial_default",
826 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000827 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700828 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700829 if (!build_with_chromium && is_clang) {
830 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700831 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700832 }
833 }
834}
charujainaca3a242016-11-01 03:09:15 -0700835
qiangchen42f96d52017-08-08 17:08:03 -0700836if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700837 rtc_shared_library("webrtc_unity_plugin") {
838 testonly = true
839 sources = [
840 "unityplugin/simple_peer_connection.cc",
841 "unityplugin/simple_peer_connection.h",
842 "unityplugin/unity_plugin_apis.cc",
843 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700844 "unityplugin/video_observer.cc",
845 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700846 ]
qiangchen42f96d52017-08-08 17:08:03 -0700847
848 if (is_android) {
849 sources += [
850 "unityplugin/classreferenceholder.cc",
851 "unityplugin/classreferenceholder.h",
852 "unityplugin/jni_onload.cc",
853 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800854 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700855 }
856
gyzhouad7cad82017-05-11 16:10:03 -0700857 if (!build_with_chromium && is_clang) {
858 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
859 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
860 }
qiangchen42f96d52017-08-08 17:08:03 -0700861 if (is_win) {
qiangchen42f96d52017-08-08 17:08:03 -0700862 configs += [
863 "//build/config/win:windowed",
864 ":peerconnection_client_warnings_config",
865 ]
866 }
gyzhouad7cad82017-05-11 16:10:03 -0700867 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100868 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700869 "../api:libjingle_peerconnection_test_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800870 "../api/audio_codecs:builtin_audio_decoder_factory",
871 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200872 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100873 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100874 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700875 "../media:rtc_media",
876 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800877 "../modules/audio_device:audio_device",
878 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700879 "../modules/video_capture:video_capture_module",
880 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700881 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700882 "../system_wrappers:field_trial_default",
883 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000884 "../system_wrappers:runtime_enabled_features_default",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200885 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700886 ]
qiangchen42f96d52017-08-08 17:08:03 -0700887 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800888 deps += [
889 "../modules/utility:utility",
890 "../sdk/android:libjingle_peerconnection_jni",
891 ]
qiangchen42f96d52017-08-08 17:08:03 -0700892 }
893 }
894}
895
896if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000897 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700898 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
899 deps = [
900 "../rtc_base:base_java",
901 "../sdk/android:libjingle_peerconnection_java",
902 ]
903 }
904
905 dist_jar("libwebrtc_unity") {
906 _target_dir_name = get_label_info(":$target_name", "dir")
907 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800908 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700909 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800910 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200911 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700912 deps = [
913 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200914 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700915 "../rtc_base:base_java",
916 "../sdk/android:libjingle_peerconnection_java",
917 "../sdk/android:libjingle_peerconnection_metrics_default_java",
918 ]
gyzhouad7cad82017-05-11 16:10:03 -0700919 }
920}
921
charujainaca3a242016-11-01 03:09:15 -0700922if (!build_with_chromium) {
923 # Doesn't build within Chrome on Win.
924 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800925 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700926 sources = [
927 "stunprober/main.cc",
928 ]
929
930 if (!build_with_chromium && is_clang) {
931 # Suppress warnings from Chrome's Clang plugins.
932 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
933 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
934 }
935
936 deps = [
937 "../p2p:libstunprober",
938 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100939 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700940 "../rtc_base:rtc_base",
941 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100942 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700943 "../system_wrappers:field_trial_default",
944 ]
945 }
946}