OLD | NEW |
1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 1 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
2 # | 2 # |
3 # Use of this source code is governed by a BSD-style license | 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 | 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 | 5 # tree. An additional intellectual property rights grant can be found |
6 # in the file PATENTS. All contributing project authors may | 6 # in the file PATENTS. All contributing project authors may |
7 # be found in the AUTHORS file in the root of the source tree. | 7 # be found in the AUTHORS file in the root of the source tree. |
8 | 8 |
9 if (is_android) { | 9 if (is_android) { |
10 import("//build/config/android/config.gni") | 10 import("//build/config/android/config.gni") |
11 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
| 12 } else if (is_mac) { |
| 13 import("//build/config/mac/rules.gni") |
| 14 } else if (is_ios) { |
| 15 import("//build/config/ios/rules.gni") |
12 } | 16 } |
13 | 17 |
14 group("examples") { | 18 group("examples") { |
15 deps = [] | 19 deps = [] |
16 | 20 |
17 if (is_android && !build_with_chromium) { | 21 if (is_android) { |
18 deps += [ ":AppRTCDemo" ] | 22 deps += [ ":AppRTCDemo" ] |
19 } | 23 } |
20 } | 24 } |
21 | 25 |
22 if (is_android && !build_with_chromium) { | 26 if (is_android) { |
23 android_apk("AppRTCDemo") { | 27 android_apk("AppRTCDemo") { |
24 apk_name = "AppRTCDemo" | 28 apk_name = "AppRTCDemo" |
25 android_manifest = "androidapp/AndroidManifest.xml" | 29 android_manifest = "androidapp/AndroidManifest.xml" |
26 | 30 |
27 deps = [ | 31 deps = [ |
28 ":AppRTCDemo_javalib", | 32 ":AppRTCDemo_javalib", |
29 ":AppRTCDemo_resources", | 33 ":AppRTCDemo_resources", |
30 "//base:base_java", | 34 "//base:base_java", |
31 "//webrtc/base:base_java", | 35 "//webrtc/base:base_java", |
32 ] | 36 ] |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 "androidjunit/src/org/appspot/apprtc/util/LooperExecutorTest.java", | 98 "androidjunit/src/org/appspot/apprtc/util/LooperExecutorTest.java", |
95 ] | 99 ] |
96 | 100 |
97 deps = [ | 101 deps = [ |
98 ":AppRTCDemo_javalib", | 102 ":AppRTCDemo_javalib", |
99 "//webrtc/api:libjingle_peerconnection_java", | 103 "//webrtc/api:libjingle_peerconnection_java", |
100 "//webrtc/api:libjingle_peerconnection_jni", | 104 "//webrtc/api:libjingle_peerconnection_jni", |
101 ] | 105 ] |
102 } | 106 } |
103 } | 107 } |
| 108 |
| 109 if (is_ios || (is_mac && target_cpu != "x86")) { |
| 110 config("warnings_config") { |
| 111 # GN orders flags on a target before flags from configs. The default config |
| 112 # adds these flags so to cancel them out they need to come from a config and |
| 113 # cannot be on the target directly. |
| 114 if (is_ios) { |
| 115 # Suppress compiler warnings about deprecated that triggered |
| 116 # when moving from ios_deployment_target 7.0 to 9.0. |
| 117 # See webrtc:5549 for more details. |
| 118 cflags = [ "-Wno-deprecated-declarations" ] |
| 119 } |
| 120 } |
| 121 |
| 122 config("apprtc_common_config") { |
| 123 include_dirs = [ "objc/AppRTCDemo/common" ] |
| 124 } |
| 125 |
| 126 source_set("apprtc_common") { |
| 127 sources = [ |
| 128 "objc/AppRTCDemo/common/ARDUtilities.h", |
| 129 "objc/AppRTCDemo/common/ARDUtilities.m", |
| 130 ] |
| 131 configs += [ |
| 132 "..:common_config", |
| 133 ":warnings_config", |
| 134 "//build/config/compiler:enable_arc", |
| 135 ] |
| 136 public_configs = [ |
| 137 "..:common_inherited_config", |
| 138 ":apprtc_common_config", |
| 139 ] |
| 140 |
| 141 deps = [ |
| 142 "../sdk:rtc_sdk_common_objc", |
| 143 "../system_wrappers:field_trial_default", |
| 144 "../system_wrappers:metrics_default", |
| 145 ] |
| 146 } |
| 147 |
| 148 config("apprtc_signaling_config") { |
| 149 include_dirs = [ "objc/AppRTCDemo" ] |
| 150 |
| 151 # GN orders flags on a target before flags from configs. The default config |
| 152 # adds these flags so to cancel them out they need to come from a config and |
| 153 # cannot be on the target directly. |
| 154 cflags = [ |
| 155 "-Wno-sign-compare", |
| 156 "-Wno-unused-variable", |
| 157 ] |
| 158 if (is_mac) { |
| 159 cflags += [ "-Wno-partial-availability" ] |
| 160 } |
| 161 } |
| 162 |
| 163 source_set("apprtc_signaling") { |
| 164 sources = [ |
| 165 "objc/AppRTCDemo/ARDAppClient+Internal.h", |
| 166 "objc/AppRTCDemo/ARDAppClient.h", |
| 167 "objc/AppRTCDemo/ARDAppClient.m", |
| 168 "objc/AppRTCDemo/ARDAppEngineClient.h", |
| 169 "objc/AppRTCDemo/ARDAppEngineClient.m", |
| 170 "objc/AppRTCDemo/ARDBitrateTracker.h", |
| 171 "objc/AppRTCDemo/ARDBitrateTracker.m", |
| 172 "objc/AppRTCDemo/ARDCEODTURNClient.h", |
| 173 "objc/AppRTCDemo/ARDCEODTURNClient.m", |
| 174 "objc/AppRTCDemo/ARDJoinResponse+Internal.h", |
| 175 "objc/AppRTCDemo/ARDJoinResponse.h", |
| 176 "objc/AppRTCDemo/ARDJoinResponse.m", |
| 177 "objc/AppRTCDemo/ARDMessageResponse+Internal.h", |
| 178 "objc/AppRTCDemo/ARDMessageResponse.h", |
| 179 "objc/AppRTCDemo/ARDMessageResponse.m", |
| 180 "objc/AppRTCDemo/ARDRoomServerClient.h", |
| 181 "objc/AppRTCDemo/ARDSDPUtils.h", |
| 182 "objc/AppRTCDemo/ARDSDPUtils.m", |
| 183 "objc/AppRTCDemo/ARDSignalingChannel.h", |
| 184 "objc/AppRTCDemo/ARDSignalingMessage.h", |
| 185 "objc/AppRTCDemo/ARDSignalingMessage.m", |
| 186 "objc/AppRTCDemo/ARDStatsBuilder.h", |
| 187 "objc/AppRTCDemo/ARDStatsBuilder.m", |
| 188 "objc/AppRTCDemo/ARDTURNClient.h", |
| 189 "objc/AppRTCDemo/ARDWebSocketChannel.h", |
| 190 "objc/AppRTCDemo/ARDWebSocketChannel.m", |
| 191 "objc/AppRTCDemo/RTCIceCandidate+JSON.h", |
| 192 "objc/AppRTCDemo/RTCIceCandidate+JSON.m", |
| 193 "objc/AppRTCDemo/RTCIceServer+JSON.h", |
| 194 "objc/AppRTCDemo/RTCIceServer+JSON.m", |
| 195 "objc/AppRTCDemo/RTCMediaConstraints+JSON.h", |
| 196 "objc/AppRTCDemo/RTCMediaConstraints+JSON.m", |
| 197 "objc/AppRTCDemo/RTCSessionDescription+JSON.h", |
| 198 "objc/AppRTCDemo/RTCSessionDescription+JSON.m", |
| 199 ] |
| 200 configs += [ |
| 201 "..:common_config", |
| 202 "//build/config/compiler:enable_arc", |
| 203 ":warnings_config", |
| 204 ] |
| 205 public_configs = [ |
| 206 "..:common_inherited_config", |
| 207 ":apprtc_signaling_config", |
| 208 ] |
| 209 deps = [ |
| 210 ":apprtc_common", |
| 211 ":socketrocket", |
| 212 ] |
| 213 public_deps = [ |
| 214 "../sdk:rtc_sdk_peerconnection_objc", |
| 215 ] |
| 216 libs = [ "QuartzCore.framework" ] |
| 217 } |
| 218 |
| 219 if (is_ios) { |
| 220 ios_app_bundle("AppRTCDemo") { |
| 221 sources = [ |
| 222 "objc/AppRTCDemo/ios/ARDAppDelegate.m", |
| 223 "objc/AppRTCDemo/ios/ARDMainView.h", |
| 224 "objc/AppRTCDemo/ios/ARDMainView.m", |
| 225 "objc/AppRTCDemo/ios/ARDMainViewController.h", |
| 226 "objc/AppRTCDemo/ios/ARDMainViewController.m", |
| 227 "objc/AppRTCDemo/ios/ARDStatsView.h", |
| 228 "objc/AppRTCDemo/ios/ARDStatsView.m", |
| 229 "objc/AppRTCDemo/ios/ARDVideoCallView.h", |
| 230 "objc/AppRTCDemo/ios/ARDVideoCallView.m", |
| 231 "objc/AppRTCDemo/ios/ARDVideoCallViewController.h", |
| 232 "objc/AppRTCDemo/ios/ARDVideoCallViewController.m", |
| 233 "objc/AppRTCDemo/ios/AppRTCDemo-Prefix.pch", |
| 234 "objc/AppRTCDemo/ios/UIImage+ARDUtilities.h", |
| 235 "objc/AppRTCDemo/ios/UIImage+ARDUtilities.m", |
| 236 "objc/AppRTCDemo/ios/main.m", |
| 237 ] |
| 238 |
| 239 info_plist = "objc/AppRTCDemo/ios/Info.plist" |
| 240 |
| 241 configs += [ |
| 242 "..:common_config", |
| 243 "//build/config/compiler:enable_arc", |
| 244 ":warnings_config", |
| 245 ] |
| 246 public_configs = [ "..:common_inherited_config" ] |
| 247 |
| 248 deps = [ |
| 249 ":AppRTCDemo_ios_bundle_data", |
| 250 ":apprtc_common", |
| 251 ":apprtc_signaling", |
| 252 ] |
| 253 |
| 254 if (target_cpu == "x86") { |
| 255 deps += [ "//testing/iossim:iossim" ] |
| 256 } |
| 257 } |
| 258 |
| 259 bundle_data("AppRTCDemo_ios_bundle_data") { |
| 260 sources = [ |
| 261 "objc/AppRTCDemo/ios/resources/Roboto-Regular.ttf", |
| 262 "objc/AppRTCDemo/ios/resources/iPhone5@2x.png", |
| 263 "objc/AppRTCDemo/ios/resources/iPhone6@2x.png", |
| 264 "objc/AppRTCDemo/ios/resources/iPhone6p@3x.png", |
| 265 "objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp.png", |
| 266 "objc/AppRTCDemo/ios/resources/ic_call_end_black_24dp@2x.png", |
| 267 "objc/AppRTCDemo/ios/resources/ic_clear_black_24dp.png", |
| 268 "objc/AppRTCDemo/ios/resources/ic_clear_black_24dp@2x.png", |
| 269 "objc/AppRTCDemo/ios/resources/ic_surround_sound_black_24dp.png", |
| 270 "objc/AppRTCDemo/ios/resources/ic_surround_sound_black_24dp@2x.png", |
| 271 "objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp.png", |
| 272 "objc/AppRTCDemo/ios/resources/ic_switch_video_black_24dp@2x.png", |
| 273 "objc/AppRTCDemo/ios/resources/mozart.mp3", |
| 274 "objc/Icon.png", |
| 275 ] |
| 276 outputs = [ |
| 277 "{{bundle_resources_dir}}/{{source_file_part}}", |
| 278 ] |
| 279 } |
| 280 } |
| 281 |
| 282 if (is_mac) { |
| 283 source_set("AppRTCDemo_app") { |
| 284 sources = [ |
| 285 "objc/AppRTCDemo/mac/APPRTCAppDelegate.h", |
| 286 "objc/AppRTCDemo/mac/APPRTCAppDelegate.m", |
| 287 "objc/AppRTCDemo/mac/APPRTCViewController.h", |
| 288 "objc/AppRTCDemo/mac/APPRTCViewController.m", |
| 289 ] |
| 290 configs += [ |
| 291 "..:common_config", |
| 292 "..:common_objc", |
| 293 "//build/config/compiler:enable_arc", |
| 294 ] |
| 295 deps = [ |
| 296 ":apprtc_common", |
| 297 ":apprtc_signaling", |
| 298 ] |
| 299 } |
| 300 |
| 301 mac_app_bundle("AppRTCDemo") { |
| 302 output_name = "AppRTCDemo" |
| 303 |
| 304 extra_substitutions = [ "MACOSX_DEPLOYMENT_TARGET=10.8" ] |
| 305 |
| 306 sources = [ |
| 307 "objc/AppRTCDemo/mac/main.m", |
| 308 ] |
| 309 |
| 310 public_configs = [ "..:common_inherited_config" ] |
| 311 |
| 312 info_plist = "objc/AppRTCDemo/mac/Info.plist" |
| 313 |
| 314 libs = [ "AppKit.framework" ] |
| 315 |
| 316 deps = [ |
| 317 ":AppRTCDemo_app", |
| 318 ] |
| 319 } |
| 320 } |
| 321 |
| 322 config("socketrocket_include_config") { |
| 323 include_dirs = [ "objc/AppRTCDemo/third_party/SocketRocket" ] |
| 324 } |
| 325 |
| 326 config("socketrocket_warning_config") { |
| 327 # GN orders flags on a target before flags from configs. The default config |
| 328 # adds these flags so to cancel them out they need to come from a config and |
| 329 # cannot be on the target directly. |
| 330 cflags = [ |
| 331 "-Wno-deprecated-declarations", |
| 332 "-Wno-nonnull", |
| 333 "-Wno-objc-missing-property-synthesis", |
| 334 "-Wno-semicolon-before-method-body", |
| 335 "-Wno-unused-variable", |
| 336 ] |
| 337 |
| 338 # Enabled for cflags_objc in build/config/compiler/BUILD.gn. |
| 339 cflags_objc = [ "-Wno-objc-missing-property-synthesis" ] |
| 340 |
| 341 if (is_mac) { |
| 342 cflags += [ "-Wno-partial-availability" ] |
| 343 } |
| 344 } |
| 345 |
| 346 source_set("socketrocket") { |
| 347 sources = [ |
| 348 "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.h", |
| 349 "objc/AppRTCDemo/third_party/SocketRocket/SRWebSocket.m", |
| 350 ] |
| 351 configs += [ |
| 352 "..:common_config", |
| 353 "//build/config/compiler:enable_arc", |
| 354 ":socketrocket_warning_config", |
| 355 ] |
| 356 public_configs = [ |
| 357 "..:common_inherited_config", |
| 358 ":socketrocket_include_config", |
| 359 ] |
| 360 |
| 361 libs = [ |
| 362 "CFNetwork.framework", |
| 363 "icucore", |
| 364 ] |
| 365 } |
| 366 } |
OLD | NEW |