blob: 76526eb3bef3cbf1cc89db78c685b9fac53a1a55 [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
Sami Kalliomäkid54f5f52018-08-03 13:23:05 +0200157 rtc_instrumentation_test_apk("AppRTCMobile_stubbed_video_io_test_apk") {
mandermoa6069e82017-01-16 02:23:09 -0800158 apk_name = "AppRTCMobileTestStubbedVideoIO"
159 android_manifest = "androidtests/AndroidManifest.xml"
160
oprypin30cda5e2017-04-24 04:15:13 -0700161 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800162
163 apk_under_test = ":AppRTCMobile"
164
165 deps = [
166 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700167 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800168 "//third_party/android_support_test_runner:rules_java",
169 "//third_party/android_support_test_runner:runner_java",
170 "//third_party/espresso:espresso_all_java",
171 "//third_party/hamcrest:hamcrest_java",
172 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800173 ]
174
175 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100176 "../build/android/adb_reverse_forwarder.py",
177 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200178 "../resources/reference_video_640x360_30fps.y4m",
Magnus Jedvert3e169ac2018-08-24 12:44:59 +0000179 "../rtc_tools/barcode_tools/barcode_decoder.py",
180 "../rtc_tools/barcode_tools/helper_functions.py",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100181 "../rtc_tools/compare_videos.py",
182 "../rtc_tools/testing/prebuilt_apprtc.zip",
183 "../rtc_tools/testing/golang/linux/go.tar.gz",
184 "../rtc_tools/testing/build_apprtc.py",
185 "../rtc_tools/testing/utils.py",
186 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
187 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
188 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800189 ]
190 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200191}
tkchin2ddfdba2016-08-07 21:37:45 -0700192
193if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700194 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200195 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700196 }
197
kjellanderb62dbbe2016-09-23 00:38:52 -0700198 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800199 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700200 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200201 "objc/AppRTCMobile/common/ARDUtilities.h",
202 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700203 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700204 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700205
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200206 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100207 # iOS must use WebRTC.framework which is dynamically linked.
208 # 'gn check' is disabled in order to avoid confusion and
209 # errors caused by multiple implementations.
210 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700211 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100212 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100213 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000214 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700215 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200216 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700217 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700218 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700219 "../system_wrappers:field_trial_default",
220 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000221 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700222 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200223 }
tkchin2ddfdba2016-08-07 21:37:45 -0700224 }
225
226 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200227 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700228 }
229
kjellanderb62dbbe2016-09-23 00:38:52 -0700230 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800231 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700232 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200233 "objc/AppRTCMobile/ARDAppClient+Internal.h",
234 "objc/AppRTCMobile/ARDAppClient.h",
235 "objc/AppRTCMobile/ARDAppClient.m",
236 "objc/AppRTCMobile/ARDAppEngineClient.h",
237 "objc/AppRTCMobile/ARDAppEngineClient.m",
238 "objc/AppRTCMobile/ARDBitrateTracker.h",
239 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700240 "objc/AppRTCMobile/ARDCaptureController.h",
241 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200242 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
243 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200244 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
245 "objc/AppRTCMobile/ARDJoinResponse.h",
246 "objc/AppRTCMobile/ARDJoinResponse.m",
247 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
248 "objc/AppRTCMobile/ARDMessageResponse.h",
249 "objc/AppRTCMobile/ARDMessageResponse.m",
250 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700251 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
252 "objc/AppRTCMobile/ARDSettingsModel.h",
253 "objc/AppRTCMobile/ARDSettingsModel.m",
254 "objc/AppRTCMobile/ARDSettingsStore.h",
255 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200256 "objc/AppRTCMobile/ARDSignalingChannel.h",
257 "objc/AppRTCMobile/ARDSignalingMessage.h",
258 "objc/AppRTCMobile/ARDSignalingMessage.m",
259 "objc/AppRTCMobile/ARDStatsBuilder.h",
260 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800261 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200262 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800263 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200264 "objc/AppRTCMobile/ARDWebSocketChannel.h",
265 "objc/AppRTCMobile/ARDWebSocketChannel.m",
266 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
267 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
268 "objc/AppRTCMobile/RTCIceServer+JSON.h",
269 "objc/AppRTCMobile/RTCIceServer+JSON.m",
270 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
271 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
272 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
273 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700274 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700275 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700276 deps = [
277 ":apprtc_common",
278 ":socketrocket",
279 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200280 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100281 # iOS must use WebRTC.framework which is dynamically linked.
282 # 'gn check' is disabled in order to avoid confusion and
283 # errors caused by multiple implementations.
284 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100285 deps += [
286 ":AppRTCMobile_ios_frameworks",
287 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200288 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100289 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100290 deps += [
291 "../sdk:common_objc",
292 "../sdk:mediaconstraints_objc",
293 "../sdk:peerconnectionfactory_base_objc",
294 "../sdk:videocapture_objc",
295 "../sdk:videocodec_objc",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200296 "../sdk:videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100297 "../sdk:videosource_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100298 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200299 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000300 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700301 }
302
303 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800304 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100305 # iOS must use WebRTC.framework which is dynamically linked.
306 # 'gn check' is disabled in order to avoid confusion and
307 # errors caused by multiple implementations.
308 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800309 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700310 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100311 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200312 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100313 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
314 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200315 "objc/AppRTCMobile/ios/ARDMainView.h",
316 "objc/AppRTCMobile/ios/ARDMainView.m",
317 "objc/AppRTCMobile/ios/ARDMainViewController.h",
318 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700319 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
320 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200321 "objc/AppRTCMobile/ios/ARDStatsView.h",
322 "objc/AppRTCMobile/ios/ARDStatsView.m",
323 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
324 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
325 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
326 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200327 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
328 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200329 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
330 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800331 ]
denicija77bfd7c2016-11-15 00:41:26 -0800332
333 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200334 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800335 ":apprtc_common",
336 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100337 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800338 ]
339 }
340
341 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800342 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800343 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200344 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700345 ]
346
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200347 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700348
denicija77bfd7c2016-11-15 00:41:26 -0800349 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700350 public_configs = [ "..:common_inherited_config" ]
351
352 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200353 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800354 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800355 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100356 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700357 ]
358
Anders Carlsson358f2e02018-06-04 10:24:37 +0200359 if (rtc_apprtcmobile_broadcast_extension) {
360 deps += [
361 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
362 ":AppRTCMobileBroadcastUpload_extension_bundle",
363 ]
364 }
365
tkchin2ddfdba2016-08-07 21:37:45 -0700366 if (target_cpu == "x86") {
367 deps += [ "//testing/iossim:iossim" ]
368 }
369 }
370
Anders Carlsson358f2e02018-06-04 10:24:37 +0200371 if (rtc_apprtcmobile_broadcast_extension) {
372 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
373 testonly = true
374 public_deps = [
375 ":AppRTCMobileBroadcastUpload",
376 ]
377 sources = [
378 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
379 ]
380 outputs = [
381 "{{bundle_plugins_dir}}/{{source_file_part}}",
382 ]
383 }
384
385 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
386 testonly = true
387 public_deps = [
388 ":AppRTCMobileBroadcastSetupUI",
389 ]
390 sources = [
391 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
392 ]
393 outputs = [
394 "{{bundle_plugins_dir}}/{{source_file_part}}",
395 ]
396 }
397
398 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
399 check_includes = false
400 testonly = true
401 sources = [
402 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
403 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
404 ]
405
406 deps = [
407 ":AppRTCMobile_ios_frameworks",
408 ":apprtc_signaling",
409 "../sdk:framework_objc",
410 ]
411
412 libs = [ "ReplayKit.framework" ]
413 }
414
415 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
416 testonly = true
417 configs += [ "..:common_config" ]
418 public_configs = [ "..:common_inherited_config" ]
419
420 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
421
422 deps = [
423 ":AppRTCMobileBroadcastUpload_lib",
424 "../sdk:framework_objc",
425 ]
426 }
427
428 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
429 sources = [
430 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
431 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
432 ]
433
434 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
435
436 libs = [ "ReplayKit.framework" ]
437
438 deps = [
439 ":AppRTCMobile_ios_bundle_data",
440 ]
441 }
442 }
443
kthelgasond3adbfb2017-01-26 01:14:04 -0800444 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100445 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700446 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800447 ]
448 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400449 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800450 ]
451 outputs = [
452 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
453 ]
454 }
455
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200456 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700457 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200458 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100459
460 # Sample video taken from https://media.xiph.org/video/derf/
461 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200462 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
463 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
464 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
465 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
466 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
467 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
468 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700469 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
470 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200471 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
472 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
473 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
474 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
475 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700476 "objc/Icon-120.png",
477 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700478 "objc/Icon.png",
479 ]
480 outputs = [
481 "{{bundle_resources_dir}}/{{source_file_part}}",
482 ]
483 }
Anders Carlsson73119182018-03-15 09:41:03 +0100484
485 rtc_static_library("ObjCNativeAPIDemo_lib") {
486 testonly = true
487 sources = [
488 "objcnativeapi/objc/NADAppDelegate.h",
489 "objcnativeapi/objc/NADAppDelegate.m",
490 "objcnativeapi/objc/NADViewController.h",
491 "objcnativeapi/objc/NADViewController.mm",
492 "objcnativeapi/objc/objccallclient.h",
493 "objcnativeapi/objc/objccallclient.mm",
494 ]
495
496 if (!build_with_chromium && is_clang) {
497 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
498 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
499 }
500
501 deps = [
502 "../api:libjingle_peerconnection_api",
503 "../api/audio_codecs:builtin_audio_decoder_factory",
504 "../api/audio_codecs:builtin_audio_encoder_factory",
505 "../logging:rtc_event_log_impl_base",
506 "../media:rtc_audio_video",
507 "../modules/audio_processing:audio_processing",
508 "../pc:libjingle_peerconnection",
509 "../rtc_base:rtc_base",
510 "../sdk:default_codec_factory_objc",
511 "../sdk:framework_objc",
512 "../sdk:native_api",
513 "../sdk:ui_objc",
514 "../sdk:videotoolbox_objc",
515 "../system_wrappers:field_trial_default",
516 "../system_wrappers:metrics_default",
517 "../system_wrappers:runtime_enabled_features_default",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200518 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100519 ]
520
521 if (current_cpu == "arm64") {
522 deps += [ "../sdk:metal_objc" ]
523 }
524 }
525
526 ios_app_bundle("ObjCNativeAPIDemo") {
527 testonly = true
528 sources = [
529 "objcnativeapi/objc/main.m",
530 ]
531
532 info_plist = "objcnativeapi/Info.plist"
533
534 configs += [ "..:common_config" ]
535 public_configs = [ "..:common_inherited_config" ]
536
537 deps = [
538 ":ObjCNativeAPIDemo_lib",
539 ]
540
541 if (target_cpu == "x86") {
542 deps += [ "//testing/iossim:iossim" ]
543 }
544 }
tkchin2ddfdba2016-08-07 21:37:45 -0700545 }
546
547 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800548 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800549 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700550 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200551 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
552 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
553 "objc/AppRTCMobile/mac/APPRTCViewController.h",
554 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700555 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700556 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700557 deps = [
558 ":apprtc_common",
559 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100560 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100561 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100562 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700563 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100564 "../sdk:videocapture_objc",
565 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100566 "../sdk:videocodec_objc",
567 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700568 ]
569 }
570
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200571 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800572 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200573 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700574
tkchin2ddfdba2016-08-07 21:37:45 -0700575 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200576 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700577 ]
578
579 public_configs = [ "..:common_inherited_config" ]
580
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200581 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700582
583 libs = [ "AppKit.framework" ]
584
585 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800586 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700587 ]
588 }
589 }
590
591 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200592 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700593 }
594
595 config("socketrocket_warning_config") {
596 # GN orders flags on a target before flags from configs. The default config
597 # adds these flags so to cancel them out they need to come from a config and
598 # cannot be on the target directly.
599 cflags = [
600 "-Wno-deprecated-declarations",
601 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700602 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800603 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700604 ]
605
henrika27d8b612016-09-21 04:13:00 -0700606 cflags_objc = [
607 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
608 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700609 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700610 }
611
kjellanderb62dbbe2016-09-23 00:38:52 -0700612 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800613 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700614 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200615 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
616 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700617 ]
kthelgasonc0977102017-04-24 00:57:16 -0700618 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700619 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700620
621 libs = [
622 "CFNetwork.framework",
623 "icucore",
624 ]
625 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800626
627 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800628 # TODO(kthelgason): compile xctests on mac when chromium supports it.
629 if (is_ios) {
630 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100631 # iOS must use WebRTC.framework which is dynamically linked.
632 # 'gn check' is disabled in order to avoid confusion and
633 # errors caused by multiple implementations.
634 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800635 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800636 include_dirs = [
637 "objc/AppRTCMobile",
638 "objc/AppRTCMobile/ios",
639 ]
640 testonly = true
641 sources = [
642 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100643 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800644 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
645 ]
kjellander1993b1d2017-03-06 00:29:21 -0800646 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800647 ":AppRTCMobile_ios_frameworks",
648 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100649 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100650 "../rtc_base:rtc_base",
651 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800652 "//build/config/ios:xctest",
653 "//third_party/ocmock",
654 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800655 }
656
kthelgason4065a572017-02-14 04:58:56 -0800657 rtc_ios_xctest_test("apprtcmobile_tests") {
658 info_plist = "objc/AppRTCMobile/ios/Info.plist"
659 sources = [
660 "objc/AppRTCMobile/ios/main.m",
661 ]
662 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100663 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800664 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100665 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800666 ]
667 ldflags = [ "-all_load" ]
668 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800669 }
670 }
tkchin2ddfdba2016-08-07 21:37:45 -0700671}
kthelgason0727f152016-08-08 09:03:23 -0700672
673if (is_linux || is_win) {
ehmaldonado38a21322016-09-02 04:10:34 -0700674 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800675 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700676 sources = [
677 "peerconnection/client/conductor.cc",
678 "peerconnection/client/conductor.h",
679 "peerconnection/client/defaults.cc",
680 "peerconnection/client/defaults.h",
681 "peerconnection/client/peer_connection_client.cc",
682 "peerconnection/client/peer_connection_client.h",
683 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700684
kjellandere40a7ee2016-10-16 23:56:12 -0700685 if (!build_with_chromium && is_clang) {
686 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700687 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700688 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100689 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100690 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200691 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100692 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100693 "../rtc_base:stringutils",
Artem Titove41c4332018-07-25 15:04:28 +0200694 "../rtc_base/third_party/sigslot",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100695 ]
kthelgason0727f152016-08-08 09:03:23 -0700696 if (is_win) {
697 sources += [
698 "peerconnection/client/flagdefs.h",
699 "peerconnection/client/main.cc",
700 "peerconnection/client/main_wnd.cc",
701 "peerconnection/client/main_wnd.h",
702 ]
kthelgason0727f152016-08-08 09:03:23 -0700703 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700704 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700705 }
706 if (is_linux) {
707 sources += [
708 "peerconnection/client/linux/main.cc",
709 "peerconnection/client/linux/main_wnd.cc",
710 "peerconnection/client/linux/main_wnd.h",
711 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200712 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700713 libs = [
714 "X11",
715 "Xcomposite",
716 "Xext",
717 "Xrender",
718 ]
thomasandersonef16e992016-12-13 02:57:43 -0800719 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700720 }
kjellander1993b1d2017-03-06 00:29:21 -0800721
722 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100723 "../api:libjingle_peerconnection_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200724 "../api/audio_codecs:builtin_audio_decoder_factory",
725 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200726 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200727 "../api/video_codecs:builtin_video_decoder_factory",
728 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100729 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200730 "../modules/audio_device:audio_device",
731 "../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",
jianjun.zhuc0247402017-07-11 06:20:45 -0700737 "../system_wrappers:field_trial_default",
738 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000739 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800740 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800741 ]
kthelgason0727f152016-08-08 09:03:23 -0700742 }
kjellanderd4626e52016-09-07 02:33:01 -0700743
ehmaldonado38a21322016-09-02 04:10:34 -0700744 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800745 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700746 sources = [
747 "peerconnection/server/data_socket.cc",
748 "peerconnection/server/data_socket.h",
749 "peerconnection/server/main.cc",
750 "peerconnection/server/peer_channel.cc",
751 "peerconnection/server/peer_channel.h",
752 "peerconnection/server/utils.cc",
753 "peerconnection/server/utils.h",
754 ]
755 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700756 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700757 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100758 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700759 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700760 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700761 if (!build_with_chromium && is_clang) {
762 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700763 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700764 }
765 }
ehmaldonado38a21322016-09-02 04:10:34 -0700766 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800767 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700768 sources = [
769 "relayserver/relayserver_main.cc",
770 ]
771 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700772 "../p2p:rtc_p2p",
773 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700774 "../rtc_base:rtc_base",
775 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700776 "../system_wrappers:field_trial_default",
777 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000778 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700779 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700780 if (!build_with_chromium && is_clang) {
781 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700782 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700783 }
784 }
ehmaldonado38a21322016-09-02 04:10:34 -0700785 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800786 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700787 sources = [
788 "turnserver/turnserver_main.cc",
789 ]
790 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700791 "../p2p:rtc_p2p",
792 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700793 "../rtc_base:rtc_base",
794 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700795 "../system_wrappers:field_trial_default",
796 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000797 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700798 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700799 if (!build_with_chromium && is_clang) {
800 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700801 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700802 }
803 }
ehmaldonado38a21322016-09-02 04:10:34 -0700804 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800805 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700806 sources = [
807 "stunserver/stunserver_main.cc",
808 ]
809 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700810 "../p2p:rtc_p2p",
811 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700812 "../rtc_base:rtc_base",
813 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700814 "../system_wrappers:field_trial_default",
815 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000816 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700817 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700818 if (!build_with_chromium && is_clang) {
819 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700820 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700821 }
822 }
823}
charujainaca3a242016-11-01 03:09:15 -0700824
qiangchen42f96d52017-08-08 17:08:03 -0700825if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700826 rtc_shared_library("webrtc_unity_plugin") {
827 testonly = true
828 sources = [
829 "unityplugin/simple_peer_connection.cc",
830 "unityplugin/simple_peer_connection.h",
831 "unityplugin/unity_plugin_apis.cc",
832 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700833 "unityplugin/video_observer.cc",
834 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700835 ]
qiangchen42f96d52017-08-08 17:08:03 -0700836
837 if (is_android) {
838 sources += [
839 "unityplugin/classreferenceholder.cc",
840 "unityplugin/classreferenceholder.h",
841 "unityplugin/jni_onload.cc",
842 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800843 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700844 }
845
gyzhouad7cad82017-05-11 16:10:03 -0700846 if (!build_with_chromium && is_clang) {
847 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
848 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
849 }
qiangchen42f96d52017-08-08 17:08:03 -0700850 if (is_win) {
Mirko Bonadeif957dd92018-07-11 10:47:42 +0200851 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-08 17:08:03 -0700852 }
gyzhouad7cad82017-05-11 16:10:03 -0700853 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100854 "../api:libjingle_peerconnection_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800855 "../api/audio_codecs:builtin_audio_decoder_factory",
856 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200857 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100858 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100859 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700860 "../media:rtc_media",
861 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800862 "../modules/audio_device:audio_device",
863 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700864 "../modules/video_capture:video_capture_module",
865 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700866 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700867 "../system_wrappers:field_trial_default",
868 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000869 "../system_wrappers:runtime_enabled_features_default",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200870 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700871 ]
qiangchen42f96d52017-08-08 17:08:03 -0700872 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800873 deps += [
874 "../modules/utility:utility",
875 "../sdk/android:libjingle_peerconnection_jni",
876 ]
qiangchen42f96d52017-08-08 17:08:03 -0700877 }
878 }
879}
880
881if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000882 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700883 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
884 deps = [
885 "../rtc_base:base_java",
886 "../sdk/android:libjingle_peerconnection_java",
887 ]
888 }
889
890 dist_jar("libwebrtc_unity") {
891 _target_dir_name = get_label_info(":$target_name", "dir")
892 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800893 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700894 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800895 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200896 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700897 deps = [
898 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200899 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700900 "../rtc_base:base_java",
901 "../sdk/android:libjingle_peerconnection_java",
902 "../sdk/android:libjingle_peerconnection_metrics_default_java",
903 ]
gyzhouad7cad82017-05-11 16:10:03 -0700904 }
905}
906
charujainaca3a242016-11-01 03:09:15 -0700907if (!build_with_chromium) {
908 # Doesn't build within Chrome on Win.
909 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800910 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700911 sources = [
912 "stunprober/main.cc",
913 ]
914
915 if (!build_with_chromium && is_clang) {
916 # Suppress warnings from Chrome's Clang plugins.
917 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
918 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
919 }
920
921 deps = [
922 "../p2p:libstunprober",
923 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100924 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700925 "../rtc_base:rtc_base",
926 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100927 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700928 "../system_wrappers:field_trial_default",
929 ]
930 }
931}