blob: faa05d3b7e0afdd725b4e123080dd0da2cd06cd3 [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
charujainaca3a242016-11-01 03:09:15 -070034 if (!build_with_chromium) {
35 public_deps += [ ":stun_prober" ]
36 }
37
kjellander6ceab082016-10-28 05:44:03 -070038 if (is_ios || (is_mac && target_cpu != "x86")) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020039 public_deps += [ ":AppRTCMobile" ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020040 }
kjellander6ceab082016-10-28 05:44:03 -070041
42 if (is_linux || is_win) {
kjellander705ecc52016-09-15 00:53:26 -070043 public_deps += [
kthelgason0727f152016-08-08 09:03:23 -070044 ":peerconnection_client",
45 ":peerconnection_server",
46 ":relayserver",
47 ":stunserver",
48 ":turnserver",
49 ]
50 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020051}
52
tkchin2ddfdba2016-08-07 21:37:45 -070053if (is_android) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020054 android_apk("AppRTCMobile") {
55 apk_name = "AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020056 android_manifest = "androidapp/AndroidManifest.xml"
57
58 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020059 ":AppRTCMobile_javalib",
60 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020061 "//base:base_java",
62 "//webrtc/base:base_java",
63 ]
64
65 shared_libraries = [ "//webrtc/api:libjingle_peerconnection_so" ]
66 }
67
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020068 android_library("AppRTCMobile_javalib") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020069 java_files = [
70 "androidapp/src/org/appspot/apprtc/AppRTCAudioManager.java",
71 "androidapp/src/org/appspot/apprtc/AppRTCClient.java",
72 "androidapp/src/org/appspot/apprtc/AppRTCProximitySensor.java",
73 "androidapp/src/org/appspot/apprtc/CallActivity.java",
74 "androidapp/src/org/appspot/apprtc/CallFragment.java",
75 "androidapp/src/org/appspot/apprtc/CaptureQualityController.java",
76 "androidapp/src/org/appspot/apprtc/ConnectActivity.java",
77 "androidapp/src/org/appspot/apprtc/CpuMonitor.java",
78 "androidapp/src/org/appspot/apprtc/DirectRTCClient.java",
79 "androidapp/src/org/appspot/apprtc/HudFragment.java",
80 "androidapp/src/org/appspot/apprtc/PeerConnectionClient.java",
81 "androidapp/src/org/appspot/apprtc/PercentFrameLayout.java",
82 "androidapp/src/org/appspot/apprtc/RoomParametersFetcher.java",
83 "androidapp/src/org/appspot/apprtc/SettingsActivity.java",
84 "androidapp/src/org/appspot/apprtc/SettingsFragment.java",
85 "androidapp/src/org/appspot/apprtc/TCPChannelClient.java",
86 "androidapp/src/org/appspot/apprtc/UnhandledExceptionHandler.java",
87 "androidapp/src/org/appspot/apprtc/WebSocketChannelClient.java",
88 "androidapp/src/org/appspot/apprtc/WebSocketRTCClient.java",
89 "androidapp/src/org/appspot/apprtc/util/AppRTCUtils.java",
90 "androidapp/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020091 ]
92
93 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +020094 ":AppRTCMobile_resources",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +020095 "//webrtc/api:libjingle_peerconnection_java",
96 "//webrtc/base:base_java",
97 "//webrtc/examples/androidapp/third_party/autobanh:autobanh_java",
98 ]
99 }
100
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200101 android_resources("AppRTCMobile_resources") {
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200102 resource_dirs = [ "androidapp/res" ]
103 custom_package = "org.appspot.apprtc"
104 }
105
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200106 instrumentation_test_apk("AppRTCMobileTest") {
107 apk_name = "AppRTCMobileTest"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200108 android_manifest = "androidtests/AndroidManifest.xml"
109
mandermoa8bec8d2016-10-26 01:47:07 -0700110 java_files = [
mandermo9890a582016-10-27 07:26:36 -0700111 "androidtests/src/org/appspot/apprtc/test/FileVideoCapturerTest.java",
mandermoa8bec8d2016-10-26 01:47:07 -0700112 "androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java",
113 "androidtests/src/org/appspot/apprtc/test/VideoFileRendererTest.java",
114 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200115
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200116 apk_under_test = ":AppRTCMobile"
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200117
118 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200119 ":AppRTCMobile_javalib",
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200120 "//webrtc/api:libjingle_peerconnection_java",
121 ]
mandermo9890a582016-10-27 07:26:36 -0700122
123 data = [
124 "//webrtc/examples/androidtests/src/org/appspot/apprtc/test/capturetestvideo.y4m",
125 ]
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200126 }
Sami Kalliomaki9c0c75b2016-06-29 14:55:00 +0200127}
tkchin2ddfdba2016-08-07 21:37:45 -0700128
129if (is_ios || (is_mac && target_cpu != "x86")) {
130 config("warnings_config") {
131 # GN orders flags on a target before flags from configs. The default config
132 # adds these flags so to cancel them out they need to come from a config and
133 # cannot be on the target directly.
134 if (is_ios) {
135 # Suppress compiler warnings about deprecated that triggered
136 # when moving from ios_deployment_target 7.0 to 9.0.
137 # See webrtc:5549 for more details.
138 cflags = [ "-Wno-deprecated-declarations" ]
Henrik Kjellander91a57592016-10-12 20:25:34 -0700139 cflags_objc = [
140 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
141 # See webrtc:6520.
142 "-Wno-objc-missing-property-synthesis",
143 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700144 }
145 }
146
147 config("apprtc_common_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200148 include_dirs = [ "objc/AppRTCMobile/common" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700149 }
150
kjellanderb62dbbe2016-09-23 00:38:52 -0700151 rtc_static_library("apprtc_common") {
tkchin2ddfdba2016-08-07 21:37:45 -0700152 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200153 "objc/AppRTCMobile/common/ARDUtilities.h",
154 "objc/AppRTCMobile/common/ARDUtilities.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700155 ]
156 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700157 ":warnings_config",
158 "//build/config/compiler:enable_arc",
159 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700160 public_configs = [ ":apprtc_common_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700161
162 deps = [
163 "../sdk:rtc_sdk_common_objc",
164 "../system_wrappers:field_trial_default",
165 "../system_wrappers:metrics_default",
166 ]
167 }
168
169 config("apprtc_signaling_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200170 include_dirs = [ "objc/AppRTCMobile" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700171
172 # GN orders flags on a target before flags from configs. The default config
173 # adds these flags so to cancel them out they need to come from a config and
174 # cannot be on the target directly.
175 cflags = [
176 "-Wno-sign-compare",
177 "-Wno-unused-variable",
178 ]
179 if (is_mac) {
180 cflags += [ "-Wno-partial-availability" ]
181 }
182 }
183
kjellanderb62dbbe2016-09-23 00:38:52 -0700184 rtc_static_library("apprtc_signaling") {
tkchin2ddfdba2016-08-07 21:37:45 -0700185 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200186 "objc/AppRTCMobile/ARDAppClient+Internal.h",
187 "objc/AppRTCMobile/ARDAppClient.h",
188 "objc/AppRTCMobile/ARDAppClient.m",
189 "objc/AppRTCMobile/ARDAppEngineClient.h",
190 "objc/AppRTCMobile/ARDAppEngineClient.m",
191 "objc/AppRTCMobile/ARDBitrateTracker.h",
192 "objc/AppRTCMobile/ARDBitrateTracker.m",
193 "objc/AppRTCMobile/ARDCEODTURNClient.h",
194 "objc/AppRTCMobile/ARDCEODTURNClient.m",
195 "objc/AppRTCMobile/ARDJoinResponse+Internal.h",
196 "objc/AppRTCMobile/ARDJoinResponse.h",
197 "objc/AppRTCMobile/ARDJoinResponse.m",
198 "objc/AppRTCMobile/ARDMessageResponse+Internal.h",
199 "objc/AppRTCMobile/ARDMessageResponse.h",
200 "objc/AppRTCMobile/ARDMessageResponse.m",
201 "objc/AppRTCMobile/ARDRoomServerClient.h",
202 "objc/AppRTCMobile/ARDSDPUtils.h",
203 "objc/AppRTCMobile/ARDSDPUtils.m",
204 "objc/AppRTCMobile/ARDSignalingChannel.h",
205 "objc/AppRTCMobile/ARDSignalingMessage.h",
206 "objc/AppRTCMobile/ARDSignalingMessage.m",
207 "objc/AppRTCMobile/ARDStatsBuilder.h",
208 "objc/AppRTCMobile/ARDStatsBuilder.m",
209 "objc/AppRTCMobile/ARDTURNClient.h",
210 "objc/AppRTCMobile/ARDWebSocketChannel.h",
211 "objc/AppRTCMobile/ARDWebSocketChannel.m",
212 "objc/AppRTCMobile/RTCIceCandidate+JSON.h",
213 "objc/AppRTCMobile/RTCIceCandidate+JSON.m",
214 "objc/AppRTCMobile/RTCIceServer+JSON.h",
215 "objc/AppRTCMobile/RTCIceServer+JSON.m",
216 "objc/AppRTCMobile/RTCMediaConstraints+JSON.h",
217 "objc/AppRTCMobile/RTCMediaConstraints+JSON.m",
218 "objc/AppRTCMobile/RTCSessionDescription+JSON.h",
219 "objc/AppRTCMobile/RTCSessionDescription+JSON.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700220 ]
221 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700222 "//build/config/compiler:enable_arc",
223 ":warnings_config",
224 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700225 public_configs = [ ":apprtc_signaling_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700226 deps = [
227 ":apprtc_common",
228 ":socketrocket",
229 ]
230 public_deps = [
231 "../sdk:rtc_sdk_peerconnection_objc",
232 ]
233 libs = [ "QuartzCore.framework" ]
234 }
235
236 if (is_ios) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200237 ios_app_bundle("AppRTCMobile") {
tkchin2ddfdba2016-08-07 21:37:45 -0700238 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200239 "objc/AppRTCMobile/ios/ARDAppDelegate.m",
240 "objc/AppRTCMobile/ios/ARDMainView.h",
241 "objc/AppRTCMobile/ios/ARDMainView.m",
242 "objc/AppRTCMobile/ios/ARDMainViewController.h",
243 "objc/AppRTCMobile/ios/ARDMainViewController.m",
denicijad17d5362016-11-02 02:56:09 -0700244 "objc/AppRTCMobile/ios/ARDMediaConstraintsModel.h",
245 "objc/AppRTCMobile/ios/ARDMediaConstraintsModel.m",
246 "objc/AppRTCMobile/ios/ARDMediaConstraintsSettingsStore.h",
247 "objc/AppRTCMobile/ios/ARDMediaConstraintsSettingsStore.m",
248 "objc/AppRTCMobile/ios/ARDSettingsViewController.h",
249 "objc/AppRTCMobile/ios/ARDSettingsViewController.m",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200250 "objc/AppRTCMobile/ios/ARDStatsView.h",
251 "objc/AppRTCMobile/ios/ARDStatsView.m",
252 "objc/AppRTCMobile/ios/ARDVideoCallView.h",
253 "objc/AppRTCMobile/ios/ARDVideoCallView.m",
254 "objc/AppRTCMobile/ios/ARDVideoCallViewController.h",
255 "objc/AppRTCMobile/ios/ARDVideoCallViewController.m",
256 "objc/AppRTCMobile/ios/AppRTCMobile-Prefix.pch",
257 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.h",
258 "objc/AppRTCMobile/ios/UIImage+ARDUtilities.m",
259 "objc/AppRTCMobile/ios/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700260 ]
261
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200262 info_plist = "objc/AppRTCMobile/ios/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700263
264 configs += [
265 "..:common_config",
266 "//build/config/compiler:enable_arc",
267 ":warnings_config",
268 ]
269 public_configs = [ "..:common_inherited_config" ]
270
271 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200272 ":AppRTCMobile_ios_bundle_data",
tkchin2ddfdba2016-08-07 21:37:45 -0700273 ":apprtc_common",
274 ":apprtc_signaling",
275 ]
276
277 if (target_cpu == "x86") {
278 deps += [ "//testing/iossim:iossim" ]
279 }
280 }
281
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200282 bundle_data("AppRTCMobile_ios_bundle_data") {
tkchin2ddfdba2016-08-07 21:37:45 -0700283 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200284 "objc/AppRTCMobile/ios/resources/Roboto-Regular.ttf",
285 "objc/AppRTCMobile/ios/resources/iPhone5@2x.png",
286 "objc/AppRTCMobile/ios/resources/iPhone6@2x.png",
287 "objc/AppRTCMobile/ios/resources/iPhone6p@3x.png",
288 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp.png",
289 "objc/AppRTCMobile/ios/resources/ic_call_end_black_24dp@2x.png",
290 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp.png",
291 "objc/AppRTCMobile/ios/resources/ic_clear_black_24dp@2x.png",
denicija6d6762c2016-10-28 04:53:16 -0700292 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp.png",
293 "objc/AppRTCMobile/ios/resources/ic_settings_black_24dp@2x.png",
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200294 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp.png",
295 "objc/AppRTCMobile/ios/resources/ic_surround_sound_black_24dp@2x.png",
296 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp.png",
297 "objc/AppRTCMobile/ios/resources/ic_switch_video_black_24dp@2x.png",
298 "objc/AppRTCMobile/ios/resources/mozart.mp3",
tkchin2ddfdba2016-08-07 21:37:45 -0700299 "objc/Icon.png",
300 ]
301 outputs = [
302 "{{bundle_resources_dir}}/{{source_file_part}}",
303 ]
304 }
305 }
306
307 if (is_mac) {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200308 rtc_static_library("AppRTCMobile_app") {
tkchin2ddfdba2016-08-07 21:37:45 -0700309 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200310 "objc/AppRTCMobile/mac/APPRTCAppDelegate.h",
311 "objc/AppRTCMobile/mac/APPRTCAppDelegate.m",
312 "objc/AppRTCMobile/mac/APPRTCViewController.h",
313 "objc/AppRTCMobile/mac/APPRTCViewController.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700314 ]
315 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700316 "..:common_objc",
317 "//build/config/compiler:enable_arc",
318 ]
319 deps = [
320 ":apprtc_common",
321 ":apprtc_signaling",
322 ]
323 }
324
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200325 mac_app_bundle("AppRTCMobile") {
326 output_name = "AppRTCMobile"
tkchin2ddfdba2016-08-07 21:37:45 -0700327
328 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ]
329
330 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200331 "objc/AppRTCMobile/mac/main.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700332 ]
333
334 public_configs = [ "..:common_inherited_config" ]
335
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200336 info_plist = "objc/AppRTCMobile/mac/Info.plist"
tkchin2ddfdba2016-08-07 21:37:45 -0700337
338 libs = [ "AppKit.framework" ]
339
340 deps = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200341 ":AppRTCMobile_app",
tkchin2ddfdba2016-08-07 21:37:45 -0700342 ]
343 }
344 }
345
346 config("socketrocket_include_config") {
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200347 include_dirs = [ "objc/AppRTCMobile/third_party/SocketRocket" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700348 }
349
350 config("socketrocket_warning_config") {
351 # GN orders flags on a target before flags from configs. The default config
352 # adds these flags so to cancel them out they need to come from a config and
353 # cannot be on the target directly.
354 cflags = [
355 "-Wno-deprecated-declarations",
356 "-Wno-nonnull",
357 "-Wno-objc-missing-property-synthesis",
358 "-Wno-semicolon-before-method-body",
359 "-Wno-unused-variable",
360 ]
361
henrika27d8b612016-09-21 04:13:00 -0700362 cflags_objc = [
363 # Enabled for cflags_objc in build/config/compiler/BUILD.gn.
364 "-Wno-objc-missing-property-synthesis",
365
366 # Hide the warning for SecRandomCopyBytes(), until we update to upstream.
367 # https://bugs.chromium.org/p/webrtc/issues/detail?id=6396
368 "-Wno-unused-result",
369 ]
tkchin2ddfdba2016-08-07 21:37:45 -0700370
371 if (is_mac) {
372 cflags += [ "-Wno-partial-availability" ]
373 }
374 }
375
kjellanderb62dbbe2016-09-23 00:38:52 -0700376 rtc_static_library("socketrocket") {
tkchin2ddfdba2016-08-07 21:37:45 -0700377 sources = [
Magnus Jedvertc1815cf2016-09-27 10:10:41 +0200378 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.h",
379 "objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m",
tkchin2ddfdba2016-08-07 21:37:45 -0700380 ]
381 configs += [
tkchin2ddfdba2016-08-07 21:37:45 -0700382 "//build/config/compiler:enable_arc",
383 ":socketrocket_warning_config",
384 ]
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700385 public_configs = [ ":socketrocket_include_config" ]
tkchin2ddfdba2016-08-07 21:37:45 -0700386
387 libs = [
388 "CFNetwork.framework",
389 "icucore",
390 ]
391 }
392}
kthelgason0727f152016-08-08 09:03:23 -0700393
394if (is_linux || is_win) {
395 if (is_linux) {
396 pkg_config("gtk2_config") {
397 # Gtk requires gmodule, but it does not list it as a dependency in some
398 # misconfigured systems.
399 packages = [
400 "gmodule-2.0",
401 "gtk+-2.0",
402 "gthread-2.0",
403 ]
404 }
405 }
406
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700407 config("peerconnection_client_warnings_config") {
kjellander4a9abad2016-09-18 08:12:29 -0700408 cflags = []
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700409 if (is_win && is_clang) {
kjellander4a9abad2016-09-18 08:12:29 -0700410 cflags += [
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700411 # Disable warnings failing when compiling with Clang on Windows.
412 # https://bugs.chromium.org/p/webrtc/issues/detail?id=5366
413 "-Wno-format",
414
415 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6271
416 # for -Wno-reorder and -Wno-sign-compare
417 "-Wno-reorder",
418 "-Wno-sign-compare",
419 ]
420 }
kjellanderd4626e52016-09-07 02:33:01 -0700421 if (is_linux && target_cpu == "x86") {
kjellander4a9abad2016-09-18 08:12:29 -0700422 cflags += [
kjellanderd4626e52016-09-07 02:33:01 -0700423 # Needed to compile on Linux 32-bit.
424 "-Wno-sentinel",
425 ]
426 }
kjellander4a9abad2016-09-18 08:12:29 -0700427
428 if (is_clang) {
429 # TODO(ehmaldonado): Make peerconnection_client compile with the standard
430 # set of warnings.
431 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6306
432 cflags += [ "-Wno-inconsistent-missing-override" ]
433 }
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700434 }
435
ehmaldonado38a21322016-09-02 04:10:34 -0700436 rtc_executable("peerconnection_client") {
kthelgason0727f152016-08-08 09:03:23 -0700437 sources = [
438 "peerconnection/client/conductor.cc",
439 "peerconnection/client/conductor.h",
440 "peerconnection/client/defaults.cc",
441 "peerconnection/client/defaults.h",
442 "peerconnection/client/peer_connection_client.cc",
443 "peerconnection/client/peer_connection_client.h",
444 ]
ehmaldonado7a2ce0b2016-09-05 01:35:44 -0700445
kjellandere40a7ee2016-10-16 23:56:12 -0700446 if (!build_with_chromium && is_clang) {
447 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700448 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700449 }
450 if (is_win) {
451 sources += [
452 "peerconnection/client/flagdefs.h",
453 "peerconnection/client/main.cc",
454 "peerconnection/client/main_wnd.cc",
455 "peerconnection/client/main_wnd.h",
456 ]
457 cflags = [ "/wd4245" ]
458 configs += [ "//build/config/win:windowed" ]
459 }
460 if (is_linux) {
461 sources += [
462 "peerconnection/client/linux/main.cc",
463 "peerconnection/client/linux/main_wnd.cc",
464 "peerconnection/client/linux/main_wnd.h",
465 ]
466 libs = [
467 "X11",
468 "Xcomposite",
469 "Xext",
470 "Xrender",
471 ]
472 public_configs = [ ":gtk2_config" ]
473 }
474 deps = [
nisse9f8e37b2016-09-01 01:06:23 -0700475 "//third_party/libyuv",
kthelgason0727f152016-08-08 09:03:23 -0700476 "//webrtc/api:libjingle_peerconnection",
477 "//webrtc/system_wrappers:field_trial_default",
478 "//webrtc/system_wrappers:metrics_default",
479 ]
ehmaldonadod02fe4b2016-08-26 13:31:24 -0700480 configs += [ ":peerconnection_client_warnings_config" ]
kthelgason0727f152016-08-08 09:03:23 -0700481 if (rtc_build_json) {
482 deps += [ "//third_party/jsoncpp" ]
483 }
484 }
kjellanderd4626e52016-09-07 02:33:01 -0700485
ehmaldonado38a21322016-09-02 04:10:34 -0700486 rtc_executable("peerconnection_server") {
kthelgason0727f152016-08-08 09:03:23 -0700487 sources = [
488 "peerconnection/server/data_socket.cc",
489 "peerconnection/server/data_socket.h",
490 "peerconnection/server/main.cc",
491 "peerconnection/server/peer_channel.cc",
492 "peerconnection/server/peer_channel.h",
493 "peerconnection/server/utils.cc",
494 "peerconnection/server/utils.h",
495 ]
496 deps = [
497 "//webrtc:webrtc_common",
498 "//webrtc/base:rtc_base_approved",
499 "//webrtc/tools:command_line_parser",
500 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700501 if (!build_with_chromium && is_clang) {
502 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700503 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700504 }
505 }
ehmaldonado38a21322016-09-02 04:10:34 -0700506 rtc_executable("relayserver") {
kthelgason0727f152016-08-08 09:03:23 -0700507 sources = [
508 "relayserver/relayserver_main.cc",
509 ]
510 deps = [
511 "//webrtc/base:rtc_base_approved",
512 "//webrtc/pc:rtc_pc",
513 "//webrtc/system_wrappers:field_trial_default",
514 "//webrtc/system_wrappers:metrics_default",
515 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700516 if (!build_with_chromium && is_clang) {
517 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700518 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700519 }
520 }
ehmaldonado38a21322016-09-02 04:10:34 -0700521 rtc_executable("turnserver") {
kthelgason0727f152016-08-08 09:03:23 -0700522 sources = [
523 "turnserver/turnserver_main.cc",
524 ]
525 deps = [
526 "//webrtc/base:rtc_base_approved",
527 "//webrtc/pc:rtc_pc",
528 "//webrtc/system_wrappers:field_trial_default",
529 "//webrtc/system_wrappers:metrics_default",
530 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700531 if (!build_with_chromium && is_clang) {
532 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700533 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700534 }
535 }
ehmaldonado38a21322016-09-02 04:10:34 -0700536 rtc_executable("stunserver") {
kthelgason0727f152016-08-08 09:03:23 -0700537 sources = [
538 "stunserver/stunserver_main.cc",
539 ]
540 deps = [
541 "//webrtc/base:rtc_base_approved",
542 "//webrtc/pc:rtc_pc",
543 "//webrtc/system_wrappers:field_trial_default",
544 "//webrtc/system_wrappers:metrics_default",
545 ]
kjellandere40a7ee2016-10-16 23:56:12 -0700546 if (!build_with_chromium && is_clang) {
547 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700548 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kthelgason0727f152016-08-08 09:03:23 -0700549 }
550 }
551}
charujainaca3a242016-11-01 03:09:15 -0700552
553if (!build_with_chromium) {
554 # Doesn't build within Chrome on Win.
555 rtc_executable("stun_prober") {
556 sources = [
557 "stunprober/main.cc",
558 ]
559
560 if (!build_with_chromium && is_clang) {
561 # Suppress warnings from Chrome's Clang plugins.
562 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
563 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
564 }
565
566 deps = [
567 "../p2p:libstunprober",
568 "../p2p:rtc_p2p",
569 "../system_wrappers:field_trial_default",
570 ]
571 }
572}