blob: 1c24f912ffdbd7f9bdab94c459288af4b129562e [file] [log] [blame]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +02001# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS. All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
Qiang Chen43fb9122017-12-20 10:47:36 -080010
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020011if (is_android) {
12 import("//build/config/android/config.gni")
13 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-07 21:37:45 -070014} else if (is_mac) {
15 import("//build/config/mac/rules.gni")
16} else if (is_ios) {
17 import("//build/config/ios/rules.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020018}
19
20group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070021 # This target shall build all targets in examples.
22 testonly = true
Mirko Bonadei1a339c32017-12-14 13:06:10 +010023 deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020024
tkchin2ddfdba2016-08-07 21:37:45 -070025 if (is_android) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010026 deps += [
kjellander6ceab082016-10-28 05:44:03 -070027 ":AppRTCMobile",
28 ":AppRTCMobileTest",
mandermoa6069e82017-01-16 02:23:09 -080029 ":AppRTCMobileTestStubbedVideoIO",
George Zhou2770c3d2018-03-07 09:58:54 -080030 ":libwebrtc_unity",
kjellander6ceab082016-10-28 05:44:03 -070031 ]
Sami Kalliomäki3e77afd2018-03-08 16:43:16 +010032
33 # TODO(sakal): We include some code from the tests. Remove this dependency
34 # and remove this if-clause.
35 if (rtc_include_tests) {
36 deps += [ "androidnativeapi:androidnativeapi" ]
37 }
kjellander6ceab082016-10-28 05:44:03 -070038 }
39
charujainaca3a242016-11-01 03:09:15 -070040 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010041 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 03:09:15 -070042 }
43
kjellander6ceab082016-10-28 05:44:03 -070044 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010045 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020046 }
kjellander6ceab082016-10-28 05:44:03 -070047
48 if (is_linux || is_win) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010049 deps += [
kthelgason0727f152016-08-08 09:03:23 -070050 ":peerconnection_client",
51 ":peerconnection_server",
52 ":relayserver",
53 ":stunserver",
54 ":turnserver",
55 ]
56 }
George Zhou2770c3d2018-03-07 09:58:54 -080057
58 if (is_android || is_win) {
59 deps += [ ":webrtc_unity_plugin" ]
60 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020061}
62
tkchin2ddfdba2016-08-07 21:37:45 -070063if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000064 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080065 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020066 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020067 android_manifest = "androidapp/AndroidManifest.xml"
68
69 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020070 ":AppRTCMobile_javalib",
71 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070072 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020073 "//base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020074 ]
75
jianjun.zhuc0247402017-07-11 06:20:45 -070076 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020077 }
78
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000079 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -080080 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +010081 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -080082
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020083 java_files = [
84 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -080085 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020086 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
87 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
88 "androidapp/src/org/appspot/apprtc/CallActivity.java",
89 "androidapp/src/org/appspot/apprtc/CallFragment.java",
90 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
91 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
92 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
93 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
94 "androidapp/src/org/appspot/apprtc/HudFragment.java",
95 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020096 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -080097 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
henrika5641fbb2018-02-21 14:12:53 +010098 "androidapp/src/org/appspot/apprtc/RecordedAudioToFileController.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020099 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
100 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
101 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
102 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
103 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
104 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
105 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
106 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200107 ]
108
109 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200110 ":AppRTCMobile_resources",
Paulina Hensman17071682018-03-26 16:10:29 +0200111 "../modules/audio_device:audio_device_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700112 "../rtc_base:base_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200113 "../sdk/android:audio_api_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200114 "../sdk/android:base_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200115 "../sdk/android:camera_java",
Anders Carlsson1e06d882018-07-10 09:33:30 +0200116 "../sdk/android:default_video_codec_factory_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200117 "../sdk/android:filevideo_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200118 "../sdk/android:hwcodecs_java",
Sami Kalliomäki7d8f5942018-04-23 15:07:34 +0200119 "../sdk/android:java_audio_device_module_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700120 "../sdk/android:libjingle_peerconnection_java",
121 "../sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200122 "../sdk/android:peerconnection_java",
123 "../sdk/android:screencapturer_java",
124 "../sdk/android:surfaceviewrenderer_java",
Sami Kalliomäki725c1062018-03-28 10:49:18 +0200125 "../sdk/android:swcodecs_java",
Sami Kalliomäki1641ca32018-04-04 15:59:31 +0200126 "../sdk/android:video_api_java",
jianjun.zhuc0247402017-07-11 06:20:45 -0700127 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomäki06e363a2018-03-22 13:42:50 +0100128 "//third_party/jsr-305:jsr_305_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200129 ]
130 }
131
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200132 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800133 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200134 resource_dirs = [ "androidapp/res" ]
135 custom_package = "org.appspot.apprtc"
136 }
137
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000138 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200139 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200140 android_manifest = "androidtests/AndroidManifest.xml"
141
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100142 java_files = [
143 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
144 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200145
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200146 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200147
148 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200149 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700150 "../sdk/android:libjingle_peerconnection_java",
sakalcb79d512017-01-11 06:21:26 -0800151 "//third_party/android_support_test_runner:runner_java",
152 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200153 ]
154 }
mandermoa6069e82017-01-16 02:23:09 -0800155
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000156 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800157 apk_name = "AppRTCMobileTestStubbedVideoIO"
158 android_manifest = "androidtests/AndroidManifest.xml"
159
oprypin30cda5e2017-04-24 04:15:13 -0700160 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800161
162 apk_under_test = ":AppRTCMobile"
163
164 deps = [
165 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700166 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800167 "//third_party/android_support_test_runner:rules_java",
168 "//third_party/android_support_test_runner:runner_java",
169 "//third_party/espresso:espresso_all_java",
170 "//third_party/hamcrest:hamcrest_java",
171 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800172 ]
173
174 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100175 "../build/android/adb_reverse_forwarder.py",
176 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200177 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100178 "../rtc_tools/barcode_tools/barcode_decoder.py",
179 "../rtc_tools/barcode_tools/helper_functions.py",
180 "../rtc_tools/compare_videos.py",
181 "../rtc_tools/testing/prebuilt_apprtc.zip",
182 "../rtc_tools/testing/golang/linux/go.tar.gz",
183 "../rtc_tools/testing/build_apprtc.py",
184 "../rtc_tools/testing/utils.py",
185 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
186 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
187 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800188 ]
189 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200190}
tkchin2ddfdba2016-08-07 21:37:45 -0700191
192if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700193 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200194 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700195 }
196
kjellanderb62dbbe2016-09-23 00:38:52 -0700197 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800198 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700199 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200200 "objc/AppRTCMobile/common/ARDUtilities.h",
201 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700202 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700203 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700204
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200205 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100206 # iOS must use WebRTC.framework which is dynamically linked.
207 # 'gn check' is disabled in order to avoid confusion and
208 # errors caused by multiple implementations.
209 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700210 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100211 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100212 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000213 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700214 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200215 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700216 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700217 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700218 "../system_wrappers:field_trial_default",
219 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000220 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700221 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200222 }
tkchin2ddfdba2016-08-07 21:37:45 -0700223 }
224
225 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200226 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700227
228 # GN orders flags on a target before flags from configs. The default config
229 # adds these flags so to cancel them out they need to come from a config and
230 # cannot be on the target directly.
231 cflags = [
232 "-Wno-sign-compare",
233 "-Wno-unused-variable",
234 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700235 }
236
kjellanderb62dbbe2016-09-23 00:38:52 -0700237 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800238 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700239 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200240 "objc/AppRTCMobile/ARDAppClient+Internal.h",
241 "objc/AppRTCMobile/ARDAppClient.h",
242 "objc/AppRTCMobile/ARDAppClient.m",
243 "objc/AppRTCMobile/ARDAppEngineClient.h",
244 "objc/AppRTCMobile/ARDAppEngineClient.m",
245 "objc/AppRTCMobile/ARDBitrateTracker.h",
246 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700247 "objc/AppRTCMobile/ARDCaptureController.h",
248 "objc/AppRTCMobile/ARDCaptureController.m",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200249 "objc/AppRTCMobile/ARDExternalSampleCapturer.h",
250 "objc/AppRTCMobile/ARDExternalSampleCapturer.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200251 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
252 "objc/AppRTCMobile/ARDJoinResponse.h",
253 "objc/AppRTCMobile/ARDJoinResponse.m",
254 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
255 "objc/AppRTCMobile/ARDMessageResponse.h",
256 "objc/AppRTCMobile/ARDMessageResponse.m",
257 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700258 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
259 "objc/AppRTCMobile/ARDSettingsModel.h",
260 "objc/AppRTCMobile/ARDSettingsModel.m",
261 "objc/AppRTCMobile/ARDSettingsStore.h",
262 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200263 "objc/AppRTCMobile/ARDSignalingChannel.h",
264 "objc/AppRTCMobile/ARDSignalingMessage.h",
265 "objc/AppRTCMobile/ARDSignalingMessage.m",
266 "objc/AppRTCMobile/ARDStatsBuilder.h",
267 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800268 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200269 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800270 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200271 "objc/AppRTCMobile/ARDWebSocketChannel.h",
272 "objc/AppRTCMobile/ARDWebSocketChannel.m",
273 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
274 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
275 "objc/AppRTCMobile/RTCIceServer+JSON.h",
276 "objc/AppRTCMobile/RTCIceServer+JSON.m",
277 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
278 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
279 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
280 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700281 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700282 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700283 deps = [
284 ":apprtc_common",
285 ":socketrocket",
286 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200287 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100288 # iOS must use WebRTC.framework which is dynamically linked.
289 # 'gn check' is disabled in order to avoid confusion and
290 # errors caused by multiple implementations.
291 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100292 deps += [
293 ":AppRTCMobile_ios_frameworks",
294 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200295 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100296 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100297 deps += [
298 "../sdk:common_objc",
299 "../sdk:mediaconstraints_objc",
300 "../sdk:peerconnectionfactory_base_objc",
301 "../sdk:videocapture_objc",
302 "../sdk:videocodec_objc",
Anders Carlsson358f2e02018-06-04 10:24:37 +0200303 "../sdk:videoframebuffer_objc",
Anders Carlsson9823ee42018-03-07 10:32:03 +0100304 "../sdk:videosource_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100305 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200306 }
Kári Helgasonaaa483b2018-06-20 11:52:03 +0000307 libs = [ "QuartzCore.framework" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700308 }
309
310 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800311 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100312 # iOS must use WebRTC.framework which is dynamically linked.
313 # 'gn check' is disabled in order to avoid confusion and
314 # errors caused by multiple implementations.
315 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800316 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700317 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100318 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200319 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100320 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
321 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200322 "objc/AppRTCMobile/ios/ARDMainView.h",
323 "objc/AppRTCMobile/ios/ARDMainView.m",
324 "objc/AppRTCMobile/ios/ARDMainViewController.h",
325 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700326 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
327 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200328 "objc/AppRTCMobile/ios/ARDStatsView.h",
329 "objc/AppRTCMobile/ios/ARDStatsView.m",
330 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
331 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
332 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
333 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200334 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
335 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200336 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
337 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800338 ]
denicija77bfd7c2016-11-15 00:41:26 -0800339
340 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200341 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800342 ":apprtc_common",
343 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100344 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800345 ]
346 }
347
348 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800349 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800350 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200351 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700352 ]
353
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200354 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700355
denicija77bfd7c2016-11-15 00:41:26 -0800356 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700357 public_configs = [ "..:common_inherited_config" ]
358
359 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200360 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800361 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800362 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100363 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700364 ]
365
Anders Carlsson358f2e02018-06-04 10:24:37 +0200366 if (rtc_apprtcmobile_broadcast_extension) {
367 deps += [
368 ":AppRTCMobileBroadcastSetupUI_extension_bundle",
369 ":AppRTCMobileBroadcastUpload_extension_bundle",
370 ]
371 }
372
tkchin2ddfdba2016-08-07 21:37:45 -0700373 if (target_cpu == "x86") {
374 deps += [ "//testing/iossim:iossim" ]
375 }
376 }
377
Anders Carlsson358f2e02018-06-04 10:24:37 +0200378 if (rtc_apprtcmobile_broadcast_extension) {
379 bundle_data("AppRTCMobileBroadcastUpload_extension_bundle") {
380 testonly = true
381 public_deps = [
382 ":AppRTCMobileBroadcastUpload",
383 ]
384 sources = [
385 "$root_out_dir/AppRTCMobileBroadcastUpload.appex",
386 ]
387 outputs = [
388 "{{bundle_plugins_dir}}/{{source_file_part}}",
389 ]
390 }
391
392 bundle_data("AppRTCMobileBroadcastSetupUI_extension_bundle") {
393 testonly = true
394 public_deps = [
395 ":AppRTCMobileBroadcastSetupUI",
396 ]
397 sources = [
398 "$root_out_dir/AppRTCMobileBroadcastSetupUI.appex",
399 ]
400 outputs = [
401 "{{bundle_plugins_dir}}/{{source_file_part}}",
402 ]
403 }
404
405 rtc_static_library("AppRTCMobileBroadcastUpload_lib") {
406 check_includes = false
407 testonly = true
408 sources = [
409 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.h",
410 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSampleHandler.m",
411 ]
412
413 deps = [
414 ":AppRTCMobile_ios_frameworks",
415 ":apprtc_signaling",
416 "../sdk:framework_objc",
417 ]
418
419 libs = [ "ReplayKit.framework" ]
420 }
421
422 ios_appex_bundle("AppRTCMobileBroadcastUpload") {
423 testonly = true
424 configs += [ "..:common_config" ]
425 public_configs = [ "..:common_inherited_config" ]
426
427 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastUploadInfo.plist"
428
429 deps = [
430 ":AppRTCMobileBroadcastUpload_lib",
431 "../sdk:framework_objc",
432 ]
433 }
434
435 ios_appex_bundle("AppRTCMobileBroadcastSetupUI") {
436 sources = [
437 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.h",
438 "objc/AppRTCMobile/ios/broadcast_extension/ARDBroadcastSetupViewController.m",
439 ]
440
441 info_plist = "objc/AppRTCMobile/ios/broadcast_extension/BroadcastSetupUIInfo.plist"
442
443 libs = [ "ReplayKit.framework" ]
444
445 deps = [
446 ":AppRTCMobile_ios_bundle_data",
447 ]
448 }
449 }
450
kthelgasond3adbfb2017-01-26 01:14:04 -0800451 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100452 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700453 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800454 ]
455 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400456 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800457 ]
458 outputs = [
459 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
460 ]
461 }
462
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200463 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700464 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200465 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100466
467 # Sample video taken from https://media.xiph.org/video/derf/
468 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200469 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
470 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
471 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
472 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
473 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
474 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
475 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700476 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
477 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200478 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
479 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
480 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
481 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
482 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700483 "objc/Icon-120.png",
484 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700485 "objc/Icon.png",
486 ]
487 outputs = [
488 "{{bundle_resources_dir}}/{{source_file_part}}",
489 ]
490 }
Anders Carlsson73119182018-03-15 09:41:03 +0100491
492 rtc_static_library("ObjCNativeAPIDemo_lib") {
493 testonly = true
494 sources = [
495 "objcnativeapi/objc/NADAppDelegate.h",
496 "objcnativeapi/objc/NADAppDelegate.m",
497 "objcnativeapi/objc/NADViewController.h",
498 "objcnativeapi/objc/NADViewController.mm",
499 "objcnativeapi/objc/objccallclient.h",
500 "objcnativeapi/objc/objccallclient.mm",
501 ]
502
503 if (!build_with_chromium && is_clang) {
504 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
505 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
506 }
507
508 deps = [
509 "../api:libjingle_peerconnection_api",
510 "../api/audio_codecs:builtin_audio_decoder_factory",
511 "../api/audio_codecs:builtin_audio_encoder_factory",
512 "../logging:rtc_event_log_impl_base",
513 "../media:rtc_audio_video",
514 "../modules/audio_processing:audio_processing",
515 "../pc:libjingle_peerconnection",
516 "../rtc_base:rtc_base",
517 "../sdk:default_codec_factory_objc",
518 "../sdk:framework_objc",
519 "../sdk:native_api",
520 "../sdk:ui_objc",
521 "../sdk:videotoolbox_objc",
522 "../system_wrappers:field_trial_default",
523 "../system_wrappers:metrics_default",
524 "../system_wrappers:runtime_enabled_features_default",
525 ]
526
527 if (current_cpu == "arm64") {
528 deps += [ "../sdk:metal_objc" ]
529 }
530 }
531
532 ios_app_bundle("ObjCNativeAPIDemo") {
533 testonly = true
534 sources = [
535 "objcnativeapi/objc/main.m",
536 ]
537
538 info_plist = "objcnativeapi/Info.plist"
539
540 configs += [ "..:common_config" ]
541 public_configs = [ "..:common_inherited_config" ]
542
543 deps = [
544 ":ObjCNativeAPIDemo_lib",
545 ]
546
547 if (target_cpu == "x86") {
548 deps += [ "//testing/iossim:iossim" ]
549 }
550 }
tkchin2ddfdba2016-08-07 21:37:45 -0700551 }
552
553 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800554 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800555 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700556 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200557 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
558 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
559 "objc/AppRTCMobile/mac/APPRTCViewController.h",
560 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700561 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700562 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700563 deps = [
564 ":apprtc_common",
565 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100566 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100567 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100568 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700569 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100570 "../sdk:videocapture_objc",
571 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100572 "../sdk:videocodec_objc",
573 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700574 ]
575 }
576
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200577 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800578 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200579 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700580
tkchin2ddfdba2016-08-07 21:37:45 -0700581 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200582 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700583 ]
584
585 public_configs = [ "..:common_inherited_config" ]
586
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200587 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700588
589 libs = [ "AppKit.framework" ]
590
591 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800592 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700593 ]
594 }
595 }
596
597 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200598 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700599 }
600
601 config("socketrocket_warning_config") {
602 # GN orders flags on a target before flags from configs. The default config
603 # adds these flags so to cancel them out they need to come from a config and
604 # cannot be on the target directly.
605 cflags = [
606 "-Wno-deprecated-declarations",
607 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700608 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800609 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700610 ]
611
henrika27d8b612016-09-21 04:13:00 -0700612 cflags_objc = [
613 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
614 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700615 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700616 }
617
kjellanderb62dbbe2016-09-23 00:38:52 -0700618 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800619 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700620 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200621 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
622 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700623 ]
kthelgasonc0977102017-04-24 00:57:16 -0700624 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700625 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700626
627 libs = [
628 "CFNetwork.framework",
629 "icucore",
630 ]
631 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800632
633 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800634 # TODO(kthelgason): compile xctests on mac when chromium supports it.
635 if (is_ios) {
636 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100637 # iOS must use WebRTC.framework which is dynamically linked.
638 # 'gn check' is disabled in order to avoid confusion and
639 # errors caused by multiple implementations.
640 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800641 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800642 include_dirs = [
643 "objc/AppRTCMobile",
644 "objc/AppRTCMobile/ios",
645 ]
646 testonly = true
647 sources = [
648 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100649 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800650 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
651 ]
kjellander1993b1d2017-03-06 00:29:21 -0800652 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800653 ":AppRTCMobile_ios_frameworks",
654 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100655 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100656 "../rtc_base:rtc_base",
657 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800658 "//build/config/ios:xctest",
659 "//third_party/ocmock",
660 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800661 }
662
kthelgason4065a572017-02-14 04:58:56 -0800663 rtc_ios_xctest_test("apprtcmobile_tests") {
664 info_plist = "objc/AppRTCMobile/ios/Info.plist"
665 sources = [
666 "objc/AppRTCMobile/ios/main.m",
667 ]
668 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100669 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800670 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100671 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800672 ]
673 ldflags = [ "-all_load" ]
674 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800675 }
676 }
tkchin2ddfdba2016-08-07 21:37:45 -0700677}
kthelgason0727f152016-08-08 09:03:23 -0700678
679if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700680 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700681 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700682 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700683 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700684 # Disable warnings failing when compiling with Clang on Windows.
685 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
686 "-Wno-format",
687
688 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
689 # for -Wno-reorder and -Wno-sign-compare
690 "-Wno-reorder",
691 "-Wno-sign-compare",
692 ]
693 }
kjellanderd4626e52016-09-07 02:33:01 -0700694 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700695 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700696 # Needed to compile on Linux 32-bit.
697 "-Wno-sentinel",
698 ]
699 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700700 }
701
ehmaldonado38a21322016-09-02 04:10:34 -0700702 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800703 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700704 sources = [
705 "peerconnection/client/conductor.cc",
706 "peerconnection/client/conductor.h",
707 "peerconnection/client/defaults.cc",
708 "peerconnection/client/defaults.h",
709 "peerconnection/client/peer_connection_client.cc",
710 "peerconnection/client/peer_connection_client.h",
711 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700712
kjellandere40a7ee2016-10-16 23:56:12 -0700713 if (!build_with_chromium && is_clang) {
714 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700715 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700716 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100717 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100718 "../api:libjingle_peerconnection_api",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200719 "../api/video:video_frame_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100720 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100721 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100722 ]
kthelgason0727f152016-08-08 09:03:23 -0700723 if (is_win) {
724 sources += [
725 "peerconnection/client/flagdefs.h",
726 "peerconnection/client/main.cc",
727 "peerconnection/client/main_wnd.cc",
728 "peerconnection/client/main_wnd.h",
729 ]
kthelgason0727f152016-08-08 09:03:23 -0700730 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700731 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700732 }
733 if (is_linux) {
734 sources += [
735 "peerconnection/client/linux/main.cc",
736 "peerconnection/client/linux/main_wnd.cc",
737 "peerconnection/client/linux/main_wnd.h",
738 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200739 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700740 libs = [
741 "X11",
742 "Xcomposite",
743 "Xext",
744 "Xrender",
745 ]
thomasandersonef16e992016-12-13 02:57:43 -0800746 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700747 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700748 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800749
750 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100751 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700752 "../api:libjingle_peerconnection_test_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200753 "../api/audio_codecs:builtin_audio_decoder_factory",
754 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200755 "../api/video:video_frame",
Anders Carlsson67537952018-05-03 11:28:29 +0200756 "../api/video_codecs:builtin_video_decoder_factory",
757 "../api/video_codecs:builtin_video_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100758 "../media:rtc_audio_video",
Anders Carlsson67537952018-05-03 11:28:29 +0200759 "../modules/audio_device:audio_device",
760 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700761 "../modules/video_capture:video_capture_module",
762 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700763 "../rtc_base:rtc_base",
764 "../rtc_base:rtc_base_approved",
765 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700766 "../system_wrappers:field_trial_default",
767 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000768 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800769 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800770 ]
kthelgason0727f152016-08-08 09:03:23 -0700771 }
kjellanderd4626e52016-09-07 02:33:01 -0700772
ehmaldonado38a21322016-09-02 04:10:34 -0700773 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800774 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700775 sources = [
776 "peerconnection/server/data_socket.cc",
777 "peerconnection/server/data_socket.h",
778 "peerconnection/server/main.cc",
779 "peerconnection/server/peer_channel.cc",
780 "peerconnection/server/peer_channel.h",
781 "peerconnection/server/utils.cc",
782 "peerconnection/server/utils.h",
783 ]
784 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700785 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700786 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100787 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700788 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700789 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700790 if (!build_with_chromium && is_clang) {
791 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700792 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700793 }
794 }
ehmaldonado38a21322016-09-02 04:10:34 -0700795 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800796 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700797 sources = [
798 "relayserver/relayserver_main.cc",
799 ]
800 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700801 "../p2p:rtc_p2p",
802 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700803 "../rtc_base:rtc_base",
804 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700805 "../system_wrappers:field_trial_default",
806 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000807 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700808 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700809 if (!build_with_chromium && is_clang) {
810 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700811 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700812 }
813 }
ehmaldonado38a21322016-09-02 04:10:34 -0700814 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800815 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700816 sources = [
817 "turnserver/turnserver_main.cc",
818 ]
819 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700820 "../p2p:rtc_p2p",
821 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700822 "../rtc_base:rtc_base",
823 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700824 "../system_wrappers:field_trial_default",
825 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000826 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700827 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700828 if (!build_with_chromium && is_clang) {
829 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700830 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700831 }
832 }
ehmaldonado38a21322016-09-02 04:10:34 -0700833 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800834 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700835 sources = [
836 "stunserver/stunserver_main.cc",
837 ]
838 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700839 "../p2p:rtc_p2p",
840 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700841 "../rtc_base:rtc_base",
842 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700843 "../system_wrappers:field_trial_default",
844 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000845 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700846 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700847 if (!build_with_chromium && is_clang) {
848 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700849 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700850 }
851 }
852}
charujainaca3a242016-11-01 03:09:15 -0700853
qiangchen42f96d52017-08-08 17:08:03 -0700854if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700855 rtc_shared_library("webrtc_unity_plugin") {
856 testonly = true
857 sources = [
858 "unityplugin/simple_peer_connection.cc",
859 "unityplugin/simple_peer_connection.h",
860 "unityplugin/unity_plugin_apis.cc",
861 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700862 "unityplugin/video_observer.cc",
863 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700864 ]
qiangchen42f96d52017-08-08 17:08:03 -0700865
866 if (is_android) {
867 sources += [
868 "unityplugin/classreferenceholder.cc",
869 "unityplugin/classreferenceholder.h",
870 "unityplugin/jni_onload.cc",
871 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800872 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700873 }
874
gyzhouad7cad82017-05-11 16:10:03 -0700875 if (!build_with_chromium && is_clang) {
876 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
877 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
878 }
qiangchen42f96d52017-08-08 17:08:03 -0700879 if (is_win) {
qiangchen42f96d52017-08-08 17:08:03 -0700880 configs += [
881 "//build/config/win:windowed",
882 ":peerconnection_client_warnings_config",
883 ]
884 }
gyzhouad7cad82017-05-11 16:10:03 -0700885 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100886 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700887 "../api:libjingle_peerconnection_test_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800888 "../api/audio_codecs:builtin_audio_decoder_factory",
889 "../api/audio_codecs:builtin_audio_encoder_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200890 "../api/video:video_frame",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100891 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100892 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700893 "../media:rtc_media",
894 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800895 "../modules/audio_device:audio_device",
896 "../modules/audio_processing:audio_processing",
jianjun.zhuc0247402017-07-11 06:20:45 -0700897 "../modules/video_capture:video_capture_module",
898 "../pc:libjingle_peerconnection",
qiangchen42f96d52017-08-08 17:08:03 -0700899 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700900 "../system_wrappers:field_trial_default",
901 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000902 "../system_wrappers:runtime_enabled_features_default",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200903 "//third_party/abseil-cpp/absl/memory",
gyzhouad7cad82017-05-11 16:10:03 -0700904 ]
qiangchen42f96d52017-08-08 17:08:03 -0700905 if (is_android) {
George Zhou2770c3d2018-03-07 09:58:54 -0800906 deps += [
907 "../modules/utility:utility",
908 "../sdk/android:libjingle_peerconnection_jni",
909 ]
qiangchen42f96d52017-08-08 17:08:03 -0700910 }
911 }
912}
913
914if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000915 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700916 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
917 deps = [
918 "../rtc_base:base_java",
919 "../sdk/android:libjingle_peerconnection_java",
920 ]
921 }
922
923 dist_jar("libwebrtc_unity") {
924 _target_dir_name = get_label_info(":$target_name", "dir")
925 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
George Zhou2770c3d2018-03-07 09:58:54 -0800926 direct_deps_only = false
qiangchen42f96d52017-08-08 17:08:03 -0700927 use_interface_jars = false
George Zhou2770c3d2018-03-07 09:58:54 -0800928 use_unprocessed_jars = false
Oleh Prypin86021d92017-09-24 22:29:06 +0200929 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700930 deps = [
931 ":webrtc_unity_java",
Paulina Hensman17071682018-03-26 16:10:29 +0200932 "../modules/audio_device:audio_device_java",
qiangchen42f96d52017-08-08 17:08:03 -0700933 "../rtc_base:base_java",
934 "../sdk/android:libjingle_peerconnection_java",
935 "../sdk/android:libjingle_peerconnection_metrics_default_java",
936 ]
gyzhouad7cad82017-05-11 16:10:03 -0700937 }
938}
939
charujainaca3a242016-11-01 03:09:15 -0700940if (!build_with_chromium) {
941 # Doesn't build within Chrome on Win.
942 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800943 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700944 sources = [
945 "stunprober/main.cc",
946 ]
947
948 if (!build_with_chromium && is_clang) {
949 # Suppress warnings from Chrome's Clang plugins.
950 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
951 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
952 }
953
954 deps = [
955 "../p2p:libstunprober",
956 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100957 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700958 "../rtc_base:rtc_base",
959 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100960 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700961 "../system_wrappers:field_trial_default",
962 ]
963 }
964}