blob: a1f02314401f6e59178c2bd7fa84cb11b97ddb40 [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 = [
mandermo9890a582016-10-27 07:26:36 -070097 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -070098 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
99 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
100 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200101
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200102 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200103
104 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200105 ":AppRTCMobile_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200106 "//webrtc/api:libjingle_peerconnection_java",
107 ]
mandermo9890a582016-10-27 07:26:36 -0700108
109 data = [
110 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
111 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200112 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200113}
tkchin2ddfdba2016-08-07 21:37:45 -0700114
115if (is_ios || (is_mac && target_cpu != "x86")) {
116 config("warnings_config") {
117 # GN orders flags on a target before flags from configs. The default config
118 # adds these flags so to cancel them out they need to come from a config and
119 # cannot be on the target directly.
120 if (is_ios) {
121 # Suppress compiler warnings about deprecated that triggered
122 # when moving from ios_deployment_target 7.0 to 9.0.
123 # See webrtc:5549 for more details.
124 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700125 cflags_objc = [
126 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
127 # See webrtc:6520.
128 "-Wno-objc-missing-property-synthesis",
129 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700130 }
131 }
132
133 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200134 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700135 }
136
kjellanderb62dbbe2016-09-23 00:38:52 -0700137 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700138 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200139 "objc/AppRTCMobile/common/ARDUtilities.h",
140 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700141 ]
142 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700143 ":warnings_config",
144 "//build/config/compiler:enable_arc",
145 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700146 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700147
148 deps = [
149 "../sdk:rtc_sdk_common_objc",
150 "../system_wrappers:field_trial_default",
151 "../system_wrappers:metrics_default",
152 ]
153 }
154
155 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200156 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700157
158 # GN orders flags on a target before flags from configs. The default config
159 # adds these flags so to cancel them out they need to come from a config and
160 # cannot be on the target directly.
161 cflags = [
162 "-Wno-sign-compare",
163 "-Wno-unused-variable",
164 ]
165 if (is_mac) {
166 cflags += [ "-Wno-partial-availability" ]
167 }
168 }
169
kjellanderb62dbbe2016-09-23 00:38:52 -0700170 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700171 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200172 "objc/AppRTCMobile/ARDAppClient+Internal.h",
173 "objc/AppRTCMobile/ARDAppClient.h",
174 "objc/AppRTCMobile/ARDAppClient.m",
175 "objc/AppRTCMobile/ARDAppEngineClient.h",
176 "objc/AppRTCMobile/ARDAppEngineClient.m",
177 "objc/AppRTCMobile/ARDBitrateTracker.h",
178 "objc/AppRTCMobile/ARDBitrateTracker.m",
179 "objc/AppRTCMobile/ARDCEODTURNClient.h",
180 "objc/AppRTCMobile/ARDCEODTURNClient.m",
181 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
182 "objc/AppRTCMobile/ARDJoinResponse.h",
183 "objc/AppRTCMobile/ARDJoinResponse.m",
184 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
185 "objc/AppRTCMobile/ARDMessageResponse.h",
186 "objc/AppRTCMobile/ARDMessageResponse.m",
187 "objc/AppRTCMobile/ARDRoomServerClient.h",
188 "objc/AppRTCMobile/ARDSDPUtils.h",
189 "objc/AppRTCMobile/ARDSDPUtils.m",
190 "objc/AppRTCMobile/ARDSignalingChannel.h",
191 "objc/AppRTCMobile/ARDSignalingMessage.h",
192 "objc/AppRTCMobile/ARDSignalingMessage.m",
193 "objc/AppRTCMobile/ARDStatsBuilder.h",
194 "objc/AppRTCMobile/ARDStatsBuilder.m",
195 "objc/AppRTCMobile/ARDTURNClient.h",
196 "objc/AppRTCMobile/ARDWebSocketChannel.h",
197 "objc/AppRTCMobile/ARDWebSocketChannel.m",
198 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
199 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
200 "objc/AppRTCMobile/RTCIceServer+JSON.h",
201 "objc/AppRTCMobile/RTCIceServer+JSON.m",
202 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
203 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
204 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
205 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700206 ]
207 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700208 "//build/config/compiler:enable_arc",
209 ":warnings_config",
210 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700211 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700212 deps = [
213 ":apprtc_common",
214 ":socketrocket",
215 ]
216 public_deps = [
217 "../sdk:rtc_sdk_peerconnection_objc",
218 ]
219 libs = [ "QuartzCore.framework" ]
220 }
221
222 if (is_ios) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200223 ios_app_bundle("AppRTCMobile") {
tkchin2ddfdba2016-08-07 21:37:45 -0700224 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200225 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
226 "objc/AppRTCMobile/ios/ARDMainView.h",
227 "objc/AppRTCMobile/ios/ARDMainView.m",
228 "objc/AppRTCMobile/ios/ARDMainViewController.h",
229 "objc/AppRTCMobile/ios/ARDMainViewController.m",
230 "objc/AppRTCMobile/ios/ARDStatsView.h",
231 "objc/AppRTCMobile/ios/ARDStatsView.m",
232 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
233 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
234 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
235 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
236 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
237 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
238 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
239 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700240 ]
241
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200242 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700243
244 configs += [
245 "..:common_config",
246 "//build/config/compiler:enable_arc",
247 ":warnings_config",
248 ]
249 public_configs = [ "..:common_inherited_config" ]
250
251 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200252 ":AppRTCMobile_ios_bundle_data",
tkchin2ddfdba2016-08-07 21:37:45 -0700253 ":apprtc_common",
254 ":apprtc_signaling",
255 ]
256
257 if (target_cpu == "x86") {
258 deps += [ "//testing/iossim:iossim" ]
259 }
260 }
261
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200262 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700263 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200264 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
265 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
266 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
267 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
268 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
269 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
270 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
271 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
272 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
273 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
274 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
275 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
276 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700277 "objc/Icon.png",
278 ]
279 outputs = [
280 "{{bundle_resources_dir}}/{{source_file_part}}",
281 ]
282 }
283 }
284
285 if (is_mac) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200286 rtc_static_library("AppRTCMobile_app") {
tkchin2ddfdba2016-08-07 21:37:45 -0700287 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200288 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
289 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
290 "objc/AppRTCMobile/mac/APPRTCViewController.h",
291 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700292 ]
293 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700294 "..:common_objc",
295 "//build/config/compiler:enable_arc",
296 ]
297 deps = [
298 ":apprtc_common",
299 ":apprtc_signaling",
300 ]
301 }
302
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200303 mac_app_bundle("AppRTCMobile") {
304 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700305
306 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
307
308 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200309 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700310 ]
311
312 public_configs = [ "..:common_inherited_config" ]
313
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200314 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700315
316 libs = [ "AppKit.framework" ]
317
318 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200319 ":AppRTCMobile_app",
tkchin2ddfdba2016-08-07 21:37:45 -0700320 ]
321 }
322 }
323
324 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200325 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700326 }
327
328 config("socketrocket_warning_config") {
329 # GN orders flags on a target before flags from configs. The default config
330 # adds these flags so to cancel them out they need to come from a config and
331 # cannot be on the target directly.
332 cflags = [
333 "-Wno-deprecated-declarations",
334 "-Wno-nonnull",
335 "-Wno-objc-missing-property-synthesis",
336 "-Wno-semicolon-before-method-body",
337 "-Wno-unused-variable",
338 ]
339
henrika27d8b612016-09-21 04:13:00 -0700340 cflags_objc = [
341 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
342 "-Wno-objc-missing-property-synthesis",
343
344 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
345 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
346 "-Wno-unused-result",
347 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700348
349 if (is_mac) {
350 cflags += [ "-Wno-partial-availability" ]
351 }
352 }
353
kjellanderb62dbbe2016-09-23 00:38:52 -0700354 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700355 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200356 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
357 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700358 ]
359 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700360 "//build/config/compiler:enable_arc",
361 ":socketrocket_warning_config",
362 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700363 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700364
365 libs = [
366 "CFNetwork.framework",
367 "icucore",
368 ]
369 }
370}
kthelgason0727f152016-08-08 09:03:23 -0700371
372if (is_linux || is_win) {
373 if (is_linux) {
374 pkg_config("gtk2_config") {
375 # Gtk requires gmodule, but it does not list it as a dependency in some
376 # misconfigured systems.
377 packages = [
378 "gmodule-2.0",
379 "gtk+-2.0",
380 "gthread-2.0",
381 ]
382 }
383 }
384
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700385 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700386 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700387 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700388 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700389 # Disable warnings failing when compiling with Clang on Windows.
390 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
391 "-Wno-format",
392
393 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
394 # for -Wno-reorder and -Wno-sign-compare
395 "-Wno-reorder",
396 "-Wno-sign-compare",
397 ]
398 }
kjellanderd4626e52016-09-07 02:33:01 -0700399 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700400 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700401 # Needed to compile on Linux 32-bit.
402 "-Wno-sentinel",
403 ]
404 }
kjellander4a9abad2016-09-18 08:12:29 -0700405
406 if (is_clang) {
407 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
408 # set of warnings.
409 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
410 cflags += [ "-Wno-inconsistent-missing-override" ]
411 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700412 }
413
ehmaldonado38a21322016-09-02 04:10:34 -0700414 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700415 sources = [
416 "peerconnection/client/conductor.cc",
417 "peerconnection/client/conductor.h",
418 "peerconnection/client/defaults.cc",
419 "peerconnection/client/defaults.h",
420 "peerconnection/client/peer_connection_client.cc",
421 "peerconnection/client/peer_connection_client.h",
422 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700423
kjellandere40a7ee2016-10-16 23:56:12 -0700424 if (!build_with_chromium && is_clang) {
425 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700426 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700427 }
428 if (is_win) {
429 sources += [
430 "peerconnection/client/flagdefs.h",
431 "peerconnection/client/main.cc",
432 "peerconnection/client/main_wnd.cc",
433 "peerconnection/client/main_wnd.h",
434 ]
435 cflags = [ "/wd4245" ]
436 configs += [ "//build/config/win:windowed" ]
437 }
438 if (is_linux) {
439 sources += [
440 "peerconnection/client/linux/main.cc",
441 "peerconnection/client/linux/main_wnd.cc",
442 "peerconnection/client/linux/main_wnd.h",
443 ]
444 libs = [
445 "X11",
446 "Xcomposite",
447 "Xext",
448 "Xrender",
449 ]
450 public_configs = [ ":gtk2_config" ]
451 }
452 deps = [
nisse9f8e37b2016-09-01 01:06:23 -0700453 "//third_party/libyuv",
kthelgason0727f152016-08-08 09:03:23 -0700454 "//webrtc/api:libjingle_peerconnection",
455 "//webrtc/system_wrappers:field_trial_default",
456 "//webrtc/system_wrappers:metrics_default",
457 ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700458 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700459 if (rtc_build_json) {
460 deps += [ "//third_party/jsoncpp" ]
461 }
462 }
kjellanderd4626e52016-09-07 02:33:01 -0700463
ehmaldonado38a21322016-09-02 04:10:34 -0700464 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700465 sources = [
466 "peerconnection/server/data_socket.cc",
467 "peerconnection/server/data_socket.h",
468 "peerconnection/server/main.cc",
469 "peerconnection/server/peer_channel.cc",
470 "peerconnection/server/peer_channel.h",
471 "peerconnection/server/utils.cc",
472 "peerconnection/server/utils.h",
473 ]
474 deps = [
475 "//webrtc:webrtc_common",
476 "//webrtc/base:rtc_base_approved",
477 "//webrtc/tools:command_line_parser",
478 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700479 if (!build_with_chromium && is_clang) {
480 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700481 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700482 }
483 }
ehmaldonado38a21322016-09-02 04:10:34 -0700484 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700485 sources = [
486 "relayserver/relayserver_main.cc",
487 ]
488 deps = [
489 "//webrtc/base:rtc_base_approved",
490 "//webrtc/pc:rtc_pc",
491 "//webrtc/system_wrappers:field_trial_default",
492 "//webrtc/system_wrappers:metrics_default",
493 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700494 if (!build_with_chromium && is_clang) {
495 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700496 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700497 }
498 }
ehmaldonado38a21322016-09-02 04:10:34 -0700499 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700500 sources = [
501 "turnserver/turnserver_main.cc",
502 ]
503 deps = [
504 "//webrtc/base:rtc_base_approved",
505 "//webrtc/pc:rtc_pc",
506 "//webrtc/system_wrappers:field_trial_default",
507 "//webrtc/system_wrappers:metrics_default",
508 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700509 if (!build_with_chromium && is_clang) {
510 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700511 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700512 }
513 }
ehmaldonado38a21322016-09-02 04:10:34 -0700514 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700515 sources = [
516 "stunserver/stunserver_main.cc",
517 ]
518 deps = [
519 "//webrtc/base:rtc_base_approved",
520 "//webrtc/pc:rtc_pc",
521 "//webrtc/system_wrappers:field_trial_default",
522 "//webrtc/system_wrappers:metrics_default",
523 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700524 if (!build_with_chromium && is_clang) {
525 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700526 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700527 }
528 }
529}