Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: webrtc/sdk/BUILD.gn

Issue 2849823002: Extract iOS SDK helpers to separate target. (Closed)
Patch Set: Fix more targets in //webrtc/sdk Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The WebRTC project authors. All Rights Reserved. 1 # Copyright 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 import("../webrtc.gni") 9 import("../webrtc.gni")
10 if (is_ios) { 10 if (is_ios) {
11 import("//build/config/ios/rules.gni") 11 import("//build/config/ios/rules.gni")
12 } 12 }
13 13
14 group("sdk") { 14 group("sdk") {
15 if (is_ios) { 15 if (is_ios) {
16 public_deps = [ 16 public_deps = [
17 ":rtc_sdk_framework_objc", 17 ":rtc_sdk_framework_objc",
18 ] 18 ]
19 } 19 }
20 } 20 }
21 21
22 if (is_ios || is_mac) { 22 if (is_ios || is_mac) {
23 config("rtc_sdk_common_objc_config") { 23 config("rtc_sdk_common_objc_config") {
24 include_dirs = [ 24 include_dirs = [
25 "objc/Framework/Classes", 25 "objc/Framework/Classes",
26 "objc/Framework/Headers", 26 "objc/Framework/Headers",
27 ] 27 ]
28 } 28 }
29 29
30 rtc_static_library("rtc_sdk_helpers_objc") {
31 sources = [
32 "objc/Framework/Classes/helpers.h",
33 "objc/Framework/Classes/helpers.mm",
34 ]
35 deps = [
36 "../base:rtc_base_approved",
37 ]
38 configs += [ "..:common_objc" ]
39
40 if (is_ios) {
41 libs = [ "AVFoundation.framework" ]
42 }
43 }
44
30 rtc_static_library("rtc_sdk_common_objc") { 45 rtc_static_library("rtc_sdk_common_objc") {
31 sources = [ 46 sources = [
32 "objc/Framework/Classes/NSString+StdString.h", 47 "objc/Framework/Classes/NSString+StdString.h",
33 "objc/Framework/Classes/NSString+StdString.mm", 48 "objc/Framework/Classes/NSString+StdString.mm",
34 "objc/Framework/Classes/RTCDispatcher.m", 49 "objc/Framework/Classes/RTCDispatcher.m",
35 "objc/Framework/Classes/RTCFieldTrials.mm", 50 "objc/Framework/Classes/RTCFieldTrials.mm",
36 "objc/Framework/Classes/RTCLogging.mm", 51 "objc/Framework/Classes/RTCLogging.mm",
37 "objc/Framework/Classes/RTCMetrics.mm", 52 "objc/Framework/Classes/RTCMetrics.mm",
38 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", 53 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h",
39 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", 54 "objc/Framework/Classes/RTCMetricsSampleInfo.mm",
40 "objc/Framework/Classes/RTCSSLAdapter.mm", 55 "objc/Framework/Classes/RTCSSLAdapter.mm",
41 "objc/Framework/Classes/RTCTracing.mm", 56 "objc/Framework/Classes/RTCTracing.mm",
42 "objc/Framework/Classes/helpers.h",
43 "objc/Framework/Classes/helpers.mm",
44 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", 57 "objc/Framework/Headers/WebRTC/RTCDispatcher.h",
45 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", 58 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h",
46 "objc/Framework/Headers/WebRTC/RTCLogging.h", 59 "objc/Framework/Headers/WebRTC/RTCLogging.h",
47 "objc/Framework/Headers/WebRTC/RTCMacros.h", 60 "objc/Framework/Headers/WebRTC/RTCMacros.h",
48 "objc/Framework/Headers/WebRTC/RTCMetrics.h", 61 "objc/Framework/Headers/WebRTC/RTCMetrics.h",
49 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", 62 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h",
50 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", 63 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h",
51 "objc/Framework/Headers/WebRTC/RTCTracing.h", 64 "objc/Framework/Headers/WebRTC/RTCTracing.h",
52 ] 65 ]
53 deps = [ 66 deps = [
67 ":rtc_sdk_helpers_objc",
54 "../base:rtc_base", 68 "../base:rtc_base",
55 ] 69 ]
56 configs += [ "..:common_objc" ] 70 configs += [ "..:common_objc" ]
57 71
58 public_configs = [ ":rtc_sdk_common_objc_config" ] 72 public_configs = [ ":rtc_sdk_common_objc_config" ]
59 if (is_ios) { 73 if (is_ios) {
60 sources += [ 74 sources += [
61 "objc/Framework/Classes/RTCCameraPreviewView.m", 75 "objc/Framework/Classes/RTCCameraPreviewView.m",
62 "objc/Framework/Classes/RTCUIApplication.h", 76 "objc/Framework/Classes/RTCUIApplication.h",
63 "objc/Framework/Classes/RTCUIApplication.mm", 77 "objc/Framework/Classes/RTCUIApplication.mm",
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 } 279 }
266 280
267 if (rtc_include_tests) { 281 if (rtc_include_tests) {
268 rtc_source_set("rtc_sdk_peerconnection_objc_unittests") { 282 rtc_source_set("rtc_sdk_peerconnection_objc_unittests") {
269 testonly = true 283 testonly = true
270 284
271 # Skip restricting visibility on mobile platforms since the tests on those 285 # Skip restricting visibility on mobile platforms since the tests on those
272 # gets additional generated targets which would require many lines here to 286 # gets additional generated targets which would require many lines here to
273 # cover (which would be confusing to read and hard to maintain). 287 # cover (which would be confusing to read and hard to maintain).
274 if (!is_android && !is_ios) { 288 if (!is_android && !is_ios) {
275 visibility = [ "//webrtc:rtc_unittests" ] 289 visibility = [ "../:rtc_unittests" ]
276 } 290 }
277 sources = [ 291 sources = [
278 "objc/Framework/UnitTests/RTCConfigurationTest.mm", 292 "objc/Framework/UnitTests/RTCConfigurationTest.mm",
279 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", 293 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm",
280 "objc/Framework/UnitTests/RTCIceCandidateTest.mm", 294 "objc/Framework/UnitTests/RTCIceCandidateTest.mm",
281 "objc/Framework/UnitTests/RTCIceServerTest.mm", 295 "objc/Framework/UnitTests/RTCIceServerTest.mm",
282 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", 296 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm",
283 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", 297 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm",
284 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", 298 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm",
285 "objc/Framework/UnitTests/avformatmappertests.mm", 299 "objc/Framework/UnitTests/avformatmappertests.mm",
286 ] 300 ]
287 if (is_ios) { 301 if (is_ios) {
288 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] 302 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ]
289 if (current_cpu != "arm64") { 303 if (current_cpu != "arm64") {
290 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] 304 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ]
291 } 305 }
292 } 306 }
293 307
294 # TODO(tkchin): Cleanup this warning. 308 # TODO(tkchin): Cleanup this warning.
295 cflags = [ "-Wno-objc-property-no-attribute" ] 309 cflags = [ "-Wno-objc-property-no-attribute" ]
296 310
297 # |-ObjC| flag needed to make sure category method implementations 311 # |-ObjC| flag needed to make sure category method implementations
298 # are included: 312 # are included:
299 # https://developer.apple.com/library/mac/qa/qa1490/_index.html 313 # https://developer.apple.com/library/mac/qa/qa1490/_index.html
300 ldflags = [ "-ObjC" ] 314 ldflags = [ "-ObjC" ]
301 315
302 defines = [ "GTEST_RELATIVE_PATH" ] 316 defines = [ "GTEST_RELATIVE_PATH" ]
303 deps = [ 317 deps = [
304 ":rtc_sdk_peerconnection_objc", 318 ":rtc_sdk_peerconnection_objc",
319 "..//system_wrappers:system_wrappers_default",
305 "../base:rtc_base_tests_utils", 320 "../base:rtc_base_tests_utils",
306 "//third_party/ocmock", 321 "//third_party/ocmock",
307 "//webrtc/system_wrappers:system_wrappers_default",
308 ] 322 ]
309 323
310 if (!build_with_chromium && is_clang) { 324 if (!build_with_chromium && is_clang) {
311 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) . 325 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) .
312 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 326 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
313 } 327 }
314 } 328 }
315 } 329 }
316 330
317 if (is_ios) { 331 if (is_ios) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) 413 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
400 configs -= [ "//build/config/clang:find_bad_constructs" ] 414 configs -= [ "//build/config/clang:find_bad_constructs" ]
401 } 415 }
402 } 416 }
403 } 417 }
404 418
405 rtc_static_library("rtc_sdk_objc") { 419 rtc_static_library("rtc_sdk_objc") {
406 complete_static_lib = true 420 complete_static_lib = true
407 deps = [ 421 deps = [
408 ":rtc_sdk_peerconnection_objc", 422 ":rtc_sdk_peerconnection_objc",
409 "//webrtc/system_wrappers:field_trial_default", 423 "..//system_wrappers:field_trial_default",
410 "//webrtc/system_wrappers:metrics_default", 424 "..//system_wrappers:metrics_default",
411 ] 425 ]
412 } 426 }
413 427
414 rtc_static_library("webrtc_h264_video_toolbox") { 428 rtc_static_library("webrtc_h264_video_toolbox") {
415 sources = [ 429 sources = [
416 "objc/Framework/Classes/h264_video_toolbox_decoder.cc", 430 "objc/Framework/Classes/h264_video_toolbox_decoder.cc",
417 "objc/Framework/Classes/h264_video_toolbox_decoder.h", 431 "objc/Framework/Classes/h264_video_toolbox_decoder.h",
418 "objc/Framework/Classes/h264_video_toolbox_encoder.h", 432 "objc/Framework/Classes/h264_video_toolbox_encoder.h",
419 "objc/Framework/Classes/h264_video_toolbox_encoder.mm", 433 "objc/Framework/Classes/h264_video_toolbox_encoder.mm",
420 "objc/Framework/Classes/h264_video_toolbox_nalu.cc", 434 "objc/Framework/Classes/h264_video_toolbox_nalu.cc",
421 "objc/Framework/Classes/h264_video_toolbox_nalu.h", 435 "objc/Framework/Classes/h264_video_toolbox_nalu.h",
422 ] 436 ]
423 437
424 configs += [ "//webrtc:common_objc" ] 438 configs += [ "../:common_objc" ]
425 439
426 deps = [ 440 deps = [
427 ":rtc_sdk_common_objc", 441 ":rtc_sdk_common_objc",
428 "../api:video_frame_api", 442 "../api:video_frame_api",
429 "../base:rtc_base_approved", 443 "../base:rtc_base_approved",
430 "../common_video", 444 "../common_video",
431 "../media:rtc_media_base", 445 "../media:rtc_media_base",
432 "../modules:module_api", 446 "../modules:module_api",
433 "../modules/video_coding:video_coding_utility", 447 "../modules/video_coding:video_coding_utility",
434 "../modules/video_coding:webrtc_h264", 448 "../modules/video_coding:webrtc_h264",
(...skipping 16 matching lines...) Expand all
451 deps += [ "$rtc_libyuv_dir" ] 465 deps += [ "$rtc_libyuv_dir" ]
452 public_deps = [ 466 public_deps = [
453 "$rtc_libyuv_dir", 467 "$rtc_libyuv_dir",
454 ] 468 ]
455 } else { 469 } else {
456 # Need to add a directory normally exported by libyuv. 470 # Need to add a directory normally exported by libyuv.
457 include_dirs = [ "$rtc_libyuv_dir/include" ] 471 include_dirs = [ "$rtc_libyuv_dir/include" ]
458 } 472 }
459 } 473 }
460 } 474 }
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/BUILD.gn ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698