blob: 2bc3f846a3d33fc13dfca1b1902c478a23ad735b [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",
kjellander6ceab082016-10-28 05:44:03 -070030 ]
31 }
32
charujainaca3a242016-11-01 03:09:15 -070033 if (!build_with_chromium) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010034 deps += [ ":stun_prober" ]
charujainaca3a242016-11-01 03:09:15 -070035 }
36
kjellander6ceab082016-10-28 05:44:03 -070037 if (is_ios || (is_mac && target_cpu != "x86")) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010038 deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020039 }
kjellander6ceab082016-10-28 05:44:03 -070040
41 if (is_linux || is_win) {
Mirko Bonadei1a339c32017-12-14 13:06:10 +010042 deps += [
kthelgason0727f152016-08-08 09:03:23 -070043 ":peerconnection_client",
44 ":peerconnection_server",
45 ":relayserver",
46 ":stunserver",
47 ":turnserver",
48 ]
49 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020050}
51
tkchin2ddfdba2016-08-07 21:37:45 -070052if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000053 rtc_android_apk("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -080054 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020055 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020056 android_manifest = "androidapp/AndroidManifest.xml"
57
58 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020059 ":AppRTCMobile_javalib",
60 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070061 "../rtc_base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020062 "//base:base_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020063 ]
64
jianjun.zhuc0247402017-07-11 06:20:45 -070065 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020066 }
67
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +000068 rtc_android_library("AppRTCMobile_javalib") {
kjellander1993b1d2017-03-06 00:29:21 -080069 testonly = true
Mirko Bonadei4f024ef2018-01-04 13:12:03 +010070 android_manifest_for_lint = "androidapp/AndroidManifest.xml"
sakal07a050f2017-02-13 05:58:27 -080071
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020072 java_files = [
73 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikac3c2f312016-12-14 07:36:56 -080074 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020075 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
76 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
77 "androidapp/src/org/appspot/apprtc/CallActivity.java",
78 "androidapp/src/org/appspot/apprtc/CallFragment.java",
79 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
80 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
81 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
82 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
83 "androidapp/src/org/appspot/apprtc/HudFragment.java",
84 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020085 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
Qingsi Wanga4e72b72018-02-12 10:34:18 -080086 "androidapp/src/org/appspot/apprtc/RtcEventLog.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020087 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
88 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
89 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
90 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
91 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
92 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
93 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
94 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 ]
96
97 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020098 ":AppRTCMobile_resources",
jianjun.zhuc0247402017-07-11 06:20:45 -070099 "../modules/audio_device:audio_device_java",
100 "../rtc_base:base_java",
101 "../sdk/android:libjingle_peerconnection_java",
102 "../sdk/android:libjingle_peerconnection_metrics_default_java",
103 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200104 ]
105 }
106
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200107 android_resources("AppRTCMobile_resources") {
kjellander1993b1d2017-03-06 00:29:21 -0800108 testonly = true
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200109 resource_dirs = [ "androidapp/res" ]
110 custom_package = "org.appspot.apprtc"
111 }
112
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000113 rtc_instrumentation_test_apk("AppRTCMobileTest") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200114 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200115 android_manifest = "androidtests/AndroidManifest.xml"
116
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100117 java_files = [
118 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
119 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200120
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200121 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200122
123 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200124 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700125 "../sdk/android:libjingle_peerconnection_java",
sakalcb79d512017-01-11 06:21:26 -0800126 "//third_party/android_support_test_runner:runner_java",
127 "//third_party/junit",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200128 ]
129 }
mandermoa6069e82017-01-16 02:23:09 -0800130
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000131 rtc_instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
mandermoa6069e82017-01-16 02:23:09 -0800132 apk_name = "AppRTCMobileTestStubbedVideoIO"
133 android_manifest = "androidtests/AndroidManifest.xml"
134
oprypin30cda5e2017-04-24 04:15:13 -0700135 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermoa6069e82017-01-16 02:23:09 -0800136
137 apk_under_test = ":AppRTCMobile"
138
139 deps = [
140 ":AppRTCMobile_javalib",
jianjun.zhuc0247402017-07-11 06:20:45 -0700141 "../sdk/android:libjingle_peerconnection_java",
mandermoa6069e82017-01-16 02:23:09 -0800142 "//third_party/android_support_test_runner:rules_java",
143 "//third_party/android_support_test_runner:runner_java",
144 "//third_party/espresso:espresso_all_java",
145 "//third_party/hamcrest:hamcrest_java",
146 "//third_party/junit",
mandermoa6069e82017-01-16 02:23:09 -0800147 ]
148
149 data = [
Edward Lemur70ba9b42018-01-22 13:46:58 +0100150 "../build/android/adb_reverse_forwarder.py",
151 "../examples/androidtests/video_quality_loopback_test.py",
Mirko Bonadei92ea95e2017-09-15 06:47:31 +0200152 "../resources/reference_video_640x360_30fps.y4m",
Edward Lemur70ba9b42018-01-22 13:46:58 +0100153 "../rtc_tools/barcode_tools/barcode_decoder.py",
154 "../rtc_tools/barcode_tools/helper_functions.py",
155 "../rtc_tools/compare_videos.py",
156 "../rtc_tools/testing/prebuilt_apprtc.zip",
157 "../rtc_tools/testing/golang/linux/go.tar.gz",
158 "../rtc_tools/testing/build_apprtc.py",
159 "../rtc_tools/testing/utils.py",
160 "../tools_webrtc/video_quality_toolchain/linux/ffmpeg",
161 "../tools_webrtc/video_quality_toolchain/linux/frame_analyzer",
162 "../tools_webrtc/video_quality_toolchain/linux/zxing",
mandermoa6069e82017-01-16 02:23:09 -0800163 ]
164 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200165}
tkchin2ddfdba2016-08-07 21:37:45 -0700166
167if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin2ddfdba2016-08-07 21:37:45 -0700168 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200169 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700170 }
171
kjellanderb62dbbe2016-09-23 00:38:52 -0700172 rtc_static_library("apprtc_common") {
kjellander1993b1d2017-03-06 00:29:21 -0800173 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700174 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200175 "objc/AppRTCMobile/common/ARDUtilities.h",
176 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700177 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700178 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700179
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200180 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100181 # iOS must use WebRTC.framework which is dynamically linked.
182 # 'gn check' is disabled in order to avoid confusion and
183 # errors caused by multiple implementations.
184 check_includes = false
kthelgason5901d9d2017-08-16 07:28:03 -0700185 deps = [
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100186 "../sdk:framework_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100187 "../system_wrappers:field_trial_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000188 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700189 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200190 } else {
kthelgason5901d9d2017-08-16 07:28:03 -0700191 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700192 "../sdk:common_objc",
kthelgason5901d9d2017-08-16 07:28:03 -0700193 "../system_wrappers:field_trial_default",
194 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000195 "../system_wrappers:runtime_enabled_features_default",
kthelgason5901d9d2017-08-16 07:28:03 -0700196 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200197 }
tkchin2ddfdba2016-08-07 21:37:45 -0700198 }
199
200 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200201 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700202
203 # GN orders flags on a target before flags from configs. The default config
204 # adds these flags so to cancel them out they need to come from a config and
205 # cannot be on the target directly.
206 cflags = [
207 "-Wno-sign-compare",
208 "-Wno-unused-variable",
209 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700210 }
211
kjellanderb62dbbe2016-09-23 00:38:52 -0700212 rtc_static_library("apprtc_signaling") {
kjellander1993b1d2017-03-06 00:29:21 -0800213 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700214 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200215 "objc/AppRTCMobile/ARDAppClient+Internal.h",
216 "objc/AppRTCMobile/ARDAppClient.h",
217 "objc/AppRTCMobile/ARDAppClient.m",
218 "objc/AppRTCMobile/ARDAppEngineClient.h",
219 "objc/AppRTCMobile/ARDAppEngineClient.m",
220 "objc/AppRTCMobile/ARDBitrateTracker.h",
221 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakalc522e752017-04-05 12:17:48 -0700222 "objc/AppRTCMobile/ARDCaptureController.h",
223 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200224 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
225 "objc/AppRTCMobile/ARDJoinResponse.h",
226 "objc/AppRTCMobile/ARDJoinResponse.m",
227 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
228 "objc/AppRTCMobile/ARDMessageResponse.h",
229 "objc/AppRTCMobile/ARDMessageResponse.m",
230 "objc/AppRTCMobile/ARDRoomServerClient.h",
sakalc4adacf2017-03-28 01:22:48 -0700231 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
232 "objc/AppRTCMobile/ARDSettingsModel.h",
233 "objc/AppRTCMobile/ARDSettingsModel.m",
234 "objc/AppRTCMobile/ARDSettingsStore.h",
235 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200236 "objc/AppRTCMobile/ARDSignalingChannel.h",
237 "objc/AppRTCMobile/ARDSignalingMessage.h",
238 "objc/AppRTCMobile/ARDSignalingMessage.m",
239 "objc/AppRTCMobile/ARDStatsBuilder.h",
240 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasoncc882af2017-01-13 05:59:46 -0800241 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200242 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasoncc882af2017-01-13 05:59:46 -0800243 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200244 "objc/AppRTCMobile/ARDWebSocketChannel.h",
245 "objc/AppRTCMobile/ARDWebSocketChannel.m",
246 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
247 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
248 "objc/AppRTCMobile/RTCIceServer+JSON.h",
249 "objc/AppRTCMobile/RTCIceServer+JSON.m",
250 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
251 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
252 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
253 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700254 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700255 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700256 deps = [
257 ":apprtc_common",
258 ":socketrocket",
259 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200260 if (is_ios) {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100261 # iOS must use WebRTC.framework which is dynamically linked.
262 # 'gn check' is disabled in order to avoid confusion and
263 # errors caused by multiple implementations.
264 check_includes = false
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100265 deps += [
266 ":AppRTCMobile_ios_frameworks",
267 "../sdk:framework_objc",
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200268 ]
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100269 } else {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100270 deps += [
271 "../sdk:common_objc",
272 "../sdk:mediaconstraints_objc",
273 "../sdk:peerconnectionfactory_base_objc",
274 "../sdk:videocapture_objc",
275 "../sdk:videocodec_objc",
276 ]
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200277 }
tkchin2ddfdba2016-08-07 21:37:45 -0700278 libs = [ "QuartzCore.framework" ]
279 }
280
281 if (is_ios) {
denicija77bfd7c2016-11-15 00:41:26 -0800282 rtc_static_library("AppRTCMobile_lib") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100283 # iOS must use WebRTC.framework which is dynamically linked.
284 # 'gn check' is disabled in order to avoid confusion and
285 # errors caused by multiple implementations.
286 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800287 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700288 sources = [
Patrik Höglund49acb1e2018-01-02 14:41:54 +0100289 "objc/AppRTCMobile/ios/ARDAppDelegate.h",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200290 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
Daniela012b56b2017-11-15 13:15:24 +0100291 "objc/AppRTCMobile/ios/ARDFileCaptureController.h",
292 "objc/AppRTCMobile/ios/ARDFileCaptureController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200293 "objc/AppRTCMobile/ios/ARDMainView.h",
294 "objc/AppRTCMobile/ios/ARDMainView.m",
295 "objc/AppRTCMobile/ios/ARDMainViewController.h",
296 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700297 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
298 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200299 "objc/AppRTCMobile/ios/ARDStatsView.h",
300 "objc/AppRTCMobile/ios/ARDStatsView.m",
301 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
302 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
303 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
304 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
Anders Carlsson6bf43d22017-10-16 13:51:43 +0200305 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.h",
306 "objc/AppRTCMobile/ios/RTCVideoCodecInfo+HumanReadable.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200307 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
308 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija77bfd7c2016-11-15 00:41:26 -0800309 ]
denicija77bfd7c2016-11-15 00:41:26 -0800310
311 deps = [
Kári Tristan Helgason946923a2017-06-02 14:05:56 +0200312 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800313 ":apprtc_common",
314 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100315 "../sdk:framework_objc",
denicija77bfd7c2016-11-15 00:41:26 -0800316 ]
317 }
318
319 ios_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800320 testonly = true
denicija77bfd7c2016-11-15 00:41:26 -0800321 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200322 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700323 ]
324
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200325 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700326
denicija77bfd7c2016-11-15 00:41:26 -0800327 configs += [ "..:common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700328 public_configs = [ "..:common_inherited_config" ]
329
330 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200331 ":AppRTCMobile_ios_bundle_data",
kthelgasond3adbfb2017-01-26 01:14:04 -0800332 ":AppRTCMobile_ios_frameworks",
denicija77bfd7c2016-11-15 00:41:26 -0800333 ":AppRTCMobile_lib",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100334 "../sdk:framework_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700335 ]
336
337 if (target_cpu == "x86") {
338 deps += [ "//testing/iossim:iossim" ]
339 }
340 }
341
kthelgasond3adbfb2017-01-26 01:14:04 -0800342 bundle_data("AppRTCMobile_ios_frameworks") {
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100343 deps = [
kthelgason36d658d2017-08-24 05:43:45 -0700344 "../sdk:framework_objc+link",
kthelgasond3adbfb2017-01-26 01:14:04 -0800345 ]
346 sources = [
wjywbsbef8a5d2017-10-09 02:32:28 -0400347 "$root_build_dir/WebRTC.framework",
kthelgasond3adbfb2017-01-26 01:14:04 -0800348 ]
349 outputs = [
350 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
351 ]
352 }
353
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200354 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700355 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200356 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
Daniela012b56b2017-11-15 13:15:24 +0100357
358 # Sample video taken from https://media.xiph.org/video/derf/
359 "objc/AppRTCMobile/ios/resources/foreman.mp4",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200360 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
361 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
362 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
363 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
364 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
365 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
366 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700367 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
368 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200369 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
370 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
371 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
372 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
373 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscb5ed9052017-08-15 04:07:12 -0700374 "objc/Icon-120.png",
375 "objc/Icon-180.png",
tkchin2ddfdba2016-08-07 21:37:45 -0700376 "objc/Icon.png",
377 ]
378 outputs = [
379 "{{bundle_resources_dir}}/{{source_file_part}}",
380 ]
381 }
382 }
383
384 if (is_mac) {
denicija77bfd7c2016-11-15 00:41:26 -0800385 rtc_static_library("AppRTCMobile_lib") {
kjellander1993b1d2017-03-06 00:29:21 -0800386 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700387 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200388 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
389 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
390 "objc/AppRTCMobile/mac/APPRTCViewController.h",
391 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700392 ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700393 configs += [ "..:common_objc" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700394 deps = [
395 ":apprtc_common",
396 ":apprtc_signaling",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100397 "../sdk:default_codec_factory_objc",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100398 "../sdk:metal_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100399 "../sdk:peerconnectionfactory_base_objc",
kthelgason36d658d2017-08-24 05:43:45 -0700400 "../sdk:ui_objc",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100401 "../sdk:videocapture_objc",
402 "../sdk:videocodec_objc",
Kári Tristan Helgason99bf77c2018-02-16 10:49:22 +0100403 "../sdk:videocodec_objc",
404 "../sdk:videotoolbox_objc",
tkchin2ddfdba2016-08-07 21:37:45 -0700405 ]
406 }
407
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200408 mac_app_bundle("AppRTCMobile") {
kjellander1993b1d2017-03-06 00:29:21 -0800409 testonly = true
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200410 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700411
tkchin2ddfdba2016-08-07 21:37:45 -0700412 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200413 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700414 ]
415
416 public_configs = [ "..:common_inherited_config" ]
417
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200418 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700419
420 libs = [ "AppKit.framework" ]
421
422 deps = [
denicija77bfd7c2016-11-15 00:41:26 -0800423 ":AppRTCMobile_lib",
tkchin2ddfdba2016-08-07 21:37:45 -0700424 ]
425 }
426 }
427
428 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200429 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700430 }
431
432 config("socketrocket_warning_config") {
433 # GN orders flags on a target before flags from configs. The default config
434 # adds these flags so to cancel them out they need to come from a config and
435 # cannot be on the target directly.
436 cflags = [
437 "-Wno-deprecated-declarations",
438 "-Wno-nonnull",
tkchin2ddfdba2016-08-07 21:37:45 -0700439 "-Wno-semicolon-before-method-body",
kthelgasone47de1a2017-02-24 01:56:01 -0800440 "-Wno-unused-variable",
tkchin2ddfdba2016-08-07 21:37:45 -0700441 ]
442
henrika27d8b612016-09-21 04:13:00 -0700443 cflags_objc = [
444 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
445 "-Wno-objc-missing-property-synthesis",
henrika27d8b612016-09-21 04:13:00 -0700446 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700447 }
448
kjellanderb62dbbe2016-09-23 00:38:52 -0700449 rtc_static_library("socketrocket") {
kjellander1993b1d2017-03-06 00:29:21 -0800450 testonly = true
tkchin2ddfdba2016-08-07 21:37:45 -0700451 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200452 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
453 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700454 ]
kthelgasonc0977102017-04-24 00:57:16 -0700455 configs += [ ":socketrocket_warning_config" ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700456 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700457
458 libs = [
459 "CFNetwork.framework",
460 "icucore",
461 ]
462 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800463
464 if (rtc_include_tests) {
kthelgason4065a572017-02-14 04:58:56 -0800465 # TODO(kthelgason): compile xctests on mac when chromium supports it.
466 if (is_ios) {
467 rtc_source_set("apprtcmobile_test_sources") {
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100468 # iOS must use WebRTC.framework which is dynamically linked.
469 # 'gn check' is disabled in order to avoid confusion and
470 # errors caused by multiple implementations.
471 check_includes = false
kjellander1993b1d2017-03-06 00:29:21 -0800472 testonly = true
kthelgason4065a572017-02-14 04:58:56 -0800473 include_dirs = [
474 "objc/AppRTCMobile",
475 "objc/AppRTCMobile/ios",
476 ]
477 testonly = true
478 sources = [
479 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
Daniela012b56b2017-11-15 13:15:24 +0100480 "objc/AppRTCMobile/tests/ARDFileCaptureController_xctest.mm",
kthelgason4065a572017-02-14 04:58:56 -0800481 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
482 ]
kjellander1993b1d2017-03-06 00:29:21 -0800483 deps = [
kthelgason4065a572017-02-14 04:58:56 -0800484 ":AppRTCMobile_ios_frameworks",
485 ":AppRTCMobile_lib",
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100486 ":apprtc_signaling",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100487 "../rtc_base:rtc_base",
488 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800489 "//build/config/ios:xctest",
490 "//third_party/ocmock",
491 ]
adam.fedorbcc5d872016-11-07 14:53:28 -0800492 }
493
kthelgason4065a572017-02-14 04:58:56 -0800494 rtc_ios_xctest_test("apprtcmobile_tests") {
495 info_plist = "objc/AppRTCMobile/ios/Info.plist"
496 sources = [
497 "objc/AppRTCMobile/ios/main.m",
498 ]
499 deps = [
Mirko Bonadeicbaaaed2018-02-19 15:14:04 +0100500 ":AppRTCMobile_lib",
kthelgason4065a572017-02-14 04:58:56 -0800501 ":apprtcmobile_test_sources",
Mirko Bonadei1a339c32017-12-14 13:06:10 +0100502 "../sdk:framework_objc",
kthelgason4065a572017-02-14 04:58:56 -0800503 ]
504 ldflags = [ "-all_load" ]
505 }
adam.fedorbcc5d872016-11-07 14:53:28 -0800506 }
507 }
tkchin2ddfdba2016-08-07 21:37:45 -0700508}
kthelgason0727f152016-08-08 09:03:23 -0700509
510if (is_linux || is_win) {
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700511 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700512 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700513 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700514 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700515 # Disable warnings failing when compiling with Clang on Windows.
516 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
517 "-Wno-format",
518
519 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
520 # for -Wno-reorder and -Wno-sign-compare
521 "-Wno-reorder",
522 "-Wno-sign-compare",
523 ]
524 }
kjellanderd4626e52016-09-07 02:33:01 -0700525 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700526 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700527 # Needed to compile on Linux 32-bit.
528 "-Wno-sentinel",
529 ]
530 }
kjellander4a9abad2016-09-18 08:12:29 -0700531
532 if (is_clang) {
533 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
534 # set of warnings.
535 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
536 cflags += [ "-Wno-inconsistent-missing-override" ]
537 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700538 }
539
ehmaldonado38a21322016-09-02 04:10:34 -0700540 rtc_executable("peerconnection_client") {
kjellander1993b1d2017-03-06 00:29:21 -0800541 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700542 sources = [
543 "peerconnection/client/conductor.cc",
544 "peerconnection/client/conductor.h",
545 "peerconnection/client/defaults.cc",
546 "peerconnection/client/defaults.h",
547 "peerconnection/client/peer_connection_client.cc",
548 "peerconnection/client/peer_connection_client.h",
549 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700550
kjellandere40a7ee2016-10-16 23:56:12 -0700551 if (!build_with_chromium && is_clang) {
552 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700553 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700554 }
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100555 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100556 "../api:libjingle_peerconnection_api",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100557 "../api:video_frame_api_i420",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100558 "../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +0100559 "../rtc_base:stringutils",
Patrik Höglundb5b5bce2017-11-13 10:19:58 +0100560 ]
kthelgason0727f152016-08-08 09:03:23 -0700561 if (is_win) {
562 sources += [
563 "peerconnection/client/flagdefs.h",
564 "peerconnection/client/main.cc",
565 "peerconnection/client/main_wnd.cc",
566 "peerconnection/client/main_wnd.h",
567 ]
568 cflags = [ "/wd4245" ]
569 configs += [ "//build/config/win:windowed" ]
jianjun.zhuc0247402017-07-11 06:20:45 -0700570 deps += [ "../media:rtc_media_base" ]
kthelgason0727f152016-08-08 09:03:23 -0700571 }
572 if (is_linux) {
573 sources += [
574 "peerconnection/client/linux/main.cc",
575 "peerconnection/client/linux/main_wnd.cc",
576 "peerconnection/client/linux/main_wnd.h",
577 ]
Henrik Kjellanderefbde2c2017-03-27 08:28:27 +0200578 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason0727f152016-08-08 09:03:23 -0700579 libs = [
580 "X11",
581 "Xcomposite",
582 "Xext",
583 "Xrender",
584 ]
thomasandersonef16e992016-12-13 02:57:43 -0800585 deps += [ "//build/config/linux/gtk" ]
kthelgason0727f152016-08-08 09:03:23 -0700586 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700587 configs += [ ":peerconnection_client_warnings_config" ]
kjellander1993b1d2017-03-06 00:29:21 -0800588
589 deps += [
Niels Möller8366e172018-02-14 12:20:13 +0100590 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700591 "../api:libjingle_peerconnection_test_api",
592 "../api:video_frame_api",
Karl Wiberg1b0eae32017-10-17 14:48:54 +0200593 "../api/audio_codecs:builtin_audio_decoder_factory",
594 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100595 "../media:rtc_audio_video",
jianjun.zhuc0247402017-07-11 06:20:45 -0700596 "../modules/video_capture:video_capture_module",
597 "../pc:libjingle_peerconnection",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700598 "../rtc_base:rtc_base",
599 "../rtc_base:rtc_base_approved",
600 "../rtc_base:rtc_json",
jianjun.zhuc0247402017-07-11 06:20:45 -0700601 "../system_wrappers:field_trial_default",
602 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000603 "../system_wrappers:runtime_enabled_features_default",
kjellander1993b1d2017-03-06 00:29:21 -0800604 "//third_party/libyuv",
kjellander1993b1d2017-03-06 00:29:21 -0800605 ]
kthelgason0727f152016-08-08 09:03:23 -0700606 }
kjellanderd4626e52016-09-07 02:33:01 -0700607
ehmaldonado38a21322016-09-02 04:10:34 -0700608 rtc_executable("peerconnection_server") {
kjellander1993b1d2017-03-06 00:29:21 -0800609 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700610 sources = [
611 "peerconnection/server/data_socket.cc",
612 "peerconnection/server/data_socket.h",
613 "peerconnection/server/main.cc",
614 "peerconnection/server/peer_channel.cc",
615 "peerconnection/server/peer_channel.h",
616 "peerconnection/server/utils.cc",
617 "peerconnection/server/utils.h",
618 ]
619 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700620 "..:webrtc_common",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700621 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100622 "../rtc_base:stringutils",
jianjun.zhuc0247402017-07-11 06:20:45 -0700623 "../rtc_tools:command_line_parser",
kthelgason0727f152016-08-08 09:03:23 -0700624 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700625 if (!build_with_chromium && is_clang) {
626 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700627 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700628 }
629 }
ehmaldonado38a21322016-09-02 04:10:34 -0700630 rtc_executable("relayserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800631 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700632 sources = [
633 "relayserver/relayserver_main.cc",
634 ]
635 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700636 "../p2p:rtc_p2p",
637 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700638 "../rtc_base:rtc_base",
639 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700640 "../system_wrappers:field_trial_default",
641 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000642 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700643 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700644 if (!build_with_chromium && is_clang) {
645 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700646 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700647 }
648 }
ehmaldonado38a21322016-09-02 04:10:34 -0700649 rtc_executable("turnserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800650 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700651 sources = [
652 "turnserver/turnserver_main.cc",
653 ]
654 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700655 "../p2p:rtc_p2p",
656 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700657 "../rtc_base:rtc_base",
658 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700659 "../system_wrappers:field_trial_default",
660 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000661 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700662 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700663 if (!build_with_chromium && is_clang) {
664 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700665 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700666 }
667 }
ehmaldonado38a21322016-09-02 04:10:34 -0700668 rtc_executable("stunserver") {
kjellander1993b1d2017-03-06 00:29:21 -0800669 testonly = true
kthelgason0727f152016-08-08 09:03:23 -0700670 sources = [
671 "stunserver/stunserver_main.cc",
672 ]
673 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700674 "../p2p:rtc_p2p",
675 "../pc:rtc_pc",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700676 "../rtc_base:rtc_base",
677 "../rtc_base:rtc_base_approved",
jianjun.zhuc0247402017-07-11 06:20:45 -0700678 "../system_wrappers:field_trial_default",
679 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000680 "../system_wrappers:runtime_enabled_features_default",
kthelgason0727f152016-08-08 09:03:23 -0700681 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700682 if (!build_with_chromium && is_clang) {
683 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700684 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700685 }
686 }
687}
charujainaca3a242016-11-01 03:09:15 -0700688
qiangchen42f96d52017-08-08 17:08:03 -0700689if (is_win || is_android) {
gyzhouad7cad82017-05-11 16:10:03 -0700690 rtc_shared_library("webrtc_unity_plugin") {
691 testonly = true
692 sources = [
693 "unityplugin/simple_peer_connection.cc",
694 "unityplugin/simple_peer_connection.h",
695 "unityplugin/unity_plugin_apis.cc",
696 "unityplugin/unity_plugin_apis.h",
gyzhoub38f3862017-07-25 16:04:31 -0700697 "unityplugin/video_observer.cc",
698 "unityplugin/video_observer.h",
gyzhouad7cad82017-05-11 16:10:03 -0700699 ]
qiangchen42f96d52017-08-08 17:08:03 -0700700
701 if (is_android) {
702 sources += [
703 "unityplugin/classreferenceholder.cc",
704 "unityplugin/classreferenceholder.h",
705 "unityplugin/jni_onload.cc",
706 ]
Qiang Chen43fb9122017-12-20 10:47:36 -0800707 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ]
qiangchen42f96d52017-08-08 17:08:03 -0700708 }
709
gyzhouad7cad82017-05-11 16:10:03 -0700710 if (!build_with_chromium && is_clang) {
711 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
712 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
713 }
qiangchen42f96d52017-08-08 17:08:03 -0700714 if (is_win) {
715 cflags = [ "/wd4245" ]
716 configs += [
717 "//build/config/win:windowed",
718 ":peerconnection_client_warnings_config",
719 ]
720 }
gyzhouad7cad82017-05-11 16:10:03 -0700721 deps = [
Mirko Bonadei34814c72018-01-11 10:13:56 +0100722 "../api:libjingle_peerconnection_api",
jianjun.zhuc0247402017-07-11 06:20:45 -0700723 "../api:libjingle_peerconnection_test_api",
724 "../api:video_frame_api",
Qiang Chen51e20462017-12-05 11:11:21 -0800725 "../api/audio_codecs:builtin_audio_decoder_factory",
726 "../api/audio_codecs:builtin_audio_encoder_factory",
Mirko Bonadei75baa492018-01-11 17:07:30 +0100727 "../media:rtc_audio_video",
Anders Carlssona114c882018-01-04 15:10:22 +0100728 "../media:rtc_internal_video_codecs",
jianjun.zhuc0247402017-07-11 06:20:45 -0700729 "../media:rtc_media",
730 "../media:rtc_media_base",
Qiang Chen43fb9122017-12-20 10:47:36 -0800731 "../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",
qiangchen42f96d52017-08-08 17:08:03 -0700735 "../rtc_base:rtc_base",
jianjun.zhuc0247402017-07-11 06:20:45 -0700736 "../system_wrappers:field_trial_default",
737 "../system_wrappers:metrics_default",
Ilya Nikolaevskiy2ffe3e82018-01-17 19:57:24 +0000738 "../system_wrappers:runtime_enabled_features_default",
gyzhouad7cad82017-05-11 16:10:03 -0700739 ]
qiangchen42f96d52017-08-08 17:08:03 -0700740 if (is_android) {
741 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
742 }
743 }
744}
745
746if (is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000747 rtc_android_library("webrtc_unity_java") {
qiangchen42f96d52017-08-08 17:08:03 -0700748 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
749 deps = [
750 "../rtc_base:base_java",
751 "../sdk/android:libjingle_peerconnection_java",
752 ]
753 }
754
755 dist_jar("libwebrtc_unity") {
756 _target_dir_name = get_label_info(":$target_name", "dir")
757 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
758 direct_deps_only = true
759 use_interface_jars = false
Oleh Prypin1e53f8a2017-12-21 22:06:21 +0100760 use_unprocessed_jars = true
Oleh Prypin86021d92017-09-24 22:29:06 +0200761 requires_android = true
qiangchen42f96d52017-08-08 17:08:03 -0700762 deps = [
763 ":webrtc_unity_java",
764 "../modules/audio_device:audio_device_java",
765 "../rtc_base:base_java",
766 "../sdk/android:libjingle_peerconnection_java",
767 "../sdk/android:libjingle_peerconnection_metrics_default_java",
768 ]
gyzhouad7cad82017-05-11 16:10:03 -0700769 }
770}
771
charujainaca3a242016-11-01 03:09:15 -0700772if (!build_with_chromium) {
773 # Doesn't build within Chrome on Win.
774 rtc_executable("stun_prober") {
kjellander1993b1d2017-03-06 00:29:21 -0800775 testonly = true
charujainaca3a242016-11-01 03:09:15 -0700776 sources = [
777 "stunprober/main.cc",
778 ]
779
780 if (!build_with_chromium && is_clang) {
781 # Suppress warnings from Chrome's Clang plugins.
782 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
783 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
784 }
785
786 deps = [
787 "../p2p:libstunprober",
788 "../p2p:rtc_p2p",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100789 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700790 "../rtc_base:rtc_base",
791 "../rtc_base:rtc_base_approved",
Patrik Höglund3e113432017-12-15 14:40:10 +0100792 "../rtc_base:stringutils",
charujainaca3a242016-11-01 03:09:15 -0700793 "../system_wrappers:field_trial_default",
794 ]
795 }
796}