blob: 64ff05b43057076fbe6382f5c925f15be2fb2dd5 [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
ehmaldonado38a21322016-09-02 04:10:34 -07009import("../build/webrtc.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020010if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
tkchin2ddfdba2016-08-07 21:37:45 -070013} else if (is_mac) {
14 import("//build/config/mac/rules.gni")
15} else if (is_ios) {
16 import("//build/config/ios/rules.gni")
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020017}
kthelgason0727f152016-08-08 09:03:23 -070018if (is_linux) {
19 import("//build/config/linux/pkg_config.gni")
20}
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020021
22group("examples") {
kjellander6ceab082016-10-28 05:44:03 -070023 # This target shall build all targets in examples.
24 testonly = true
kjellander705ecc52016-09-15 00:53:26 -070025 public_deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020026
tkchin2ddfdba2016-08-07 21:37:45 -070027 if (is_android) {
kjellander6ceab082016-10-28 05:44:03 -070028 public_deps += [
29 ":AppRTCMobile",
30 ":AppRTCMobileTest",
31 ]
32 }
33
34 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020035 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020036 }
kjellander6ceab082016-10-28 05:44:03 -070037
38 if (is_linux || is_win) {
kjellander705ecc52016-09-15 00:53:26 -070039 public_deps += [
kthelgason0727f152016-08-08 09:03:23 -070040 ":peerconnection_client",
41 ":peerconnection_server",
42 ":relayserver",
43 ":stunserver",
44 ":turnserver",
45 ]
46 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020047}
48
tkchin2ddfdba2016-08-07 21:37:45 -070049if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020050 android_apk("AppRTCMobile") {
51 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020052 android_manifest = "androidapp/AndroidManifest.xml"
53
54 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020055 ":AppRTCMobile_javalib",
56 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020057 "//base:base_java",
58 "//webrtc/base:base_java",
59 ]
60
61 shared_libraries = [ "//webrtc/api:libjingle_peerconnection_so" ]
62 }
63
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020064 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020065 java_files = [
66 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
67 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
68 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
69 "androidapp/src/org/appspot/apprtc/CallActivity.java",
70 "androidapp/src/org/appspot/apprtc/CallFragment.java",
71 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
72 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
73 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
74 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
75 "androidapp/src/org/appspot/apprtc/HudFragment.java",
76 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
77 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
78 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
79 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
80 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
81 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
82 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
83 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
84 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
85 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
86 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020087 ]
88
89 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020090 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020091 "//webrtc/api:libjingle_peerconnection_java",
92 "//webrtc/base:base_java",
93 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
94 ]
95 }
96
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020097 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020098 resource_dirs = [ "androidapp/res" ]
99 custom_package = "org.appspot.apprtc"
100 }
101
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200102 instrumentation_test_apk("AppRTCMobileTest") {
103 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200104 android_manifest = "androidtests/AndroidManifest.xml"
105
mandermoa8bec8d2016-10-26 01:47:07 -0700106 java_files = [
mandermo9890a582016-10-27 07:26:36 -0700107 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -0700108 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
109 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
110 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200111
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200112 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200113
114 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200115 ":AppRTCMobile_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200116 "//webrtc/api:libjingle_peerconnection_java",
117 ]
mandermo9890a582016-10-27 07:26:36 -0700118
119 data = [
120 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
121 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200122 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200123}
tkchin2ddfdba2016-08-07 21:37:45 -0700124
125if (is_ios || (is_mac && target_cpu != "x86")) {
126 config("warnings_config") {
127 # GN orders flags on a target before flags from configs. The default config
128 # adds these flags so to cancel them out they need to come from a config and
129 # cannot be on the target directly.
130 if (is_ios) {
131 # Suppress compiler warnings about deprecated that triggered
132 # when moving from ios_deployment_target 7.0 to 9.0.
133 # See webrtc:5549 for more details.
134 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700135 cflags_objc = [
136 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
137 # See webrtc:6520.
138 "-Wno-objc-missing-property-synthesis",
139 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700140 }
141 }
142
143 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200144 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700145 }
146
kjellanderb62dbbe2016-09-23 00:38:52 -0700147 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700148 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200149 "objc/AppRTCMobile/common/ARDUtilities.h",
150 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700151 ]
152 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700153 ":warnings_config",
154 "//build/config/compiler:enable_arc",
155 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700156 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700157
158 deps = [
159 "../sdk:rtc_sdk_common_objc",
160 "../system_wrappers:field_trial_default",
161 "../system_wrappers:metrics_default",
162 ]
163 }
164
165 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200166 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700167
168 # GN orders flags on a target before flags from configs. The default config
169 # adds these flags so to cancel them out they need to come from a config and
170 # cannot be on the target directly.
171 cflags = [
172 "-Wno-sign-compare",
173 "-Wno-unused-variable",
174 ]
175 if (is_mac) {
176 cflags += [ "-Wno-partial-availability" ]
177 }
178 }
179
kjellanderb62dbbe2016-09-23 00:38:52 -0700180 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700181 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200182 "objc/AppRTCMobile/ARDAppClient+Internal.h",
183 "objc/AppRTCMobile/ARDAppClient.h",
184 "objc/AppRTCMobile/ARDAppClient.m",
185 "objc/AppRTCMobile/ARDAppEngineClient.h",
186 "objc/AppRTCMobile/ARDAppEngineClient.m",
187 "objc/AppRTCMobile/ARDBitrateTracker.h",
188 "objc/AppRTCMobile/ARDBitrateTracker.m",
189 "objc/AppRTCMobile/ARDCEODTURNClient.h",
190 "objc/AppRTCMobile/ARDCEODTURNClient.m",
191 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
192 "objc/AppRTCMobile/ARDJoinResponse.h",
193 "objc/AppRTCMobile/ARDJoinResponse.m",
194 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
195 "objc/AppRTCMobile/ARDMessageResponse.h",
196 "objc/AppRTCMobile/ARDMessageResponse.m",
197 "objc/AppRTCMobile/ARDRoomServerClient.h",
198 "objc/AppRTCMobile/ARDSDPUtils.h",
199 "objc/AppRTCMobile/ARDSDPUtils.m",
200 "objc/AppRTCMobile/ARDSignalingChannel.h",
201 "objc/AppRTCMobile/ARDSignalingMessage.h",
202 "objc/AppRTCMobile/ARDSignalingMessage.m",
203 "objc/AppRTCMobile/ARDStatsBuilder.h",
204 "objc/AppRTCMobile/ARDStatsBuilder.m",
205 "objc/AppRTCMobile/ARDTURNClient.h",
206 "objc/AppRTCMobile/ARDWebSocketChannel.h",
207 "objc/AppRTCMobile/ARDWebSocketChannel.m",
208 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
209 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
210 "objc/AppRTCMobile/RTCIceServer+JSON.h",
211 "objc/AppRTCMobile/RTCIceServer+JSON.m",
212 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
213 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
214 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
215 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700216 ]
217 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700218 "//build/config/compiler:enable_arc",
219 ":warnings_config",
220 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700221 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700222 deps = [
223 ":apprtc_common",
224 ":socketrocket",
225 ]
226 public_deps = [
227 "../sdk:rtc_sdk_peerconnection_objc",
228 ]
229 libs = [ "QuartzCore.framework" ]
230 }
231
232 if (is_ios) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200233 ios_app_bundle("AppRTCMobile") {
tkchin2ddfdba2016-08-07 21:37:45 -0700234 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200235 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
236 "objc/AppRTCMobile/ios/ARDMainView.h",
237 "objc/AppRTCMobile/ios/ARDMainView.m",
238 "objc/AppRTCMobile/ios/ARDMainViewController.h",
239 "objc/AppRTCMobile/ios/ARDMainViewController.m",
240 "objc/AppRTCMobile/ios/ARDStatsView.h",
241 "objc/AppRTCMobile/ios/ARDStatsView.m",
242 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
243 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
244 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
245 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
246 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
247 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
248 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
249 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700250 ]
251
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200252 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700253
254 configs += [
255 "..:common_config",
256 "//build/config/compiler:enable_arc",
257 ":warnings_config",
258 ]
259 public_configs = [ "..:common_inherited_config" ]
260
261 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200262 ":AppRTCMobile_ios_bundle_data",
tkchin2ddfdba2016-08-07 21:37:45 -0700263 ":apprtc_common",
264 ":apprtc_signaling",
265 ]
266
267 if (target_cpu == "x86") {
268 deps += [ "//testing/iossim:iossim" ]
269 }
270 }
271
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200272 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700273 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200274 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
275 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
276 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
277 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
278 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
279 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
280 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
281 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700282 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
283 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200284 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
285 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
286 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
287 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
288 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700289 "objc/Icon.png",
290 ]
291 outputs = [
292 "{{bundle_resources_dir}}/{{source_file_part}}",
293 ]
294 }
295 }
296
297 if (is_mac) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200298 rtc_static_library("AppRTCMobile_app") {
tkchin2ddfdba2016-08-07 21:37:45 -0700299 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200300 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
301 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
302 "objc/AppRTCMobile/mac/APPRTCViewController.h",
303 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700304 ]
305 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700306 "..:common_objc",
307 "//build/config/compiler:enable_arc",
308 ]
309 deps = [
310 ":apprtc_common",
311 ":apprtc_signaling",
312 ]
313 }
314
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200315 mac_app_bundle("AppRTCMobile") {
316 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700317
318 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
319
320 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200321 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700322 ]
323
324 public_configs = [ "..:common_inherited_config" ]
325
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200326 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700327
328 libs = [ "AppKit.framework" ]
329
330 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200331 ":AppRTCMobile_app",
tkchin2ddfdba2016-08-07 21:37:45 -0700332 ]
333 }
334 }
335
336 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200337 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700338 }
339
340 config("socketrocket_warning_config") {
341 # GN orders flags on a target before flags from configs. The default config
342 # adds these flags so to cancel them out they need to come from a config and
343 # cannot be on the target directly.
344 cflags = [
345 "-Wno-deprecated-declarations",
346 "-Wno-nonnull",
347 "-Wno-objc-missing-property-synthesis",
348 "-Wno-semicolon-before-method-body",
349 "-Wno-unused-variable",
350 ]
351
henrika27d8b612016-09-21 04:13:00 -0700352 cflags_objc = [
353 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
354 "-Wno-objc-missing-property-synthesis",
355
356 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
357 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
358 "-Wno-unused-result",
359 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700360
361 if (is_mac) {
362 cflags += [ "-Wno-partial-availability" ]
363 }
364 }
365
kjellanderb62dbbe2016-09-23 00:38:52 -0700366 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700367 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200368 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
369 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700370 ]
371 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700372 "//build/config/compiler:enable_arc",
373 ":socketrocket_warning_config",
374 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700375 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700376
377 libs = [
378 "CFNetwork.framework",
379 "icucore",
380 ]
381 }
382}
kthelgason0727f152016-08-08 09:03:23 -0700383
384if (is_linux || is_win) {
385 if (is_linux) {
386 pkg_config("gtk2_config") {
387 # Gtk requires gmodule, but it does not list it as a dependency in some
388 # misconfigured systems.
389 packages = [
390 "gmodule-2.0",
391 "gtk+-2.0",
392 "gthread-2.0",
393 ]
394 }
395 }
396
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700397 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700398 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700399 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700400 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700401 # Disable warnings failing when compiling with Clang on Windows.
402 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
403 "-Wno-format",
404
405 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
406 # for -Wno-reorder and -Wno-sign-compare
407 "-Wno-reorder",
408 "-Wno-sign-compare",
409 ]
410 }
kjellanderd4626e52016-09-07 02:33:01 -0700411 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700412 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700413 # Needed to compile on Linux 32-bit.
414 "-Wno-sentinel",
415 ]
416 }
kjellander4a9abad2016-09-18 08:12:29 -0700417
418 if (is_clang) {
419 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
420 # set of warnings.
421 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
422 cflags += [ "-Wno-inconsistent-missing-override" ]
423 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700424 }
425
ehmaldonado38a21322016-09-02 04:10:34 -0700426 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700427 sources = [
428 "peerconnection/client/conductor.cc",
429 "peerconnection/client/conductor.h",
430 "peerconnection/client/defaults.cc",
431 "peerconnection/client/defaults.h",
432 "peerconnection/client/peer_connection_client.cc",
433 "peerconnection/client/peer_connection_client.h",
434 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700435
kjellandere40a7ee2016-10-16 23:56:12 -0700436 if (!build_with_chromium && is_clang) {
437 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700438 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700439 }
440 if (is_win) {
441 sources += [
442 "peerconnection/client/flagdefs.h",
443 "peerconnection/client/main.cc",
444 "peerconnection/client/main_wnd.cc",
445 "peerconnection/client/main_wnd.h",
446 ]
447 cflags = [ "/wd4245" ]
448 configs += [ "//build/config/win:windowed" ]
449 }
450 if (is_linux) {
451 sources += [
452 "peerconnection/client/linux/main.cc",
453 "peerconnection/client/linux/main_wnd.cc",
454 "peerconnection/client/linux/main_wnd.h",
455 ]
456 libs = [
457 "X11",
458 "Xcomposite",
459 "Xext",
460 "Xrender",
461 ]
462 public_configs = [ ":gtk2_config" ]
463 }
464 deps = [
nisse9f8e37b2016-09-01 01:06:23 -0700465 "//third_party/libyuv",
kthelgason0727f152016-08-08 09:03:23 -0700466 "//webrtc/api:libjingle_peerconnection",
467 "//webrtc/system_wrappers:field_trial_default",
468 "//webrtc/system_wrappers:metrics_default",
469 ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700470 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700471 if (rtc_build_json) {
472 deps += [ "//third_party/jsoncpp" ]
473 }
474 }
kjellanderd4626e52016-09-07 02:33:01 -0700475
ehmaldonado38a21322016-09-02 04:10:34 -0700476 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700477 sources = [
478 "peerconnection/server/data_socket.cc",
479 "peerconnection/server/data_socket.h",
480 "peerconnection/server/main.cc",
481 "peerconnection/server/peer_channel.cc",
482 "peerconnection/server/peer_channel.h",
483 "peerconnection/server/utils.cc",
484 "peerconnection/server/utils.h",
485 ]
486 deps = [
487 "//webrtc:webrtc_common",
488 "//webrtc/base:rtc_base_approved",
489 "//webrtc/tools:command_line_parser",
490 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700491 if (!build_with_chromium && is_clang) {
492 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700493 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700494 }
495 }
ehmaldonado38a21322016-09-02 04:10:34 -0700496 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700497 sources = [
498 "relayserver/relayserver_main.cc",
499 ]
500 deps = [
501 "//webrtc/base:rtc_base_approved",
502 "//webrtc/pc:rtc_pc",
503 "//webrtc/system_wrappers:field_trial_default",
504 "//webrtc/system_wrappers:metrics_default",
505 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700506 if (!build_with_chromium && is_clang) {
507 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700508 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700509 }
510 }
ehmaldonado38a21322016-09-02 04:10:34 -0700511 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700512 sources = [
513 "turnserver/turnserver_main.cc",
514 ]
515 deps = [
516 "//webrtc/base:rtc_base_approved",
517 "//webrtc/pc:rtc_pc",
518 "//webrtc/system_wrappers:field_trial_default",
519 "//webrtc/system_wrappers:metrics_default",
520 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700521 if (!build_with_chromium && is_clang) {
522 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700523 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700524 }
525 }
ehmaldonado38a21322016-09-02 04:10:34 -0700526 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700527 sources = [
528 "stunserver/stunserver_main.cc",
529 ]
530 deps = [
531 "//webrtc/base:rtc_base_approved",
532 "//webrtc/pc:rtc_pc",
533 "//webrtc/system_wrappers:field_trial_default",
534 "//webrtc/system_wrappers:metrics_default",
535 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700536 if (!build_with_chromium && is_clang) {
537 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700538 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700539 }
540 }
541}