blob: d78c28774ae040f5cd21569c1affd2a5fc349879 [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") {
kjellander705ecc52016-09-15 00:53:26 -070023 public_deps = []
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020024
tkchin2ddfdba2016-08-07 21:37:45 -070025 if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020026 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020027 }
kthelgason0727f152016-08-08 09:03:23 -070028 if (is_linux) {
kjellander705ecc52016-09-15 00:53:26 -070029 public_deps += [
kthelgason0727f152016-08-08 09:03:23 -070030 ":peerconnection_client",
31 ":peerconnection_server",
32 ":relayserver",
33 ":stunserver",
34 ":turnserver",
35 ]
36 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020037}
38
tkchin2ddfdba2016-08-07 21:37:45 -070039if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020040 android_apk("AppRTCMobile") {
41 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020042 android_manifest = "androidapp/AndroidManifest.xml"
43
44 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020045 ":AppRTCMobile_javalib",
46 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020047 "//base:base_java",
48 "//webrtc/base:base_java",
49 ]
50
51 shared_libraries = [ "//webrtc/api:libjingle_peerconnection_so" ]
52 }
53
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020054 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020055 java_files = [
56 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
57 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
58 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
59 "androidapp/src/org/appspot/apprtc/CallActivity.java",
60 "androidapp/src/org/appspot/apprtc/CallFragment.java",
61 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
62 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
63 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
64 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
65 "androidapp/src/org/appspot/apprtc/HudFragment.java",
66 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
67 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
68 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
69 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
70 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
71 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
72 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
73 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
74 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
75 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
76 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020077 ]
78
79 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020080 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020081 "//webrtc/api:libjingle_peerconnection_java",
82 "//webrtc/base:base_java",
83 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
84 ]
85 }
86
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020087 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020088 resource_dirs = [ "androidapp/res" ]
89 custom_package = "org.appspot.apprtc"
90 }
91
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020092 instrumentation_test_apk("AppRTCMobileTest") {
93 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020094 android_manifest = "androidtests/AndroidManifest.xml"
95
mandermoa8bec8d2016-10-26 01:47:07 -070096 java_files = [
97 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
98 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
99 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200100
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200101 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200102
103 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200104 ":AppRTCMobile_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200105 "//webrtc/api:libjingle_peerconnection_java",
106 ]
107 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200108}
tkchin2ddfdba2016-08-07 21:37:45 -0700109
110if (is_ios || (is_mac && target_cpu != "x86")) {
111 config("warnings_config") {
112 # GN orders flags on a target before flags from configs. The default config
113 # adds these flags so to cancel them out they need to come from a config and
114 # cannot be on the target directly.
115 if (is_ios) {
116 # Suppress compiler warnings about deprecated that triggered
117 # when moving from ios_deployment_target 7.0 to 9.0.
118 # See webrtc:5549 for more details.
119 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700120 cflags_objc = [
121 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
122 # See webrtc:6520.
123 "-Wno-objc-missing-property-synthesis",
124 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700125 }
126 }
127
128 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200129 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700130 }
131
kjellanderb62dbbe2016-09-23 00:38:52 -0700132 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700133 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200134 "objc/AppRTCMobile/common/ARDUtilities.h",
135 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700136 ]
137 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700138 ":warnings_config",
139 "//build/config/compiler:enable_arc",
140 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700141 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700142
143 deps = [
144 "../sdk:rtc_sdk_common_objc",
145 "../system_wrappers:field_trial_default",
146 "../system_wrappers:metrics_default",
147 ]
148 }
149
150 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200151 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700152
153 # GN orders flags on a target before flags from configs. The default config
154 # adds these flags so to cancel them out they need to come from a config and
155 # cannot be on the target directly.
156 cflags = [
157 "-Wno-sign-compare",
158 "-Wno-unused-variable",
159 ]
160 if (is_mac) {
161 cflags += [ "-Wno-partial-availability" ]
162 }
163 }
164
kjellanderb62dbbe2016-09-23 00:38:52 -0700165 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700166 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200167 "objc/AppRTCMobile/ARDAppClient+Internal.h",
168 "objc/AppRTCMobile/ARDAppClient.h",
169 "objc/AppRTCMobile/ARDAppClient.m",
170 "objc/AppRTCMobile/ARDAppEngineClient.h",
171 "objc/AppRTCMobile/ARDAppEngineClient.m",
172 "objc/AppRTCMobile/ARDBitrateTracker.h",
173 "objc/AppRTCMobile/ARDBitrateTracker.m",
174 "objc/AppRTCMobile/ARDCEODTURNClient.h",
175 "objc/AppRTCMobile/ARDCEODTURNClient.m",
176 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
177 "objc/AppRTCMobile/ARDJoinResponse.h",
178 "objc/AppRTCMobile/ARDJoinResponse.m",
179 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
180 "objc/AppRTCMobile/ARDMessageResponse.h",
181 "objc/AppRTCMobile/ARDMessageResponse.m",
182 "objc/AppRTCMobile/ARDRoomServerClient.h",
183 "objc/AppRTCMobile/ARDSDPUtils.h",
184 "objc/AppRTCMobile/ARDSDPUtils.m",
185 "objc/AppRTCMobile/ARDSignalingChannel.h",
186 "objc/AppRTCMobile/ARDSignalingMessage.h",
187 "objc/AppRTCMobile/ARDSignalingMessage.m",
188 "objc/AppRTCMobile/ARDStatsBuilder.h",
189 "objc/AppRTCMobile/ARDStatsBuilder.m",
190 "objc/AppRTCMobile/ARDTURNClient.h",
191 "objc/AppRTCMobile/ARDWebSocketChannel.h",
192 "objc/AppRTCMobile/ARDWebSocketChannel.m",
193 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
194 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
195 "objc/AppRTCMobile/RTCIceServer+JSON.h",
196 "objc/AppRTCMobile/RTCIceServer+JSON.m",
197 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
198 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
199 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
200 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700201 ]
202 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700203 "//build/config/compiler:enable_arc",
204 ":warnings_config",
205 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700206 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700207 deps = [
208 ":apprtc_common",
209 ":socketrocket",
210 ]
211 public_deps = [
212 "../sdk:rtc_sdk_peerconnection_objc",
213 ]
214 libs = [ "QuartzCore.framework" ]
215 }
216
217 if (is_ios) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200218 ios_app_bundle("AppRTCMobile") {
tkchin2ddfdba2016-08-07 21:37:45 -0700219 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200220 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
221 "objc/AppRTCMobile/ios/ARDMainView.h",
222 "objc/AppRTCMobile/ios/ARDMainView.m",
223 "objc/AppRTCMobile/ios/ARDMainViewController.h",
224 "objc/AppRTCMobile/ios/ARDMainViewController.m",
225 "objc/AppRTCMobile/ios/ARDStatsView.h",
226 "objc/AppRTCMobile/ios/ARDStatsView.m",
227 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
228 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
229 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
230 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
231 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
232 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
233 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
234 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700235 ]
236
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200237 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700238
239 configs += [
240 "..:common_config",
241 "//build/config/compiler:enable_arc",
242 ":warnings_config",
243 ]
244 public_configs = [ "..:common_inherited_config" ]
245
246 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200247 ":AppRTCMobile_ios_bundle_data",
tkchin2ddfdba2016-08-07 21:37:45 -0700248 ":apprtc_common",
249 ":apprtc_signaling",
250 ]
251
252 if (target_cpu == "x86") {
253 deps += [ "//testing/iossim:iossim" ]
254 }
255 }
256
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200257 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700258 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200259 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
260 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
261 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
262 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
263 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
264 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
265 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
266 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
267 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
268 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
269 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
270 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
271 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700272 "objc/Icon.png",
273 ]
274 outputs = [
275 "{{bundle_resources_dir}}/{{source_file_part}}",
276 ]
277 }
278 }
279
280 if (is_mac) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200281 rtc_static_library("AppRTCMobile_app") {
tkchin2ddfdba2016-08-07 21:37:45 -0700282 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200283 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
284 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
285 "objc/AppRTCMobile/mac/APPRTCViewController.h",
286 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700287 ]
288 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700289 "..:common_objc",
290 "//build/config/compiler:enable_arc",
291 ]
292 deps = [
293 ":apprtc_common",
294 ":apprtc_signaling",
295 ]
296 }
297
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200298 mac_app_bundle("AppRTCMobile") {
299 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700300
301 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
302
303 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200304 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700305 ]
306
307 public_configs = [ "..:common_inherited_config" ]
308
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200309 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700310
311 libs = [ "AppKit.framework" ]
312
313 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200314 ":AppRTCMobile_app",
tkchin2ddfdba2016-08-07 21:37:45 -0700315 ]
316 }
317 }
318
319 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200320 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700321 }
322
323 config("socketrocket_warning_config") {
324 # GN orders flags on a target before flags from configs. The default config
325 # adds these flags so to cancel them out they need to come from a config and
326 # cannot be on the target directly.
327 cflags = [
328 "-Wno-deprecated-declarations",
329 "-Wno-nonnull",
330 "-Wno-objc-missing-property-synthesis",
331 "-Wno-semicolon-before-method-body",
332 "-Wno-unused-variable",
333 ]
334
henrika27d8b612016-09-21 04:13:00 -0700335 cflags_objc = [
336 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
337 "-Wno-objc-missing-property-synthesis",
338
339 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
340 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
341 "-Wno-unused-result",
342 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700343
344 if (is_mac) {
345 cflags += [ "-Wno-partial-availability" ]
346 }
347 }
348
kjellanderb62dbbe2016-09-23 00:38:52 -0700349 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700350 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200351 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
352 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700353 ]
354 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700355 "//build/config/compiler:enable_arc",
356 ":socketrocket_warning_config",
357 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700358 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700359
360 libs = [
361 "CFNetwork.framework",
362 "icucore",
363 ]
364 }
365}
kthelgason0727f152016-08-08 09:03:23 -0700366
367if (is_linux || is_win) {
368 if (is_linux) {
369 pkg_config("gtk2_config") {
370 # Gtk requires gmodule, but it does not list it as a dependency in some
371 # misconfigured systems.
372 packages = [
373 "gmodule-2.0",
374 "gtk+-2.0",
375 "gthread-2.0",
376 ]
377 }
378 }
379
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700380 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700381 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700382 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700383 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700384 # Disable warnings failing when compiling with Clang on Windows.
385 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
386 "-Wno-format",
387
388 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
389 # for -Wno-reorder and -Wno-sign-compare
390 "-Wno-reorder",
391 "-Wno-sign-compare",
392 ]
393 }
kjellanderd4626e52016-09-07 02:33:01 -0700394 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700395 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700396 # Needed to compile on Linux 32-bit.
397 "-Wno-sentinel",
398 ]
399 }
kjellander4a9abad2016-09-18 08:12:29 -0700400
401 if (is_clang) {
402 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
403 # set of warnings.
404 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
405 cflags += [ "-Wno-inconsistent-missing-override" ]
406 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700407 }
408
ehmaldonado38a21322016-09-02 04:10:34 -0700409 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700410 sources = [
411 "peerconnection/client/conductor.cc",
412 "peerconnection/client/conductor.h",
413 "peerconnection/client/defaults.cc",
414 "peerconnection/client/defaults.h",
415 "peerconnection/client/peer_connection_client.cc",
416 "peerconnection/client/peer_connection_client.h",
417 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700418
kjellandere40a7ee2016-10-16 23:56:12 -0700419 if (!build_with_chromium && is_clang) {
420 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700421 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700422 }
423 if (is_win) {
424 sources += [
425 "peerconnection/client/flagdefs.h",
426 "peerconnection/client/main.cc",
427 "peerconnection/client/main_wnd.cc",
428 "peerconnection/client/main_wnd.h",
429 ]
430 cflags = [ "/wd4245" ]
431 configs += [ "//build/config/win:windowed" ]
432 }
433 if (is_linux) {
434 sources += [
435 "peerconnection/client/linux/main.cc",
436 "peerconnection/client/linux/main_wnd.cc",
437 "peerconnection/client/linux/main_wnd.h",
438 ]
439 libs = [
440 "X11",
441 "Xcomposite",
442 "Xext",
443 "Xrender",
444 ]
445 public_configs = [ ":gtk2_config" ]
446 }
447 deps = [
nisse9f8e37b2016-09-01 01:06:23 -0700448 "//third_party/libyuv",
kthelgason0727f152016-08-08 09:03:23 -0700449 "//webrtc/api:libjingle_peerconnection",
450 "//webrtc/system_wrappers:field_trial_default",
451 "//webrtc/system_wrappers:metrics_default",
452 ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700453 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700454 if (rtc_build_json) {
455 deps += [ "//third_party/jsoncpp" ]
456 }
457 }
kjellanderd4626e52016-09-07 02:33:01 -0700458
ehmaldonado38a21322016-09-02 04:10:34 -0700459 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700460 sources = [
461 "peerconnection/server/data_socket.cc",
462 "peerconnection/server/data_socket.h",
463 "peerconnection/server/main.cc",
464 "peerconnection/server/peer_channel.cc",
465 "peerconnection/server/peer_channel.h",
466 "peerconnection/server/utils.cc",
467 "peerconnection/server/utils.h",
468 ]
469 deps = [
470 "//webrtc:webrtc_common",
471 "//webrtc/base:rtc_base_approved",
472 "//webrtc/tools:command_line_parser",
473 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700474 if (!build_with_chromium && is_clang) {
475 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700476 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700477 }
478 }
ehmaldonado38a21322016-09-02 04:10:34 -0700479 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700480 sources = [
481 "relayserver/relayserver_main.cc",
482 ]
483 deps = [
484 "//webrtc/base:rtc_base_approved",
485 "//webrtc/pc:rtc_pc",
486 "//webrtc/system_wrappers:field_trial_default",
487 "//webrtc/system_wrappers:metrics_default",
488 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700489 if (!build_with_chromium && is_clang) {
490 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700491 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700492 }
493 }
ehmaldonado38a21322016-09-02 04:10:34 -0700494 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700495 sources = [
496 "turnserver/turnserver_main.cc",
497 ]
498 deps = [
499 "//webrtc/base:rtc_base_approved",
500 "//webrtc/pc:rtc_pc",
501 "//webrtc/system_wrappers:field_trial_default",
502 "//webrtc/system_wrappers:metrics_default",
503 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700504 if (!build_with_chromium && is_clang) {
505 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700506 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700507 }
508 }
ehmaldonado38a21322016-09-02 04:10:34 -0700509 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700510 sources = [
511 "stunserver/stunserver_main.cc",
512 ]
513 deps = [
514 "//webrtc/base:rtc_base_approved",
515 "//webrtc/pc:rtc_pc",
516 "//webrtc/system_wrappers:field_trial_default",
517 "//webrtc/system_wrappers:metrics_default",
518 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700519 if (!build_with_chromium && is_clang) {
520 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700521 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700522 }
523 }
524}