blob: 85813fa22212f2ad6f12ff67b7566a2f908dc5b1 [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",
Sami Kalliomaki1b868e32016-06-29 12:55:0060 "//base:base_java",
Henrik Kjellanderfb3e1b62017-06-29 06:03:0461 "//webrtc/rtc_base:base_java",
Sami Kalliomaki1b868e32016-06-29 12:55:0062 ]
63
magjed6fe85c02016-12-06 12:29:3764 shared_libraries = [ "//webrtc/sdk/android:libjingle_peerconnection_so" ]
Sami Kalliomaki1b868e32016-06-29 12:55:0065 }
66
Magnus Jedvertb502ce32016-09-27 08:10:4167 android_library("AppRTCMobile_javalib") {
kjellanderfe8285d2017-03-06 08:29:2168 testonly = true
sakal1fc1feb2017-02-13 13:58:2769 android_manifest = "androidapp/AndroidManifest.xml"
70
Sami Kalliomaki1b868e32016-06-29 12:55:0071 java_files = [
72 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
henrikaf427d572016-12-14 15:36:5673 "androidapp/src/org/appspot/apprtc/AppRTCBluetoothManager.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0074 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
75 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
76 "androidapp/src/org/appspot/apprtc/CallActivity.java",
77 "androidapp/src/org/appspot/apprtc/CallFragment.java",
78 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
79 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
80 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
81 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
82 "androidapp/src/org/appspot/apprtc/HudFragment.java",
83 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0084 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
85 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
86 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
87 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
88 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
89 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
90 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
91 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
92 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki1b868e32016-06-29 12:55:0093 ]
94
95 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:4196 ":AppRTCMobile_resources",
Sami Kalliomaki1b868e32016-06-29 12:55:0097 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
mbonadei08184b22017-01-23 09:25:5398 "//webrtc/modules/audio_device:audio_device_java",
Henrik Kjellanderfb3e1b62017-06-29 06:03:0499 "//webrtc/rtc_base:base_java",
magjed6fe85c02016-12-06 12:29:37100 "//webrtc/sdk/android:libjingle_peerconnection_java",
101 "//webrtc/sdk/android:libjingle_peerconnection_metrics_default_java",
Sami Kalliomaki1b868e32016-06-29 12:55:00102 ]
103 }
104
Magnus Jedvertb502ce32016-09-27 08:10:41105 android_resources("AppRTCMobile_resources") {
kjellanderfe8285d2017-03-06 08:29:21106 testonly = true
Sami Kalliomaki1b868e32016-06-29 12:55:00107 resource_dirs = [ "androidapp/res" ]
108 custom_package = "org.appspot.apprtc"
109 }
110
Magnus Jedvertb502ce32016-09-27 08:10:41111 instrumentation_test_apk("AppRTCMobileTest") {
112 apk_name = "AppRTCMobileTest"
Sami Kalliomaki1b868e32016-06-29 12:55:00113 android_manifest = "androidtests/AndroidManifest.xml"
114
sakalb7d35ee2017-01-17 11:32:06115 java_files = [ "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java" ]
Sami Kalliomaki1b868e32016-06-29 12:55:00116
Magnus Jedvertb502ce32016-09-27 08:10:41117 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki1b868e32016-06-29 12:55:00118
119 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:41120 ":AppRTCMobile_javalib",
sakal67ddadc2017-01-11 14:21:26121 "//base:base_java_test_support",
122 "//third_party/android_support_test_runner:runner_java",
123 "//third_party/junit",
magjed6fe85c02016-12-06 12:29:37124 "//webrtc/sdk/android:libjingle_peerconnection_java",
Sami Kalliomaki1b868e32016-06-29 12:55:00125 ]
126 }
mandermo4b0d8ea2017-01-16 10:23:09127
128 instrumentation_test_apk("AppRTCMobileTestStubbedVideoIO") {
129 apk_name = "AppRTCMobileTestStubbedVideoIO"
130 android_manifest = "androidtests/AndroidManifest.xml"
131
oprypin2e060d32017-04-24 11:15:13132 java_files = [ "androidtests/src/org/appspot/apprtc/test/CallActivityStubbedInputOutputTest.java" ]
mandermo4b0d8ea2017-01-16 10:23:09133
134 apk_under_test = ":AppRTCMobile"
135
136 deps = [
137 ":AppRTCMobile_javalib",
138 "//third_party/android_support_test_runner:rules_java",
139 "//third_party/android_support_test_runner:runner_java",
140 "//third_party/espresso:espresso_all_java",
141 "//third_party/hamcrest:hamcrest_java",
142 "//third_party/junit",
143 "//webrtc/sdk/android:libjingle_peerconnection_java",
144 ]
145
146 data = [
147 "//resources/reference_video_640x360_30fps.y4m",
148 ]
149 }
Sami Kalliomaki1b868e32016-06-29 12:55:00150}
tkchin78fe5422016-08-08 04:37:45151
152if (is_ios || (is_mac && target_cpu != "x86")) {
tkchin78fe5422016-08-08 04:37:45153 config("apprtc_common_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41154 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin78fe5422016-08-08 04:37:45155 }
156
kjellander2cf29b52016-09-23 07:38:52157 rtc_static_library("apprtc_common") {
kjellanderfe8285d2017-03-06 08:29:21158 testonly = true
tkchin78fe5422016-08-08 04:37:45159 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41160 "objc/AppRTCMobile/common/ARDUtilities.h",
161 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin78fe5422016-08-08 04:37:45162 ]
ehmaldonado80e66922016-09-05 13:10:18163 public_configs = [ ":apprtc_common_config" ]
tkchin78fe5422016-08-08 04:37:45164
165 deps = [
kjellanderfe8285d2017-03-06 08:29:21166 "//webrtc/system_wrappers:field_trial_default",
167 "//webrtc/system_wrappers:metrics_default",
tkchin78fe5422016-08-08 04:37:45168 ]
Kári Tristan Helgason72a186a2017-06-02 12:05:56169 if (is_ios) {
170 deps += [ ":AppRTCMobile_ios_frameworks" ]
171 } else {
172 deps += [ "//webrtc/sdk:objc_common" ]
173 }
tkchin78fe5422016-08-08 04:37:45174 }
175
176 config("apprtc_signaling_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41177 include_dirs = [ "objc/AppRTCMobile" ]
tkchin78fe5422016-08-08 04:37:45178
179 # GN orders flags on a target before flags from configs. The default config
180 # adds these flags so to cancel them out they need to come from a config and
181 # cannot be on the target directly.
182 cflags = [
183 "-Wno-sign-compare",
184 "-Wno-unused-variable",
185 ]
tkchin78fe5422016-08-08 04:37:45186 }
187
kjellander2cf29b52016-09-23 07:38:52188 rtc_static_library("apprtc_signaling") {
kjellanderfe8285d2017-03-06 08:29:21189 testonly = true
tkchin78fe5422016-08-08 04:37:45190 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41191 "objc/AppRTCMobile/ARDAppClient+Internal.h",
192 "objc/AppRTCMobile/ARDAppClient.h",
193 "objc/AppRTCMobile/ARDAppClient.m",
194 "objc/AppRTCMobile/ARDAppEngineClient.h",
195 "objc/AppRTCMobile/ARDAppEngineClient.m",
196 "objc/AppRTCMobile/ARDBitrateTracker.h",
197 "objc/AppRTCMobile/ARDBitrateTracker.m",
sakal259e8c12017-04-05 19:17:48198 "objc/AppRTCMobile/ARDCaptureController.h",
199 "objc/AppRTCMobile/ARDCaptureController.m",
Magnus Jedvertb502ce32016-09-27 08:10:41200 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
201 "objc/AppRTCMobile/ARDJoinResponse.h",
202 "objc/AppRTCMobile/ARDJoinResponse.m",
203 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
204 "objc/AppRTCMobile/ARDMessageResponse.h",
205 "objc/AppRTCMobile/ARDMessageResponse.m",
206 "objc/AppRTCMobile/ARDRoomServerClient.h",
207 "objc/AppRTCMobile/ARDSDPUtils.h",
208 "objc/AppRTCMobile/ARDSDPUtils.m",
sakal49fb5942017-03-28 08:22:48209 "objc/AppRTCMobile/ARDSettingsModel+Private.h",
210 "objc/AppRTCMobile/ARDSettingsModel.h",
211 "objc/AppRTCMobile/ARDSettingsModel.m",
212 "objc/AppRTCMobile/ARDSettingsStore.h",
213 "objc/AppRTCMobile/ARDSettingsStore.m",
Magnus Jedvertb502ce32016-09-27 08:10:41214 "objc/AppRTCMobile/ARDSignalingChannel.h",
215 "objc/AppRTCMobile/ARDSignalingMessage.h",
216 "objc/AppRTCMobile/ARDSignalingMessage.m",
217 "objc/AppRTCMobile/ARDStatsBuilder.h",
218 "objc/AppRTCMobile/ARDStatsBuilder.m",
kthelgasone9325522017-01-13 13:59:46219 "objc/AppRTCMobile/ARDTURNClient+Internal.h",
Magnus Jedvertb502ce32016-09-27 08:10:41220 "objc/AppRTCMobile/ARDTURNClient.h",
kthelgasone9325522017-01-13 13:59:46221 "objc/AppRTCMobile/ARDTURNClient.m",
Magnus Jedvertb502ce32016-09-27 08:10:41222 "objc/AppRTCMobile/ARDWebSocketChannel.h",
223 "objc/AppRTCMobile/ARDWebSocketChannel.m",
224 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
225 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
226 "objc/AppRTCMobile/RTCIceServer+JSON.h",
227 "objc/AppRTCMobile/RTCIceServer+JSON.m",
228 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
229 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
230 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
231 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin78fe5422016-08-08 04:37:45232 ]
ehmaldonado80e66922016-09-05 13:10:18233 public_configs = [ ":apprtc_signaling_config" ]
tkchin78fe5422016-08-08 04:37:45234 deps = [
235 ":apprtc_common",
236 ":socketrocket",
237 ]
Kári Tristan Helgason72a186a2017-06-02 12:05:56238 if (is_ios) {
239 deps += [ ":AppRTCMobile_ios_frameworks" ]
240 } else {
241 public_deps = [
242 "//webrtc/sdk:objc_peerconnection",
243 ]
244 }
tkchin78fe5422016-08-08 04:37:45245 libs = [ "QuartzCore.framework" ]
246 }
247
248 if (is_ios) {
denicija8de18422016-11-15 08:41:26249 rtc_static_library("AppRTCMobile_lib") {
kjellanderfe8285d2017-03-06 08:29:21250 testonly = true
tkchin78fe5422016-08-08 04:37:45251 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41252 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
253 "objc/AppRTCMobile/ios/ARDMainView.h",
254 "objc/AppRTCMobile/ios/ARDMainView.m",
255 "objc/AppRTCMobile/ios/ARDMainViewController.h",
256 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicija7f9c3122016-11-02 09:56:09257 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
258 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertb502ce32016-09-27 08:10:41259 "objc/AppRTCMobile/ios/ARDStatsView.h",
260 "objc/AppRTCMobile/ios/ARDStatsView.m",
261 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
262 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
263 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
264 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
265 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
266 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
267 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
denicija8de18422016-11-15 08:41:26268 ]
denicija8de18422016-11-15 08:41:26269
270 deps = [
Kári Tristan Helgason72a186a2017-06-02 12:05:56271 ":AppRTCMobile_ios_frameworks",
denicija8de18422016-11-15 08:41:26272 ":apprtc_common",
273 ":apprtc_signaling",
274 ]
275 }
276
277 ios_app_bundle("AppRTCMobile") {
kjellanderfe8285d2017-03-06 08:29:21278 testonly = true
denicija8de18422016-11-15 08:41:26279 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41280 "objc/AppRTCMobile/ios/main.m",
tkchin78fe5422016-08-08 04:37:45281 ]
282
Magnus Jedvertb502ce32016-09-27 08:10:41283 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin78fe5422016-08-08 04:37:45284
denicija8de18422016-11-15 08:41:26285 configs += [ "..:common_config" ]
tkchin78fe5422016-08-08 04:37:45286 public_configs = [ "..:common_inherited_config" ]
287
288 deps = [
Magnus Jedvertb502ce32016-09-27 08:10:41289 ":AppRTCMobile_ios_bundle_data",
kthelgasoncd2dced2017-01-26 09:14:04290 ":AppRTCMobile_ios_frameworks",
denicija8de18422016-11-15 08:41:26291 ":AppRTCMobile_lib",
tkchin78fe5422016-08-08 04:37:45292 ]
293
294 if (target_cpu == "x86") {
295 deps += [ "//testing/iossim:iossim" ]
296 }
297 }
298
kthelgasoncd2dced2017-01-26 09:14:04299 bundle_data("AppRTCMobile_ios_frameworks") {
300 public_deps = [
kthelgasona71ddad2017-05-30 08:48:47301 "//webrtc/sdk:objc_framework+link",
kthelgasoncd2dced2017-01-26 09:14:04302 ]
303 sources = [
304 "$root_out_dir/WebRTC.framework",
305 ]
306 outputs = [
307 "{{bundle_resources_dir}}/Frameworks/{{source_file_part}}",
308 ]
309 }
310
Magnus Jedvertb502ce32016-09-27 08:10:41311 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin78fe5422016-08-08 04:37:45312 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41313 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
314 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
315 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
316 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
317 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
318 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
319 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
320 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija4ad018c2016-10-28 11:53:16321 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
322 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertb502ce32016-09-27 08:10:41323 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
324 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
325 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
326 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
327 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin78fe5422016-08-08 04:37:45328 "objc/Icon.png",
329 ]
330 outputs = [
331 "{{bundle_resources_dir}}/{{source_file_part}}",
332 ]
333 }
334 }
335
336 if (is_mac) {
denicija8de18422016-11-15 08:41:26337 rtc_static_library("AppRTCMobile_lib") {
kjellanderfe8285d2017-03-06 08:29:21338 testonly = true
tkchin78fe5422016-08-08 04:37:45339 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41340 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
341 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
342 "objc/AppRTCMobile/mac/APPRTCViewController.h",
343 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin78fe5422016-08-08 04:37:45344 ]
kthelgason9c585d42017-04-24 07:57:16345 configs += [ "//webrtc:common_objc" ]
tkchin78fe5422016-08-08 04:37:45346 deps = [
347 ":apprtc_common",
348 ":apprtc_signaling",
kthelgasona71ddad2017-05-30 08:48:47349 "//webrtc/sdk:objc_ui",
tkchin78fe5422016-08-08 04:37:45350 ]
351 }
352
Magnus Jedvertb502ce32016-09-27 08:10:41353 mac_app_bundle("AppRTCMobile") {
kjellanderfe8285d2017-03-06 08:29:21354 testonly = true
Magnus Jedvertb502ce32016-09-27 08:10:41355 output_name = "AppRTCMobile"
tkchin78fe5422016-08-08 04:37:45356
tkchin78fe5422016-08-08 04:37:45357 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41358 "objc/AppRTCMobile/mac/main.m",
tkchin78fe5422016-08-08 04:37:45359 ]
360
361 public_configs = [ "..:common_inherited_config" ]
362
Magnus Jedvertb502ce32016-09-27 08:10:41363 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin78fe5422016-08-08 04:37:45364
365 libs = [ "AppKit.framework" ]
366
367 deps = [
denicija8de18422016-11-15 08:41:26368 ":AppRTCMobile_lib",
tkchin78fe5422016-08-08 04:37:45369 ]
370 }
371 }
372
373 config("socketrocket_include_config") {
Magnus Jedvertb502ce32016-09-27 08:10:41374 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin78fe5422016-08-08 04:37:45375 }
376
377 config("socketrocket_warning_config") {
378 # GN orders flags on a target before flags from configs. The default config
379 # adds these flags so to cancel them out they need to come from a config and
380 # cannot be on the target directly.
381 cflags = [
382 "-Wno-deprecated-declarations",
383 "-Wno-nonnull",
tkchin78fe5422016-08-08 04:37:45384 "-Wno-semicolon-before-method-body",
kthelgason5c5ba7a2017-02-24 09:56:01385 "-Wno-unused-variable",
tkchin78fe5422016-08-08 04:37:45386 ]
387
henrikaae602ea2016-09-21 11:13:00388 cflags_objc = [
389 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
390 "-Wno-objc-missing-property-synthesis",
henrikaae602ea2016-09-21 11:13:00391 ]
tkchin78fe5422016-08-08 04:37:45392 }
393
kjellander2cf29b52016-09-23 07:38:52394 rtc_static_library("socketrocket") {
kjellanderfe8285d2017-03-06 08:29:21395 testonly = true
tkchin78fe5422016-08-08 04:37:45396 sources = [
Magnus Jedvertb502ce32016-09-27 08:10:41397 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
398 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin78fe5422016-08-08 04:37:45399 ]
kthelgason9c585d42017-04-24 07:57:16400 configs += [ ":socketrocket_warning_config" ]
ehmaldonado80e66922016-09-05 13:10:18401 public_configs = [ ":socketrocket_include_config" ]
tkchin78fe5422016-08-08 04:37:45402
403 libs = [
404 "CFNetwork.framework",
405 "icucore",
406 ]
407 }
adam.fedordc478c52016-11-07 22:53:28408
409 if (rtc_include_tests) {
kthelgason75be4622017-02-14 12:58:56410 # TODO(kthelgason): compile xctests on mac when chromium supports it.
411 if (is_ios) {
412 rtc_source_set("apprtcmobile_test_sources") {
kjellanderfe8285d2017-03-06 08:29:21413 testonly = true
kthelgason75be4622017-02-14 12:58:56414 include_dirs = [
415 "objc/AppRTCMobile",
416 "objc/AppRTCMobile/ios",
417 ]
418 testonly = true
419 sources = [
420 "objc/AppRTCMobile/tests/ARDAppClient_xctest.mm",
421 "objc/AppRTCMobile/tests/ARDSDPUtils_xctest.mm",
422 "objc/AppRTCMobile/tests/ARDSettingsModel_xctest.mm",
423 ]
kjellanderfe8285d2017-03-06 08:29:21424 deps = [
ehmaldonado4f870fc2017-07-10 12:58:42425 "//webrtc/base:rtc_base",
kjellanderfe8285d2017-03-06 08:29:21426 ]
kthelgason75be4622017-02-14 12:58:56427 public_deps = [
428 ":AppRTCMobile_ios_frameworks",
429 ":AppRTCMobile_lib",
430 "//build/config/ios:xctest",
431 "//third_party/ocmock",
432 ]
adam.fedordc478c52016-11-07 22:53:28433 }
434
kthelgason75be4622017-02-14 12:58:56435 rtc_ios_xctest_test("apprtcmobile_tests") {
436 info_plist = "objc/AppRTCMobile/ios/Info.plist"
437 sources = [
438 "objc/AppRTCMobile/ios/main.m",
439 ]
440 deps = [
441 ":apprtcmobile_test_sources",
442 ]
443 ldflags = [ "-all_load" ]
444 }
adam.fedordc478c52016-11-07 22:53:28445 }
446 }
tkchin78fe5422016-08-08 04:37:45447}
kthelgason7a5c2ac2016-08-08 16:03:23448
449if (is_linux || is_win) {
ehmaldonado7eed79e2016-08-26 20:31:24450 config("peerconnection_client_warnings_config") {
kjellander7209af22016-09-18 15:12:29451 cflags = []
ehmaldonado7eed79e2016-08-26 20:31:24452 if (is_win && is_clang) {
kjellander7209af22016-09-18 15:12:29453 cflags += [
ehmaldonado7eed79e2016-08-26 20:31:24454 # Disable warnings failing when compiling with Clang on Windows.
455 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
456 "-Wno-format",
457
458 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
459 # for -Wno-reorder and -Wno-sign-compare
460 "-Wno-reorder",
461 "-Wno-sign-compare",
462 ]
463 }
kjellanderc75068b2016-09-07 09:33:01464 if (is_linux && target_cpu == "x86") {
kjellander7209af22016-09-18 15:12:29465 cflags += [
kjellanderc75068b2016-09-07 09:33:01466 # Needed to compile on Linux 32-bit.
467 "-Wno-sentinel",
468 ]
469 }
kjellander7209af22016-09-18 15:12:29470
471 if (is_clang) {
472 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
473 # set of warnings.
474 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
475 cflags += [ "-Wno-inconsistent-missing-override" ]
476 }
ehmaldonado7eed79e2016-08-26 20:31:24477 }
478
ehmaldonadof0532f32016-09-02 11:10:34479 rtc_executable("peerconnection_client") {
kjellanderfe8285d2017-03-06 08:29:21480 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23481 sources = [
482 "peerconnection/client/conductor.cc",
483 "peerconnection/client/conductor.h",
484 "peerconnection/client/defaults.cc",
485 "peerconnection/client/defaults.h",
486 "peerconnection/client/peer_connection_client.cc",
487 "peerconnection/client/peer_connection_client.h",
488 ]
ehmaldonado1d492192016-09-05 08:35:44489
kjellandera6c66232016-10-17 06:56:12490 if (!build_with_chromium && is_clang) {
491 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34492 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23493 }
kjellanderfe8285d2017-03-06 08:29:21494 deps = []
kthelgason7a5c2ac2016-08-08 16:03:23495 if (is_win) {
496 sources += [
497 "peerconnection/client/flagdefs.h",
498 "peerconnection/client/main.cc",
499 "peerconnection/client/main_wnd.cc",
500 "peerconnection/client/main_wnd.h",
501 ]
502 cflags = [ "/wd4245" ]
503 configs += [ "//build/config/win:windowed" ]
kjellanderfe8285d2017-03-06 08:29:21504 deps += [ "//webrtc/media:rtc_media_base" ]
kthelgason7a5c2ac2016-08-08 16:03:23505 }
506 if (is_linux) {
507 sources += [
508 "peerconnection/client/linux/main.cc",
509 "peerconnection/client/linux/main_wnd.cc",
510 "peerconnection/client/linux/main_wnd.h",
511 ]
Henrik Kjellander37c38302017-03-27 06:28:27512 cflags = [ "-Wno-deprecated-declarations" ]
kthelgason7a5c2ac2016-08-08 16:03:23513 libs = [
514 "X11",
515 "Xcomposite",
516 "Xext",
517 "Xrender",
518 ]
thomasanderson4fefda72016-12-13 10:57:43519 deps += [ "//build/config/linux/gtk" ]
kthelgason7a5c2ac2016-08-08 16:03:23520 }
ehmaldonado7eed79e2016-08-26 20:31:24521 configs += [ ":peerconnection_client_warnings_config" ]
kjellanderfe8285d2017-03-06 08:29:21522
523 deps += [
524 "//third_party/libyuv",
525 "//webrtc/api:libjingle_peerconnection_test_api",
526 "//webrtc/api:video_frame_api",
ehmaldonado4f870fc2017-07-10 12:58:42527 "//webrtc/base:rtc_base",
528 "//webrtc/base:rtc_base_approved",
529 "//webrtc/base:rtc_json",
kjellanderfe8285d2017-03-06 08:29:21530 "//webrtc/media:rtc_media",
531 "//webrtc/modules/video_capture:video_capture_module",
532 "//webrtc/pc:libjingle_peerconnection",
533 "//webrtc/system_wrappers:field_trial_default",
534 "//webrtc/system_wrappers:metrics_default",
535 ]
kthelgason7a5c2ac2016-08-08 16:03:23536 }
kjellanderc75068b2016-09-07 09:33:01537
ehmaldonadof0532f32016-09-02 11:10:34538 rtc_executable("peerconnection_server") {
kjellanderfe8285d2017-03-06 08:29:21539 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23540 sources = [
541 "peerconnection/server/data_socket.cc",
542 "peerconnection/server/data_socket.h",
543 "peerconnection/server/main.cc",
544 "peerconnection/server/peer_channel.cc",
545 "peerconnection/server/peer_channel.h",
546 "peerconnection/server/utils.cc",
547 "peerconnection/server/utils.h",
548 ]
549 deps = [
550 "//webrtc:webrtc_common",
ehmaldonado4f870fc2017-07-10 12:58:42551 "//webrtc/base:rtc_base_approved",
kjellandere51fcf72017-06-30 10:04:59552 "//webrtc/rtc_tools:command_line_parser",
kthelgason7a5c2ac2016-08-08 16:03:23553 ]
kjellandera6c66232016-10-17 06:56:12554 if (!build_with_chromium && is_clang) {
555 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34556 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23557 }
558 }
ehmaldonadof0532f32016-09-02 11:10:34559 rtc_executable("relayserver") {
kjellanderfe8285d2017-03-06 08:29:21560 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23561 sources = [
562 "relayserver/relayserver_main.cc",
563 ]
564 deps = [
ehmaldonado4f870fc2017-07-10 12:58:42565 "../base:rtc_base",
566 "//webrtc/base:rtc_base_approved",
kjellanderfe8285d2017-03-06 08:29:21567 "//webrtc/p2p:rtc_p2p",
kthelgason7a5c2ac2016-08-08 16:03:23568 "//webrtc/pc:rtc_pc",
569 "//webrtc/system_wrappers:field_trial_default",
570 "//webrtc/system_wrappers:metrics_default",
571 ]
kjellandera6c66232016-10-17 06:56:12572 if (!build_with_chromium && is_clang) {
573 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34574 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23575 }
576 }
ehmaldonadof0532f32016-09-02 11:10:34577 rtc_executable("turnserver") {
kjellanderfe8285d2017-03-06 08:29:21578 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23579 sources = [
580 "turnserver/turnserver_main.cc",
581 ]
582 deps = [
ehmaldonado4f870fc2017-07-10 12:58:42583 "../base:rtc_base",
584 "//webrtc/base:rtc_base_approved",
kjellanderfe8285d2017-03-06 08:29:21585 "//webrtc/p2p:rtc_p2p",
kthelgason7a5c2ac2016-08-08 16:03:23586 "//webrtc/pc:rtc_pc",
587 "//webrtc/system_wrappers:field_trial_default",
588 "//webrtc/system_wrappers:metrics_default",
589 ]
kjellandera6c66232016-10-17 06:56:12590 if (!build_with_chromium && is_clang) {
591 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34592 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23593 }
594 }
ehmaldonadof0532f32016-09-02 11:10:34595 rtc_executable("stunserver") {
kjellanderfe8285d2017-03-06 08:29:21596 testonly = true
kthelgason7a5c2ac2016-08-08 16:03:23597 sources = [
598 "stunserver/stunserver_main.cc",
599 ]
600 deps = [
ehmaldonado4f870fc2017-07-10 12:58:42601 "../base:rtc_base",
602 "//webrtc/base:rtc_base_approved",
kjellanderfe8285d2017-03-06 08:29:21603 "//webrtc/p2p:rtc_p2p",
kthelgason7a5c2ac2016-08-08 16:03:23604 "//webrtc/pc:rtc_pc",
605 "//webrtc/system_wrappers:field_trial_default",
606 "//webrtc/system_wrappers:metrics_default",
607 ]
kjellandera6c66232016-10-17 06:56:12608 if (!build_with_chromium && is_clang) {
609 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonadof0532f32016-09-02 11:10:34610 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason7a5c2ac2016-08-08 16:03:23611 }
612 }
613}
charujaineceae882016-11-01 10:09:15614
gyzhouacce9752017-05-11 23:10:03615if (is_win) {
616 rtc_shared_library("webrtc_unity_plugin") {
617 testonly = true
618 sources = [
619 "unityplugin/simple_peer_connection.cc",
620 "unityplugin/simple_peer_connection.h",
621 "unityplugin/unity_plugin_apis.cc",
622 "unityplugin/unity_plugin_apis.h",
623 ]
624 if (!build_with_chromium && is_clang) {
625 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
626 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
627 }
628 cflags = [ "/wd4245" ]
629 configs += [
630 "//build/config/win:windowed",
631 ":peerconnection_client_warnings_config",
632 ]
633 deps = [
634 "//webrtc/api:libjingle_peerconnection_test_api",
635 "//webrtc/api:video_frame_api",
ehmaldonado4f870fc2017-07-10 12:58:42636 "//webrtc/base:rtc_base",
637 "//webrtc/base:rtc_base_approved",
638 "//webrtc/base:rtc_json",
gyzhouacce9752017-05-11 23:10:03639 "//webrtc/media:rtc_media",
640 "//webrtc/media:rtc_media_base",
641 "//webrtc/modules/video_capture:video_capture_module",
642 "//webrtc/pc:libjingle_peerconnection",
643 "//webrtc/system_wrappers:field_trial_default",
644 "//webrtc/system_wrappers:metrics_default",
645 ]
646 }
647}
648
charujaineceae882016-11-01 10:09:15649if (!build_with_chromium) {
650 # Doesn't build within Chrome on Win.
651 rtc_executable("stun_prober") {
kjellanderfe8285d2017-03-06 08:29:21652 testonly = true
charujaineceae882016-11-01 10:09:15653 sources = [
654 "stunprober/main.cc",
655 ]
656
657 if (!build_with_chromium && is_clang) {
658 # Suppress warnings from Chrome's Clang plugins.
659 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
660 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
661 }
662
663 deps = [
ehmaldonado4f870fc2017-07-10 12:58:42664 "../base:rtc_base",
665 "../base:rtc_base_approved",
charujaineceae882016-11-01 10:09:15666 "../p2p:libstunprober",
667 "../p2p:rtc_p2p",
668 "../system_wrappers:field_trial_default",
669 ]
670 }
671}