blob: 3d49bc3b99d72156e6ce5bc49a4aa4a37e78a0f4 [file] [log] [blame]
Sami Kalliomaki1b868e32016-06-29 12:55:001# 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
mbonadei90cc2a92017-01-24 14:58:229import("../webrtc.gni")
Sami Kalliomaki1b868e32016-06-29 12:55:0010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
tkchin78fe5422016-08-08 04:37:4513} else if (is_mac) {
14 import("//build/config/mac/rules.gni")
15} else if (is_ios) {
16 import("//build/config/ios/rules.gni")
Sami Kalliomaki1b868e32016-06-29 12:55:0017}
18
19group("examples") {
kjellander67024052016-10-28 12:44:0320 # This target shall build all targets in examples.
21 testonly = true
kjellander4c5e7eb2016-09-15 07:53:2622 public_deps = []
Sami Kalliomaki1b868e32016-06-29 12:55:0023
tkchin78fe5422016-08-08 04:37:4524 if (is_android) {
kjellander67024052016-10-28 12:44:0325 public_deps += [
26 ":AppRTCMobile",
27 ":AppRTCMobileTest",
mandermo4b0d8ea2017-01-16 10:23:0928 ":AppRTCMobileTestStubbedVideoIO",
kjellander67024052016-10-28 12:44:0329 ]
30 }
31
charujaineceae882016-11-01 10:09:1532 if (!build_with_chromium) {
33 public_deps += [ ":stun_prober" ]
34 }
35
kjellander67024052016-10-28 12:44:0336 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertb502ce32016-09-27 08:10:4137 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki1b868e32016-06-29 12:55:0038 }
kjellander67024052016-10-28 12:44:0339
40 if (is_linux || is_win) {
kjellander4c5e7eb2016-09-15 07:53:2641 public_deps += [
kthelgason7a5c2ac2016-08-08 16:03:2342 ":peerconnection_client",
43 ":peerconnection_server",
44 ":relayserver",
45 ":stunserver",
46 ":turnserver",
47 ]
48 }
Sami Kalliomaki1b868e32016-06-29 12:55:0049}
50
tkchin78fe5422016-08-08 04:37:4551if (is_android) {
Magnus Jedvertb502ce32016-09-27 08:10:4152 android_apk("AppRTCMobile") {
kjellanderfe8285d2017-03-06 08:29:2153 testonly = true
Magnus Jedvertb502ce32016-09-27 08:10:4154 apk_name = "AppRTCMobile"
Sami Kalliomaki1b868e32016-06-29 12:55:0055 android_manifest = "androidapp/AndroidManifest.xml"
56
57 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:4158 ":AppRTCMobile_javalib",
59 ":AppRTCMobile_resources",
jianjun.zhu59d55752017-07-11 13:20:4560 "../rtc_base:base_java",
Sami Kalliomaki1b868e32016-06-29 12:55:0061 "//base:base_java",
Sami Kalliomaki1b868e32016-06-29 12:55:0062 ]
63
jianjun.zhu59d55752017-07-11 13:20:4564 shared_libraries = [ "../sdk/android:libjingle_peerconnection_so" ]
charujain9278d472017-08-25 13:21:5265
66 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148
67 no_build_hooks = true
Sami Kalliomaki1b868e32016-06-29 12:55:0068 }
69
Magnus Jedvertb502ce32016-09-27 08:10:4170 android_library("AppRTCMobile_javalib") {
kjellanderfe8285d2017-03-06 08:29:2171 testonly = true
sakal1fc1feb2017-02-13 13:58:2772 android_manifest = "androidapp/AndroidManifest.xml"
73
Sami Kalliomaki1b868e32016-06-29 12:55:0074 java_files = [
75 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikaf427d572016-12-14 15:36:5676 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0077 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
78 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
79 "androidapp/src/org/appspot/apprtc/CallActivity.java",
80 "androidapp/src/org/appspot/apprtc/CallFragment.java",
81 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
82 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
83 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
84 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
85 "androidapp/src/org/appspot/apprtc/HudFragment.java",
86 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0087 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
88 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
89 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
90 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
91 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
92 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
93 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
94 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
95 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0096 ]
97
98 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:4199 ":AppRTCMobile_resources",
jianjun.zhu59d55752017-07-11 13:20:45100 "../modules/audio_device:audio_device_java",
101 "../rtc_base:base_java",
102 "../sdk/android:libjingle_peerconnection_java",
103 "../sdk/android:libjingle_peerconnection_metrics_default_java",
104 "androidapp/third_party/autobanh:autobanh_java",
Sami Kalliomaki1b868e32016-06-29 12:55:00105 ]
charujain9278d472017-08-25 13:21:52106
107 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148
108 no_build_hooks = true
Sami Kalliomaki1b868e32016-06-29 12:55:00109 }
110
Magnus Jedvertb502ce32016-09-27 08:10:41111 android_resources("AppRTCMobile_resources") {
kjellanderfe8285d2017-03-06 08:29:21112 testonly = true
Sami Kalliomaki1b868e32016-06-29 12:55:00113 resource_dirs = [ "androidapp/res" ]
114 custom_package = "org.appspot.apprtc"
115 }
116
Magnus Jedvertb502ce32016-09-27 08:10:41117 instrumentation_test_apk("AppRTCMobileTest") {
118 apk_name = "AppRTCMobileTest"
Sami Kalliomaki1b868e32016-06-29 12:55:00119 android_manifest = "androidtests/AndroidManifest.xml"
120
sakalb7d35ee2017-01-17 11:32:06121 java_files = [ "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java" ]
Sami Kalliomaki1b868e32016-06-29 12:55:00122
Magnus Jedvertb502ce32016-09-27 08:10:41123 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki1b868e32016-06-29 12:55:00124
125 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:41126 ":AppRTCMobile_javalib",
jianjun.zhu59d55752017-07-11 13:20:45127 "../sdk/android:libjingle_peerconnection_java",
sakal67ddadc2017-01-11 14:21:26128 "//base:base_java_test_support",
129 "//third_party/android_support_test_runner:runner_java",
130 "//third_party/junit",
Sami Kalliomaki1b868e32016-06-29 12:55:00131 ]
charujain9278d472017-08-25 13:21:52132
133 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148
134 no_build_hooks = true
Sami Kalliomaki1b868e32016-06-29 12:55:00135 }
mandermo4b0d8ea2017-01-16 10:23:09136
137 instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
138 apk_name = "AppRTCMobileTestStubbedVideoIO"
139 android_manifest = "androidtests/AndroidManifest.xml"
140
oprypin2e060d32017-04-24 11:15:13141 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermo4b0d8ea2017-01-16 10:23:09142
143 apk_under_test = ":AppRTCMobile"
144
145 deps = [
146 ":AppRTCMobile_javalib",
jianjun.zhu59d55752017-07-11 13:20:45147 "../sdk/android:libjingle_peerconnection_java",
mandermo4b0d8ea2017-01-16 10:23:09148 "//third_party/android_support_test_runner:rules_java",
149 "//third_party/android_support_test_runner:runner_java",
150 "//third_party/espresso:espresso_all_java",
151 "//third_party/hamcrest:hamcrest_java",
152 "//third_party/junit",
mandermo4b0d8ea2017-01-16 10:23:09153 ]
154
155 data = [
jianjun.zhu59d55752017-07-11 13:20:45156 "../../resources/reference_video_640x360_30fps.y4m",
mandermo4b0d8ea2017-01-16 10:23:09157 ]
charujain9278d472017-08-25 13:21:52158
159 # TODO(sakal): Fix build hooks crbug.com/webrtc/8148
160 no_build_hooks = true
mandermo4b0d8ea2017-01-16 10:23:09161 }
Sami Kalliomaki1b868e32016-06-29 12:55:00162}
tkchin78fe5422016-08-08 04:37:45163
164if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin78fe5422016-08-08 04:37:45165 config("apprtc_common_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41166 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin78fe5422016-08-08 04:37:45167 }
168
kjellander2cf29b52016-09-23 07:38:52169 rtc_static_library("apprtc_common") {
kjellanderfe8285d2017-03-06 08:29:21170 testonly = true
tkchin78fe5422016-08-08 04:37:45171 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41172 "objc/AppRTCMobile/common/ARDUtilities.h",
173 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin78fe5422016-08-08 04:37:45174 ]
ehmaldonado80e66922016-09-05 13:10:18175 public_configs = [ ":apprtc_common_config" ]
tkchin78fe5422016-08-08 04:37:45176
Kári Tristan Helgason72a186a2017-06-02 12:05:56177 if (is_ios) {
kthelgason8a0b62b2017-08-16 14:28:03178 deps = [
179 ":AppRTCMobile_ios_frameworks",
180 ]
Kári Tristan Helgason72a186a2017-06-02 12:05:56181 } else {
kthelgason8a0b62b2017-08-16 14:28:03182 deps = [
kthelgason171de352017-08-24 12:43:45183 "../sdk:common_objc",
kthelgason8a0b62b2017-08-16 14:28:03184 "../system_wrappers:field_trial_default",
185 "../system_wrappers:metrics_default",
186 ]
Kári Tristan Helgason72a186a2017-06-02 12:05:56187 }
tkchin78fe5422016-08-08 04:37:45188 }
189
190 config("apprtc_signaling_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41191 include_dirs = [ "objc/AppRTCMobile" ]
tkchin78fe5422016-08-08 04:37:45192
193 # GN orders flags on a target before flags from configs. The default config
194 # adds these flags so to cancel them out they need to come from a config and
195 # cannot be on the target directly.
196 cflags = [
197 "-Wno-sign-compare",
198 "-Wno-unused-variable",
199 ]
tkchin78fe5422016-08-08 04:37:45200 }
201
kjellander2cf29b52016-09-23 07:38:52202 rtc_static_library("apprtc_signaling") {
kjellanderfe8285d2017-03-06 08:29:21203 testonly = true
tkchin78fe5422016-08-08 04:37:45204 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41205 "objc/AppRTCMobile/ARDAppClient+Internal.h",
206 "objc/AppRTCMobile/ARDAppClient.h",
207 "objc/AppRTCMobile/ARDAppClient.m",
208 "objc/AppRTCMobile/ARDAppEngineClient.h",
209 "objc/AppRTCMobile/ARDAppEngineClient.m",
210 "objc/AppRTCMobile/ARDBitrateTracker.h",
211 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakal259e8c12017-04-05 19:17:48212 "objc/AppRTCMobile/ARDCaptureController.h",
213 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertb502ce32016-09-27 08:10:41214 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
215 "objc/AppRTCMobile/ARDJoinResponse.h",
216 "objc/AppRTCMobile/ARDJoinResponse.m",
217 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
218 "objc/AppRTCMobile/ARDMessageResponse.h",
219 "objc/AppRTCMobile/ARDMessageResponse.m",
220 "objc/AppRTCMobile/ARDRoomServerClient.h",
221 "objc/AppRTCMobile/ARDSDPUtils.h",
222 "objc/AppRTCMobile/ARDSDPUtils.m",
sakal49fb5942017-03-28 08:22:48223 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
224 "objc/AppRTCMobile/ARDSettingsModel.h",
225 "objc/AppRTCMobile/ARDSettingsModel.m",
226 "objc/AppRTCMobile/ARDSettingsStore.h",
227 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertb502ce32016-09-27 08:10:41228 "objc/AppRTCMobile/ARDSignalingChannel.h",
229 "objc/AppRTCMobile/ARDSignalingMessage.h",
230 "objc/AppRTCMobile/ARDSignalingMessage.m",
231 "objc/AppRTCMobile/ARDStatsBuilder.h",
232 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasone9325522017-01-13 13:59:46233 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertb502ce32016-09-27 08:10:41234 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasone9325522017-01-13 13:59:46235 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertb502ce32016-09-27 08:10:41236 "objc/AppRTCMobile/ARDWebSocketChannel.h",
237 "objc/AppRTCMobile/ARDWebSocketChannel.m",
238 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
239 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
240 "objc/AppRTCMobile/RTCIceServer+JSON.h",
241 "objc/AppRTCMobile/RTCIceServer+JSON.m",
242 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
243 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
244 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
245 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin78fe5422016-08-08 04:37:45246 ]
ehmaldonado80e66922016-09-05 13:10:18247 public_configs = [ ":apprtc_signaling_config" ]
tkchin78fe5422016-08-08 04:37:45248 deps = [
249 ":apprtc_common",
250 ":socketrocket",
251 ]
Kári Tristan Helgason72a186a2017-06-02 12:05:56252 if (is_ios) {
253 deps += [ ":AppRTCMobile_ios_frameworks" ]
254 } else {
255 public_deps = [
kthelgason171de352017-08-24 12:43:45256 "../sdk:peerconnection_objc",
Kári Tristan Helgason72a186a2017-06-02 12:05:56257 ]
258 }
tkchin78fe5422016-08-08 04:37:45259 libs = [ "QuartzCore.framework" ]
260 }
261
262 if (is_ios) {
denicija8de18422016-11-15 08:41:26263 rtc_static_library("AppRTCMobile_lib") {
kjellanderfe8285d2017-03-06 08:29:21264 testonly = true
tkchin78fe5422016-08-08 04:37:45265 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41266 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
267 "objc/AppRTCMobile/ios/ARDMainView.h",
268 "objc/AppRTCMobile/ios/ARDMainView.m",
269 "objc/AppRTCMobile/ios/ARDMainViewController.h",
270 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicija7f9c3122016-11-02 09:56:09271 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
272 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertb502ce32016-09-27 08:10:41273 "objc/AppRTCMobile/ios/ARDStatsView.h",
274 "objc/AppRTCMobile/ios/ARDStatsView.m",
275 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
276 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
277 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
278 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
279 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
280 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
281 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija8de18422016-11-15 08:41:26282 ]
denicija8de18422016-11-15 08:41:26283
284 deps = [
Kári Tristan Helgason72a186a2017-06-02 12:05:56285 ":AppRTCMobile_ios_frameworks",
denicija8de18422016-11-15 08:41:26286 ":apprtc_common",
287 ":apprtc_signaling",
288 ]
289 }
290
291 ios_app_bundle("AppRTCMobile") {
kjellanderfe8285d2017-03-06 08:29:21292 testonly = true
denicija8de18422016-11-15 08:41:26293 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41294 "objc/AppRTCMobile/ios/main.m",
tkchin78fe5422016-08-08 04:37:45295 ]
296
Magnus Jedvertb502ce32016-09-27 08:10:41297 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin78fe5422016-08-08 04:37:45298
denicija8de18422016-11-15 08:41:26299 configs += [ "..:common_config" ]
tkchin78fe5422016-08-08 04:37:45300 public_configs = [ "..:common_inherited_config" ]
301
302 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:41303 ":AppRTCMobile_ios_bundle_data",
kthelgasoncd2dced2017-01-26 09:14:04304 ":AppRTCMobile_ios_frameworks",
denicija8de18422016-11-15 08:41:26305 ":AppRTCMobile_lib",
tkchin78fe5422016-08-08 04:37:45306 ]
307
308 if (target_cpu == "x86") {
309 deps += [ "//testing/iossim:iossim" ]
310 }
311 }
312
kthelgasoncd2dced2017-01-26 09:14:04313 bundle_data("AppRTCMobile_ios_frameworks") {
314 public_deps = [
kthelgason171de352017-08-24 12:43:45315 "../sdk:framework_objc+link",
kthelgasoncd2dced2017-01-26 09:14:04316 ]
317 sources = [
318 "$root_out_dir/WebRTC.framework",
319 ]
320 outputs = [
321 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
322 ]
323 }
324
Magnus Jedvertb502ce32016-09-27 08:10:41325 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin78fe5422016-08-08 04:37:45326 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41327 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
328 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
329 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
330 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
331 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
332 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
333 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
334 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija4ad018c2016-10-28 11:53:16335 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
336 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertb502ce32016-09-27 08:10:41337 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
338 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
339 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
340 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
341 "objc/AppRTCMobile/ios/resources/mozart.mp3",
anderscabbd7d72017-08-15 11:07:12342 "objc/Icon-120.png",
343 "objc/Icon-180.png",
tkchin78fe5422016-08-08 04:37:45344 "objc/Icon.png",
345 ]
346 outputs = [
347 "{{bundle_resources_dir}}/{{source_file_part}}",
348 ]
349 }
350 }
351
352 if (is_mac) {
denicija8de18422016-11-15 08:41:26353 rtc_static_library("AppRTCMobile_lib") {
kjellanderfe8285d2017-03-06 08:29:21354 testonly = true
tkchin78fe5422016-08-08 04:37:45355 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41356 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
357 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
358 "objc/AppRTCMobile/mac/APPRTCViewController.h",
359 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin78fe5422016-08-08 04:37:45360 ]
jianjun.zhu59d55752017-07-11 13:20:45361 configs += [ "..:common_objc" ]
tkchin78fe5422016-08-08 04:37:45362 deps = [
363 ":apprtc_common",
364 ":apprtc_signaling",
kthelgason171de352017-08-24 12:43:45365 "../sdk:ui_objc",
tkchin78fe5422016-08-08 04:37:45366 ]
367 }
368
Magnus Jedvertb502ce32016-09-27 08:10:41369 mac_app_bundle("AppRTCMobile") {
kjellanderfe8285d2017-03-06 08:29:21370 testonly = true
Magnus Jedvertb502ce32016-09-27 08:10:41371 output_name = "AppRTCMobile"
tkchin78fe5422016-08-08 04:37:45372
tkchin78fe5422016-08-08 04:37:45373 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41374 "objc/AppRTCMobile/mac/main.m",
tkchin78fe5422016-08-08 04:37:45375 ]
376
377 public_configs = [ "..:common_inherited_config" ]
378
Magnus Jedvertb502ce32016-09-27 08:10:41379 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin78fe5422016-08-08 04:37:45380
381 libs = [ "AppKit.framework" ]
382
383 deps = [
denicija8de18422016-11-15 08:41:26384 ":AppRTCMobile_lib",
tkchin78fe5422016-08-08 04:37:45385 ]
386 }
387 }
388
389 config("socketrocket_include_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41390 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin78fe5422016-08-08 04:37:45391 }
392
393 config("socketrocket_warning_config") {
394 # GN orders flags on a target before flags from configs. The default config
395 # adds these flags so to cancel them out they need to come from a config and
396 # cannot be on the target directly.
397 cflags = [
398 "-Wno-deprecated-declarations",
399 "-Wno-nonnull",
tkchin78fe5422016-08-08 04:37:45400 "-Wno-semicolon-before-method-body",
kthelgason5c5ba7a2017-02-24 09:56:01401 "-Wno-unused-variable",
tkchin78fe5422016-08-08 04:37:45402 ]
403
henrikaae602ea2016-09-21 11:13:00404 cflags_objc = [
405 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
406 "-Wno-objc-missing-property-synthesis",
henrikaae602ea2016-09-21 11:13:00407 ]
tkchin78fe5422016-08-08 04:37:45408 }
409
kjellander2cf29b52016-09-23 07:38:52410 rtc_static_library("socketrocket") {
kjellanderfe8285d2017-03-06 08:29:21411 testonly = true
tkchin78fe5422016-08-08 04:37:45412 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41413 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
414 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin78fe5422016-08-08 04:37:45415 ]
kthelgason9c585d42017-04-24 07:57:16416 configs += [ ":socketrocket_warning_config" ]
ehmaldonado80e66922016-09-05 13:10:18417 public_configs = [ ":socketrocket_include_config" ]
tkchin78fe5422016-08-08 04:37:45418
419 libs = [
420 "CFNetwork.framework",
421 "icucore",
422 ]
423 }
adam.fedordc478c52016-11-07 22:53:28424
425 if (rtc_include_tests) {
kthelgason75be4622017-02-14 12:58:56426 # TODO(kthelgason): compile xctests on mac when chromium supports it.
427 if (is_ios) {
428 rtc_source_set("apprtcmobile_test_sources") {
kjellanderfe8285d2017-03-06 08:29:21429 testonly = true
kthelgason75be4622017-02-14 12:58:56430 include_dirs = [
431 "objc/AppRTCMobile",
432 "objc/AppRTCMobile/ios",
433 ]
434 testonly = true
435 sources = [
436 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
437 "objc/AppRTCMobile/tests/ARDSDPUtils_xctest.mm",
438 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
439 ]
kjellanderfe8285d2017-03-06 08:29:21440 deps = [
jianjun.zhu59d55752017-07-11 13:20:45441 "../rtc_base:rtc_base",
kjellanderfe8285d2017-03-06 08:29:21442 ]
kthelgason75be4622017-02-14 12:58:56443 public_deps = [
444 ":AppRTCMobile_ios_frameworks",
445 ":AppRTCMobile_lib",
446 "//build/config/ios:xctest",
447 "//third_party/ocmock",
448 ]
adam.fedordc478c52016-11-07 22:53:28449 }
450
kthelgason75be4622017-02-14 12:58:56451 rtc_ios_xctest_test("apprtcmobile_tests") {
452 info_plist = "objc/AppRTCMobile/ios/Info.plist"
453 sources = [
454 "objc/AppRTCMobile/ios/main.m",
455 ]
456 deps = [
457 ":apprtcmobile_test_sources",
458 ]
459 ldflags = [ "-all_load" ]
460 }
adam.fedordc478c52016-11-07 22:53:28461 }
462 }
tkchin78fe5422016-08-08 04:37:45463}
kthelgason7a5c2ac2016-08-08 16:03:23464
465if (is_linux || is_win) {
ehmaldonado7eed79e2016-08-26 20:31:24466 config("peerconnection_client_warnings_config") {
kjellander7209af22016-09-18 15:12:29467 cflags = []
ehmaldonado7eed79e2016-08-26 20:31:24468 if (is_win && is_clang) {
kjellander7209af22016-09-18 15:12:29469 cflags += [
ehmaldonado7eed79e2016-08-26 20:31:24470 # Disable warnings failing when compiling with Clang on Windows.
471 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
472 "-Wno-format",
473
474 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
475 # for -Wno-reorder and -Wno-sign-compare
476 "-Wno-reorder",
477 "-Wno-sign-compare",
478 ]
479 }
kjellanderc75068b2016-09-07 09:33:01480 if (is_linux && target_cpu == "x86") {
kjellander7209af22016-09-18 15:12:29481 cflags += [
kjellanderc75068b2016-09-07 09:33:01482 # Needed to compile on Linux 32-bit.
483 "-Wno-sentinel",
484 ]
485 }
kjellander7209af22016-09-18 15:12:29486
487 if (is_clang) {
488 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
489 # set of warnings.
490 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
491 cflags += [ "-Wno-inconsistent-missing-override" ]
492 }
ehmaldonado7eed79e2016-08-26 20:31:24493 }
494
ehmaldonadof0532f32016-09-02 11:10:34495 rtc_executable("peerconnection_client") {
kjellanderfe8285d2017-03-06 08:29:21496 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23497 sources = [
498 "peerconnection/client/conductor.cc",
499 "peerconnection/client/conductor.h",
500 "peerconnection/client/defaults.cc",
501 "peerconnection/client/defaults.h",
502 "peerconnection/client/peer_connection_client.cc",
503 "peerconnection/client/peer_connection_client.h",
504 ]
ehmaldonado1d492192016-09-05 08:35:44505
kjellandera6c66232016-10-17 06:56:12506 if (!build_with_chromium && is_clang) {
507 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34508 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23509 }
kjellanderfe8285d2017-03-06 08:29:21510 deps = []
kthelgason7a5c2ac2016-08-08 16:03:23511 if (is_win) {
512 sources += [
513 "peerconnection/client/flagdefs.h",
514 "peerconnection/client/main.cc",
515 "peerconnection/client/main_wnd.cc",
516 "peerconnection/client/main_wnd.h",
517 ]
518 cflags = [ "/wd4245" ]
519 configs += [ "//build/config/win:windowed" ]
jianjun.zhu59d55752017-07-11 13:20:45520 deps += [ "../media:rtc_media_base" ]
kthelgason7a5c2ac2016-08-08 16:03:23521 }
522 if (is_linux) {
523 sources += [
524 "peerconnection/client/linux/main.cc",
525 "peerconnection/client/linux/main_wnd.cc",
526 "peerconnection/client/linux/main_wnd.h",
527 ]
Henrik Kjellander37c38302017-03-27 06:28:27528 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason7a5c2ac2016-08-08 16:03:23529 libs = [
530 "X11",
531 "Xcomposite",
532 "Xext",
533 "Xrender",
534 ]
thomasanderson4fefda72016-12-13 10:57:43535 deps += [ "//build/config/linux/gtk" ]
kthelgason7a5c2ac2016-08-08 16:03:23536 }
ehmaldonado7eed79e2016-08-26 20:31:24537 configs += [ ":peerconnection_client_warnings_config" ]
kjellanderfe8285d2017-03-06 08:29:21538
539 deps += [
jianjun.zhu59d55752017-07-11 13:20:45540 "../api:libjingle_peerconnection_test_api",
541 "../api:video_frame_api",
jianjun.zhu59d55752017-07-11 13:20:45542 "../media:rtc_media",
543 "../modules/video_capture:video_capture_module",
544 "../pc:libjingle_peerconnection",
ehmaldonado2bc62f32017-07-19 17:40:47545 "../rtc_base:rtc_base",
546 "../rtc_base:rtc_base_approved",
547 "../rtc_base:rtc_json",
jianjun.zhu59d55752017-07-11 13:20:45548 "../system_wrappers:field_trial_default",
549 "../system_wrappers:metrics_default",
kjellanderfe8285d2017-03-06 08:29:21550 "//third_party/libyuv",
kjellanderfe8285d2017-03-06 08:29:21551 ]
kthelgason7a5c2ac2016-08-08 16:03:23552 }
kjellanderc75068b2016-09-07 09:33:01553
ehmaldonadof0532f32016-09-02 11:10:34554 rtc_executable("peerconnection_server") {
kjellanderfe8285d2017-03-06 08:29:21555 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23556 sources = [
557 "peerconnection/server/data_socket.cc",
558 "peerconnection/server/data_socket.h",
559 "peerconnection/server/main.cc",
560 "peerconnection/server/peer_channel.cc",
561 "peerconnection/server/peer_channel.h",
562 "peerconnection/server/utils.cc",
563 "peerconnection/server/utils.h",
564 ]
565 deps = [
jianjun.zhu59d55752017-07-11 13:20:45566 "..:webrtc_common",
ehmaldonado2bc62f32017-07-19 17:40:47567 "../rtc_base:rtc_base_approved",
jianjun.zhu59d55752017-07-11 13:20:45568 "../rtc_tools:command_line_parser",
kthelgason7a5c2ac2016-08-08 16:03:23569 ]
kjellandera6c66232016-10-17 06:56:12570 if (!build_with_chromium && is_clang) {
571 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34572 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23573 }
574 }
ehmaldonadof0532f32016-09-02 11:10:34575 rtc_executable("relayserver") {
kjellanderfe8285d2017-03-06 08:29:21576 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23577 sources = [
578 "relayserver/relayserver_main.cc",
579 ]
580 deps = [
jianjun.zhu59d55752017-07-11 13:20:45581 "../p2p:rtc_p2p",
582 "../pc:rtc_pc",
ehmaldonado2bc62f32017-07-19 17:40:47583 "../rtc_base:rtc_base",
584 "../rtc_base:rtc_base_approved",
jianjun.zhu59d55752017-07-11 13:20:45585 "../system_wrappers:field_trial_default",
586 "../system_wrappers:metrics_default",
kthelgason7a5c2ac2016-08-08 16:03:23587 ]
kjellandera6c66232016-10-17 06:56:12588 if (!build_with_chromium && is_clang) {
589 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34590 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23591 }
592 }
ehmaldonadof0532f32016-09-02 11:10:34593 rtc_executable("turnserver") {
kjellanderfe8285d2017-03-06 08:29:21594 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23595 sources = [
596 "turnserver/turnserver_main.cc",
597 ]
598 deps = [
jianjun.zhu59d55752017-07-11 13:20:45599 "../p2p:rtc_p2p",
600 "../pc:rtc_pc",
ehmaldonado2bc62f32017-07-19 17:40:47601 "../rtc_base:rtc_base",
602 "../rtc_base:rtc_base_approved",
jianjun.zhu59d55752017-07-11 13:20:45603 "../system_wrappers:field_trial_default",
604 "../system_wrappers:metrics_default",
kthelgason7a5c2ac2016-08-08 16:03:23605 ]
kjellandera6c66232016-10-17 06:56:12606 if (!build_with_chromium && is_clang) {
607 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34608 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23609 }
610 }
ehmaldonadof0532f32016-09-02 11:10:34611 rtc_executable("stunserver") {
kjellanderfe8285d2017-03-06 08:29:21612 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23613 sources = [
614 "stunserver/stunserver_main.cc",
615 ]
616 deps = [
jianjun.zhu59d55752017-07-11 13:20:45617 "../p2p:rtc_p2p",
618 "../pc:rtc_pc",
ehmaldonado2bc62f32017-07-19 17:40:47619 "../rtc_base:rtc_base",
620 "../rtc_base:rtc_base_approved",
jianjun.zhu59d55752017-07-11 13:20:45621 "../system_wrappers:field_trial_default",
622 "../system_wrappers:metrics_default",
kthelgason7a5c2ac2016-08-08 16:03:23623 ]
kjellandera6c66232016-10-17 06:56:12624 if (!build_with_chromium && is_clang) {
625 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34626 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23627 }
628 }
629}
charujaineceae882016-11-01 10:09:15630
qiangchen4655c742017-08-09 00:08:03631if (is_win || is_android) {
gyzhouacce9752017-05-11 23:10:03632 rtc_shared_library("webrtc_unity_plugin") {
633 testonly = true
634 sources = [
635 "unityplugin/simple_peer_connection.cc",
636 "unityplugin/simple_peer_connection.h",
637 "unityplugin/unity_plugin_apis.cc",
638 "unityplugin/unity_plugin_apis.h",
gyzhou0538b612017-07-25 23:04:31639 "unityplugin/video_observer.cc",
640 "unityplugin/video_observer.h",
gyzhouacce9752017-05-11 23:10:03641 ]
qiangchen4655c742017-08-09 00:08:03642
643 if (is_android) {
644 sources += [
645 "unityplugin/classreferenceholder.cc",
646 "unityplugin/classreferenceholder.h",
647 "unityplugin/jni_onload.cc",
648 ]
649 }
650
gyzhouacce9752017-05-11 23:10:03651 if (!build_with_chromium && is_clang) {
652 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
653 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
654 }
qiangchen4655c742017-08-09 00:08:03655 if (is_win) {
656 cflags = [ "/wd4245" ]
657 configs += [
658 "//build/config/win:windowed",
659 ":peerconnection_client_warnings_config",
660 ]
661 }
gyzhouacce9752017-05-11 23:10:03662 deps = [
jianjun.zhu59d55752017-07-11 13:20:45663 "../api:libjingle_peerconnection_test_api",
664 "../api:video_frame_api",
jianjun.zhu59d55752017-07-11 13:20:45665 "../media:rtc_media",
666 "../media:rtc_media_base",
667 "../modules/video_capture:video_capture_module",
668 "../pc:libjingle_peerconnection",
qiangchen4655c742017-08-09 00:08:03669 "../rtc_base:rtc_base",
jianjun.zhu59d55752017-07-11 13:20:45670 "../system_wrappers:field_trial_default",
671 "../system_wrappers:metrics_default",
gyzhouacce9752017-05-11 23:10:03672 ]
qiangchen4655c742017-08-09 00:08:03673 if (is_android) {
674 deps += [ "../sdk/android:libjingle_peerconnection_jni" ]
675 }
676 }
677}
678
679if (is_android) {
680 android_library("webrtc_unity_java") {
681 java_files = [ "unityplugin/java/src/org/webrtc/UnityUtility.java" ]
682 deps = [
683 "../rtc_base:base_java",
684 "../sdk/android:libjingle_peerconnection_java",
685 ]
686 }
687
688 dist_jar("libwebrtc_unity") {
689 _target_dir_name = get_label_info(":$target_name", "dir")
690 output = "${root_out_dir}/lib.java${_target_dir_name}/${target_name}.jar"
691 direct_deps_only = true
692 use_interface_jars = false
693 deps = [
694 ":webrtc_unity_java",
695 "../modules/audio_device:audio_device_java",
696 "../rtc_base:base_java",
697 "../sdk/android:libjingle_peerconnection_java",
698 "../sdk/android:libjingle_peerconnection_metrics_default_java",
699 ]
gyzhouacce9752017-05-11 23:10:03700 }
701}
702
charujaineceae882016-11-01 10:09:15703if (!build_with_chromium) {
704 # Doesn't build within Chrome on Win.
705 rtc_executable("stun_prober") {
kjellanderfe8285d2017-03-06 08:29:21706 testonly = true
charujaineceae882016-11-01 10:09:15707 sources = [
708 "stunprober/main.cc",
709 ]
710
711 if (!build_with_chromium && is_clang) {
712 # Suppress warnings from Chrome's Clang plugins.
713 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
714 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
715 }
716
717 deps = [
718 "../p2p:libstunprober",
719 "../p2p:rtc_p2p",
ehmaldonado2bc62f32017-07-19 17:40:47720 "../rtc_base:rtc_base",
721 "../rtc_base:rtc_base_approved",
charujaineceae882016-11-01 10:09:15722 "../system_wrappers:field_trial_default",
723 ]
724 }
725}