blob: 471424b53f60dd291c4d3b2826b6b9fe18ed0ed4 [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",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200127 "../sdk/android:video_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700128 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomäki06e363a2018-03-22 13:42:50 +0100129 "//third_party/jsr-305:jsr_305_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200130 ]
131 }
132
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200133 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800134 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200135 resource_dirs = [ "androidapp/res" ]
136 custom_package = "org.appspot.apprtc"
137 }
138
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000139 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200140 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200141 android_manifest = "androidtests/AndroidManifest.xml"
142
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100143 java_files = [
144 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
145 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200146
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200147 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200148
149 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200150 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700151 "../sdk/android:libjingle_peerconnection_java",
Sami Kalliomäki903bd412018-07-24 10:53:28 +0200152 "../sdk/android:video_java",
sakalcb79d512017-01-11 06:21:26 -0800153 "//third_party/android_support_test_runner:runner_java",
154 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200155 ]
156 }
mandermoa6069e82017-01-16 02:23:09 -0800157
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000158 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800159 apk_name = "AppRTCMobileTestStubbedVideoIO"
160 android_manifest = "androidtests/AndroidManifest.xml"
161
oprypin30cda5e2017-04-24 04:15:13 -0700162 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800163
164 apk_under_test = ":AppRTCMobile"
165
166 deps = [
167 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700168 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800169 "//third_party/android_support_test_runner:rules_java",
170 "//third_party/android_support_test_runner:runner_java",
171 "//third_party/espresso:espresso_all_java",
172 "//third_party/hamcrest:hamcrest_java",
173 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800174 ]
175
176 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100177 "../build/android/adb_reverse_forwarder.py",
178 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200179 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100180 "../rtc_tools/barcode_tools/barcode_decoder.py",
181 "../rtc_tools/barcode_tools/helper_functions.py",
182 "../rtc_tools/compare_videos.py",
183 "../rtc_tools/testing/prebuilt_apprtc.zip",
184 "../rtc_tools/testing/golang/linux/go.tar.gz",
185 "../rtc_tools/testing/build_apprtc.py",
186 "../rtc_tools/testing/utils.py",
187 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
188 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
189 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800190 ]
191 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200192}
tkchin2ddfdba2016-08-07 21:37:45 -0700193
194if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700195 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200196 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700197 }
198
kjellanderb62dbbe2016-09-23 00:38:52 -0700199 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800200 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700201 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200202 "objc/AppRTCMobile/common/ARDUtilities.h",
203 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700204 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700205 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700206
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200207 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100208 # iOS must use WebRTC.framework which is dynamically linked.
209 # 'gn check' is disabled in order to avoid confusion and
210 # errors caused by multiple implementations.
211 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700212 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100213 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100214 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000215 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700216 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200217 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700218 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700219 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700220 "../system_wrappers:field_trial_default",
221 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000222 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700223 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200224 }
tkchin2ddfdba2016-08-07 21:37:45 -0700225 }
226
227 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200228 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700229 }
230
kjellanderb62dbbe2016-09-23 00:38:52 -0700231 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800232 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700233 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200234 "objc/AppRTCMobile/ARDAppClient+Internal.h",
235 "objc/AppRTCMobile/ARDAppClient.h",
236 "objc/AppRTCMobile/ARDAppClient.m",
237 "objc/AppRTCMobile/ARDAppEngineClient.h",
238 "objc/AppRTCMobile/ARDAppEngineClient.m",
239 "objc/AppRTCMobile/ARDBitrateTracker.h",
240 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700241 "objc/AppRTCMobile/ARDCaptureController.h",
242 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200243 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
244 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200245 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
246 "objc/AppRTCMobile/ARDJoinResponse.h",
247 "objc/AppRTCMobile/ARDJoinResponse.m",
248 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
249 "objc/AppRTCMobile/ARDMessageResponse.h",
250 "objc/AppRTCMobile/ARDMessageResponse.m",
251 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700252 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
253 "objc/AppRTCMobile/ARDSettingsModel.h",
254 "objc/AppRTCMobile/ARDSettingsModel.m",
255 "objc/AppRTCMobile/ARDSettingsStore.h",
256 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200257 "objc/AppRTCMobile/ARDSignalingChannel.h",
258 "objc/AppRTCMobile/ARDSignalingMessage.h",
259 "objc/AppRTCMobile/ARDSignalingMessage.m",
260 "objc/AppRTCMobile/ARDStatsBuilder.h",
261 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800262 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200263 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800264 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200265 "objc/AppRTCMobile/ARDWebSocketChannel.h",
266 "objc/AppRTCMobile/ARDWebSocketChannel.m",
267 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
268 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
269 "objc/AppRTCMobile/RTCIceServer+JSON.h",
270 "objc/AppRTCMobile/RTCIceServer+JSON.m",
271 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
272 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
273 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
274 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700275 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700276 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700277 deps = [
278 ":apprtc_common",
279 ":socketrocket",
280 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200281 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100282 # iOS must use WebRTC.framework which is dynamically linked.
283 # 'gn check' is disabled in order to avoid confusion and
284 # errors caused by multiple implementations.
285 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100286 deps += [
287 ":AppRTCMobile_ios_frameworks",
288 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200289 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100290 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100291 deps += [
292 "../sdk:common_objc",
293 "../sdk:mediaconstraints_objc",
294 "../sdk:peerconnectionfactory_base_objc",
295 "../sdk:videocapture_objc",
296 "../sdk:videocodec_objc",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200297 "../sdk:videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100298 "../sdk:videosource_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100299 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200300 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000301 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700302 }
303
304 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800305 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100306 # iOS must use WebRTC.framework which is dynamically linked.
307 # 'gn check' is disabled in order to avoid confusion and
308 # errors caused by multiple implementations.
309 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800310 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700311 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100312 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200313 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100314 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
315 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200316 "objc/AppRTCMobile/ios/ARDMainView.h",
317 "objc/AppRTCMobile/ios/ARDMainView.m",
318 "objc/AppRTCMobile/ios/ARDMainViewController.h",
319 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700320 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
321 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200322 "objc/AppRTCMobile/ios/ARDStatsView.h",
323 "objc/AppRTCMobile/ios/ARDStatsView.m",
324 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
325 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
326 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
327 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200328 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
329 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200330 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
331 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800332 ]
denicija77bfd7c2016-11-15 00:41:26 -0800333
334 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200335 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800336 ":apprtc_common",
337 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100338 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800339 ]
340 }
341
342 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800343 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800344 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200345 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700346 ]
347
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200348 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700349
denicija77bfd7c2016-11-15 00:41:26 -0800350 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700351 public_configs = [ "..:common_inherited_config" ]
352
353 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200354 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800355 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800356 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100357 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700358 ]
359
Anders Carlsson358f2e02018-06-04 10:24:37 +0200360 if (rtc_apprtcmobile_broadcast_extension) {
361 deps += [
362 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
363 ":AppRTCMobileBroadcastUpload_extension_bundle",
364 ]
365 }
366
tkchin2ddfdba2016-08-07 21:37:45 -0700367 if (target_cpu == "x86") {
368 deps += [ "//testing/iossim:iossim" ]
369 }
370 }
371
Anders Carlsson358f2e02018-06-04 10:24:37 +0200372 if (rtc_apprtcmobile_broadcast_extension) {
373 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
374 testonly = true
375 public_deps = [
376 ":AppRTCMobileBroadcastUpload",
377 ]
378 sources = [
379 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
380 ]
381 outputs = [
382 "{{bundle_plugins_dir}}/{{source_file_part}}",
383 ]
384 }
385
386 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
387 testonly = true
388 public_deps = [
389 ":AppRTCMobileBroadcastSetupUI",
390 ]
391 sources = [
392 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
393 ]
394 outputs = [
395 "{{bundle_plugins_dir}}/{{source_file_part}}",
396 ]
397 }
398
399 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
400 check_includes = false
401 testonly = true
402 sources = [
403 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
404 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
405 ]
406
407 deps = [
408 ":AppRTCMobile_ios_frameworks",
409 ":apprtc_signaling",
410 "../sdk:framework_objc",
411 ]
412
413 libs = [ "ReplayKit.framework" ]
414 }
415
416 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
417 testonly = true
418 configs += [ "..:common_config" ]
419 public_configs = [ "..:common_inherited_config" ]
420
421 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
422
423 deps = [
424 ":AppRTCMobileBroadcastUpload_lib",
425 "../sdk:framework_objc",
426 ]
427 }
428
429 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
430 sources = [
431 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
432 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
433 ]
434
435 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
436
437 libs = [ "ReplayKit.framework" ]
438
439 deps = [
440 ":AppRTCMobile_ios_bundle_data",
441 ]
442 }
443 }
444
kthelgasond3adbfb2017-01-26 01:14:04 -0800445 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100446 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700447 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800448 ]
449 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400450 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800451 ]
452 outputs = [
453 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
454 ]
455 }
456
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200457 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700458 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200459 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100460
461 # Sample video taken from https://media.xiph.org/video/derf/
462 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200463 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
464 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
465 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
466 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
467 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
468 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
469 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700470 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
471 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200472 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
473 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
474 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
475 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
476 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700477 "objc/Icon-120.png",
478 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700479 "objc/Icon.png",
480 ]
481 outputs = [
482 "{{bundle_resources_dir}}/{{source_file_part}}",
483 ]
484 }
Anders Carlsson73119182018-03-15 09:41:03 +0100485
486 rtc_static_library("ObjCNativeAPIDemo_lib") {
487 testonly = true
488 sources = [
489 "objcnativeapi/objc/NADAppDelegate.h",
490 "objcnativeapi/objc/NADAppDelegate.m",
491 "objcnativeapi/objc/NADViewController.h",
492 "objcnativeapi/objc/NADViewController.mm",
493 "objcnativeapi/objc/objccallclient.h",
494 "objcnativeapi/objc/objccallclient.mm",
495 ]
496
497 if (!build_with_chromium && is_clang) {
498 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
499 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
500 }
501
502 deps = [
503 "../api:libjingle_peerconnection_api",
504 "../api/audio_codecs:builtin_audio_decoder_factory",
505 "../api/audio_codecs:builtin_audio_encoder_factory",
506 "../logging:rtc_event_log_impl_base",
507 "../media:rtc_audio_video",
508 "../modules/audio_processing:audio_processing",
509 "../pc:libjingle_peerconnection",
510 "../rtc_base:rtc_base",
511 "../sdk:default_codec_factory_objc",
512 "../sdk:framework_objc",
513 "../sdk:native_api",
514 "../sdk:ui_objc",
515 "../sdk:videotoolbox_objc",
516 "../system_wrappers:field_trial_default",
517 "../system_wrappers:metrics_default",
518 "../system_wrappers:runtime_enabled_features_default",
Mirko Bonadei879f7882018-07-11 09:18:37 +0200519 "//third_party/abseil-cpp/absl/memory",
Anders Carlsson73119182018-03-15 09:41:03 +0100520 ]
521
522 if (current_cpu == "arm64") {
523 deps += [ "../sdk:metal_objc" ]
524 }
525 }
526
527 ios_app_bundle("ObjCNativeAPIDemo") {
528 testonly = true
529 sources = [
530 "objcnativeapi/objc/main.m",
531 ]
532
533 info_plist = "objcnativeapi/Info.plist"
534
535 configs += [ "..:common_config" ]
536 public_configs = [ "..:common_inherited_config" ]
537
538 deps = [
539 ":ObjCNativeAPIDemo_lib",
540 ]
541
542 if (target_cpu == "x86") {
543 deps += [ "//testing/iossim:iossim" ]
544 }
545 }
tkchin2ddfdba2016-08-07 21:37:45 -0700546 }
547
548 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800549 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800550 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700551 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200552 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
553 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
554 "objc/AppRTCMobile/mac/APPRTCViewController.h",
555 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700556 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700557 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700558 deps = [
559 ":apprtc_common",
560 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100561 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100562 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100563 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700564 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100565 "../sdk:videocapture_objc",
566 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100567 "../sdk:videocodec_objc",
568 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700569 ]
570 }
571
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200572 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800573 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200574 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700575
tkchin2ddfdba2016-08-07 21:37:45 -0700576 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200577 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700578 ]
579
580 public_configs = [ "..:common_inherited_config" ]
581
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200582 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700583
584 libs = [ "AppKit.framework" ]
585
586 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800587 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700588 ]
589 }
590 }
591
592 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200593 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700594 }
595
596 config("socketrocket_warning_config") {
597 # GN orders flags on a target before flags from configs. The default config
598 # adds these flags so to cancel them out they need to come from a config and
599 # cannot be on the target directly.
600 cflags = [
601 "-Wno-deprecated-declarations",
602 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700603 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800604 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700605 ]
606
henrika27d8b612016-09-21 04:13:00 -0700607 cflags_objc = [
608 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
609 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700610 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700611 }
612
kjellanderb62dbbe2016-09-23 00:38:52 -0700613 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800614 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700615 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200616 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
617 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700618 ]
kthelgasonc0977102017-04-24 00:57:16 -0700619 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700620 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700621
622 libs = [
623 "CFNetwork.framework",
624 "icucore",
625 ]
626 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800627
628 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800629 # TODO(kthelgason): compile xctests on mac when chromium supports it.
630 if (is_ios) {
631 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100632 # iOS must use WebRTC.framework which is dynamically linked.
633 # 'gn check' is disabled in order to avoid confusion and
634 # errors caused by multiple implementations.
635 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800636 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800637 include_dirs = [
638 "objc/AppRTCMobile",
639 "objc/AppRTCMobile/ios",
640 ]
641 testonly = true
642 sources = [
643 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100644 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800645 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
646 ]
kjellander1993b1d2017-03-06 00:29:21 -0800647 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800648 ":AppRTCMobile_ios_frameworks",
649 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100650 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100651 "../rtc_base:rtc_base",
652 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800653 "//build/config/ios:xctest",
654 "//third_party/ocmock",
655 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800656 }
657
kthelgason4065a572017-02-14 04:58:56 -0800658 rtc_ios_xctest_test("apprtcmobile_tests") {
659 info_plist = "objc/AppRTCMobile/ios/Info.plist"
660 sources = [
661 "objc/AppRTCMobile/ios/main.m",
662 ]
663 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100664 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800665 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100666 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800667 ]
668 ldflags = [ "-all_load" ]
669 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800670 }
671 }
tkchin2ddfdba2016-08-07 21:37:45 -0700672}
kthelgason0727f152016-08-08 09:03:23 -0700673
674if (is_linux || is_win) {
ehmaldonado38a21322016-09-02 04:10:34 -0700675 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800676 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700677 sources = [
678 "peerconnection/client/conductor.cc",
679 "peerconnection/client/conductor.h",
680 "peerconnection/client/defaults.cc",
681 "peerconnection/client/defaults.h",
682 "peerconnection/client/peer_connection_client.cc",
683 "peerconnection/client/peer_connection_client.h",
684 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700685
kjellandere40a7ee2016-10-16 23:56:12 -0700686 if (!build_with_chromium && is_clang) {
687 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700688 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700689 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100690 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100691 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200692 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100693 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100694 "../rtc_base:stringutils",
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",
jianjun.zhuc0247402017-07-11 06:20:45 -0700724 "../api:libjingle_peerconnection_test_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200725 "../api/audio_codecs:builtin_audio_decoder_factory",
726 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200727 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200728 "../api/video_codecs:builtin_video_decoder_factory",
729 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100730 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200731 "../modules/audio_device:audio_device",
732 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700733 "../modules/video_capture:video_capture_module",
734 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700735 "../rtc_base:rtc_base",
736 "../rtc_base:rtc_base_approved",
737 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700738 "../system_wrappers:field_trial_default",
739 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000740 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800741 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800742 ]
kthelgason0727f152016-08-08 09:03:23 -0700743 }
kjellanderd4626e52016-09-07 02:33:01 -0700744
ehmaldonado38a21322016-09-02 04:10:34 -0700745 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800746 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700747 sources = [
748 "peerconnection/server/data_socket.cc",
749 "peerconnection/server/data_socket.h",
750 "peerconnection/server/main.cc",
751 "peerconnection/server/peer_channel.cc",
752 "peerconnection/server/peer_channel.h",
753 "peerconnection/server/utils.cc",
754 "peerconnection/server/utils.h",
755 ]
756 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700757 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700758 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100759 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700760 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700761 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700762 if (!build_with_chromium && is_clang) {
763 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700764 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700765 }
766 }
ehmaldonado38a21322016-09-02 04:10:34 -0700767 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800768 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700769 sources = [
770 "relayserver/relayserver_main.cc",
771 ]
772 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700773 "../p2p:rtc_p2p",
774 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700775 "../rtc_base:rtc_base",
776 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700777 "../system_wrappers:field_trial_default",
778 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000779 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700780 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700781 if (!build_with_chromium && is_clang) {
782 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700783 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700784 }
785 }
ehmaldonado38a21322016-09-02 04:10:34 -0700786 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800787 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700788 sources = [
789 "turnserver/turnserver_main.cc",
790 ]
791 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700792 "../p2p:rtc_p2p",
793 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700794 "../rtc_base:rtc_base",
795 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700796 "../system_wrappers:field_trial_default",
797 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000798 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700799 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700800 if (!build_with_chromium && is_clang) {
801 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700802 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700803 }
804 }
ehmaldonado38a21322016-09-02 04:10:34 -0700805 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800806 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700807 sources = [
808 "stunserver/stunserver_main.cc",
809 ]
810 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700811 "../p2p:rtc_p2p",
812 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700813 "../rtc_base:rtc_base",
814 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700815 "../system_wrappers:field_trial_default",
816 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000817 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700818 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700819 if (!build_with_chromium && is_clang) {
820 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700821 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700822 }
823 }
824}
charujainaca3a242016-11-01 03:09:15 -0700825
qiangchen42f96d52017-08-08 17:08:03 -0700826if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700827 rtc_shared_library("webrtc_unity_plugin") {
828 testonly = true
829 sources = [
830 "unityplugin/simple_peer_connection.cc",
831 "unityplugin/simple_peer_connection.h",
832 "unityplugin/unity_plugin_apis.cc",
833 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700834 "unityplugin/video_observer.cc",
835 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700836 ]
qiangchen42f96d52017-08-08 17:08:03 -0700837
838 if (is_android) {
839 sources += [
840 "unityplugin/classreferenceholder.cc",
841 "unityplugin/classreferenceholder.h",
842 "unityplugin/jni_onload.cc",
843 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800844 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700845 }
846
gyzhouad7cad82017-05-11 16:10:03 -0700847 if (!build_with_chromium && is_clang) {
848 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
849 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
850 }
qiangchen42f96d52017-08-08 17:08:03 -0700851 if (is_win) {
Mirko Bonadeif957dd92018-07-11 10:47:42 +0200852 configs += [ "//build/config/win:windowed" ]
qiangchen42f96d52017-08-08 17:08:03 -0700853 }
gyzhouad7cad82017-05-11 16:10:03 -0700854 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100855 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700856 "../api:libjingle_peerconnection_test_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800857 "../api/audio_codecs:builtin_audio_decoder_factory",
858 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200859 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100860 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100861 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700862 "../media:rtc_media",
863 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800864 "../modules/audio_device:audio_device",
865 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700866 "../modules/video_capture:video_capture_module",
867 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700868 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700869 "../system_wrappers:field_trial_default",
870 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000871 "../system_wrappers:runtime_enabled_features_default",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200872 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700873 ]
qiangchen42f96d52017-08-08 17:08:03 -0700874 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800875 deps += [
876 "../modules/utility:utility",
877 "../sdk/android:libjingle_peerconnection_jni",
878 ]
qiangchen42f96d52017-08-08 17:08:03 -0700879 }
880 }
881}
882
883if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000884 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700885 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
886 deps = [
887 "../rtc_base:base_java",
888 "../sdk/android:libjingle_peerconnection_java",
889 ]
890 }
891
892 dist_jar("libwebrtc_unity") {
893 _target_dir_name = get_label_info(":$target_name", "dir")
894 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800895 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700896 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800897 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200898 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700899 deps = [
900 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200901 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700902 "../rtc_base:base_java",
903 "../sdk/android:libjingle_peerconnection_java",
904 "../sdk/android:libjingle_peerconnection_metrics_default_java",
905 ]
gyzhouad7cad82017-05-11 16:10:03 -0700906 }
907}
908
charujainaca3a242016-11-01 03:09:15 -0700909if (!build_with_chromium) {
910 # Doesn't build within Chrome on Win.
911 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800912 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700913 sources = [
914 "stunprober/main.cc",
915 ]
916
917 if (!build_with_chromium && is_clang) {
918 # Suppress warnings from Chrome's Clang plugins.
919 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
920 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
921 }
922
923 deps = [
924 "../p2p:libstunprober",
925 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100926 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700927 "../rtc_base:rtc_base",
928 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100929 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700930 "../system_wrappers:field_trial_default",
931 ]
932 }
933}