| OLD | NEW |
| 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 | |
| 45 rtc_static_library("rtc_sdk_common_objc") { | 30 rtc_static_library("rtc_sdk_common_objc") { |
| 46 sources = [ | 31 sources = [ |
| 47 "objc/Framework/Classes/NSString+StdString.h", | 32 "objc/Framework/Classes/NSString+StdString.h", |
| 48 "objc/Framework/Classes/NSString+StdString.mm", | 33 "objc/Framework/Classes/NSString+StdString.mm", |
| 49 "objc/Framework/Classes/RTCDispatcher.m", | 34 "objc/Framework/Classes/RTCDispatcher.m", |
| 50 "objc/Framework/Classes/RTCFieldTrials.mm", | 35 "objc/Framework/Classes/RTCFieldTrials.mm", |
| 51 "objc/Framework/Classes/RTCLogging.mm", | 36 "objc/Framework/Classes/RTCLogging.mm", |
| 52 "objc/Framework/Classes/RTCMetrics.mm", | 37 "objc/Framework/Classes/RTCMetrics.mm", |
| 53 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", | 38 "objc/Framework/Classes/RTCMetricsSampleInfo+Private.h", |
| 54 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", | 39 "objc/Framework/Classes/RTCMetricsSampleInfo.mm", |
| 55 "objc/Framework/Classes/RTCSSLAdapter.mm", | 40 "objc/Framework/Classes/RTCSSLAdapter.mm", |
| 56 "objc/Framework/Classes/RTCTracing.mm", | 41 "objc/Framework/Classes/RTCTracing.mm", |
| 42 "objc/Framework/Classes/helpers.h", |
| 43 "objc/Framework/Classes/helpers.mm", |
| 57 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", | 44 "objc/Framework/Headers/WebRTC/RTCDispatcher.h", |
| 58 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", | 45 "objc/Framework/Headers/WebRTC/RTCFieldTrials.h", |
| 59 "objc/Framework/Headers/WebRTC/RTCLogging.h", | 46 "objc/Framework/Headers/WebRTC/RTCLogging.h", |
| 60 "objc/Framework/Headers/WebRTC/RTCMacros.h", | 47 "objc/Framework/Headers/WebRTC/RTCMacros.h", |
| 61 "objc/Framework/Headers/WebRTC/RTCMetrics.h", | 48 "objc/Framework/Headers/WebRTC/RTCMetrics.h", |
| 62 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", | 49 "objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h", |
| 63 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", | 50 "objc/Framework/Headers/WebRTC/RTCSSLAdapter.h", |
| 64 "objc/Framework/Headers/WebRTC/RTCTracing.h", | 51 "objc/Framework/Headers/WebRTC/RTCTracing.h", |
| 65 ] | 52 ] |
| 66 deps = [ | 53 deps = [ |
| 67 ":rtc_sdk_helpers_objc", | |
| 68 "../base:rtc_base", | 54 "../base:rtc_base", |
| 69 ] | 55 ] |
| 70 configs += [ "..:common_objc" ] | 56 configs += [ "..:common_objc" ] |
| 71 | 57 |
| 72 public_configs = [ ":rtc_sdk_common_objc_config" ] | 58 public_configs = [ ":rtc_sdk_common_objc_config" ] |
| 73 if (is_ios) { | 59 if (is_ios) { |
| 74 sources += [ | 60 sources += [ |
| 75 "objc/Framework/Classes/RTCCameraPreviewView.m", | 61 "objc/Framework/Classes/RTCCameraPreviewView.m", |
| 76 "objc/Framework/Classes/RTCUIApplication.h", | 62 "objc/Framework/Classes/RTCUIApplication.h", |
| 77 "objc/Framework/Classes/RTCUIApplication.mm", | 63 "objc/Framework/Classes/RTCUIApplication.mm", |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 } | 265 } |
| 280 | 266 |
| 281 if (rtc_include_tests) { | 267 if (rtc_include_tests) { |
| 282 rtc_source_set("rtc_sdk_peerconnection_objc_unittests") { | 268 rtc_source_set("rtc_sdk_peerconnection_objc_unittests") { |
| 283 testonly = true | 269 testonly = true |
| 284 | 270 |
| 285 # Skip restricting visibility on mobile platforms since the tests on those | 271 # Skip restricting visibility on mobile platforms since the tests on those |
| 286 # gets additional generated targets which would require many lines here to | 272 # gets additional generated targets which would require many lines here to |
| 287 # cover (which would be confusing to read and hard to maintain). | 273 # cover (which would be confusing to read and hard to maintain). |
| 288 if (!is_android && !is_ios) { | 274 if (!is_android && !is_ios) { |
| 289 visibility = [ "../:rtc_unittests" ] | 275 visibility = [ "//webrtc:rtc_unittests" ] |
| 290 } | 276 } |
| 291 sources = [ | 277 sources = [ |
| 292 "objc/Framework/UnitTests/RTCConfigurationTest.mm", | 278 "objc/Framework/UnitTests/RTCConfigurationTest.mm", |
| 293 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", | 279 "objc/Framework/UnitTests/RTCDataChannelConfigurationTest.mm", |
| 294 "objc/Framework/UnitTests/RTCIceCandidateTest.mm", | 280 "objc/Framework/UnitTests/RTCIceCandidateTest.mm", |
| 295 "objc/Framework/UnitTests/RTCIceServerTest.mm", | 281 "objc/Framework/UnitTests/RTCIceServerTest.mm", |
| 296 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", | 282 "objc/Framework/UnitTests/RTCMediaConstraintsTest.mm", |
| 297 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", | 283 "objc/Framework/UnitTests/RTCPeerConnectionTest.mm", |
| 298 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", | 284 "objc/Framework/UnitTests/RTCSessionDescriptionTest.mm", |
| 299 "objc/Framework/UnitTests/avformatmappertests.mm", | 285 "objc/Framework/UnitTests/avformatmappertests.mm", |
| 300 ] | 286 ] |
| 301 if (is_ios) { | 287 if (is_ios) { |
| 302 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] | 288 sources += [ "objc/Framework/UnitTests/RTCMTLVideoViewTests.mm" ] |
| 303 if (current_cpu != "arm64") { | 289 if (current_cpu != "arm64") { |
| 304 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] | 290 sources += [ "objc/Framework/Classes/Metal/RTCMTLVideoView.m" ] |
| 305 } | 291 } |
| 306 } | 292 } |
| 307 | 293 |
| 308 # TODO(tkchin): Cleanup this warning. | 294 # TODO(tkchin): Cleanup this warning. |
| 309 cflags = [ "-Wno-objc-property-no-attribute" ] | 295 cflags = [ "-Wno-objc-property-no-attribute" ] |
| 310 | 296 |
| 311 # |-ObjC| flag needed to make sure category method implementations | 297 # |-ObjC| flag needed to make sure category method implementations |
| 312 # are included: | 298 # are included: |
| 313 # https://developer.apple.com/library/mac/qa/qa1490/_index.html | 299 # https://developer.apple.com/library/mac/qa/qa1490/_index.html |
| 314 ldflags = [ "-ObjC" ] | 300 ldflags = [ "-ObjC" ] |
| 315 | 301 |
| 316 defines = [ "GTEST_RELATIVE_PATH" ] | 302 defines = [ "GTEST_RELATIVE_PATH" ] |
| 317 deps = [ | 303 deps = [ |
| 318 ":rtc_sdk_peerconnection_objc", | 304 ":rtc_sdk_peerconnection_objc", |
| 319 "..//system_wrappers:system_wrappers_default", | |
| 320 "../base:rtc_base_tests_utils", | 305 "../base:rtc_base_tests_utils", |
| 321 "//third_party/ocmock", | 306 "//third_party/ocmock", |
| 307 "//webrtc/system_wrappers:system_wrappers_default", |
| 322 ] | 308 ] |
| 323 | 309 |
| 324 if (!build_with_chromium && is_clang) { | 310 if (!build_with_chromium && is_clang) { |
| 325 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
. | 311 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163)
. |
| 326 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] | 312 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| 327 } | 313 } |
| 328 } | 314 } |
| 329 } | 315 } |
| 330 | 316 |
| 331 if (is_ios) { | 317 if (is_ios) { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) | 399 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163) |
| 414 configs -= [ "//build/config/clang:find_bad_constructs" ] | 400 configs -= [ "//build/config/clang:find_bad_constructs" ] |
| 415 } | 401 } |
| 416 } | 402 } |
| 417 } | 403 } |
| 418 | 404 |
| 419 rtc_static_library("rtc_sdk_objc") { | 405 rtc_static_library("rtc_sdk_objc") { |
| 420 complete_static_lib = true | 406 complete_static_lib = true |
| 421 deps = [ | 407 deps = [ |
| 422 ":rtc_sdk_peerconnection_objc", | 408 ":rtc_sdk_peerconnection_objc", |
| 423 "..//system_wrappers:field_trial_default", | 409 "//webrtc/system_wrappers:field_trial_default", |
| 424 "..//system_wrappers:metrics_default", | 410 "//webrtc/system_wrappers:metrics_default", |
| 425 ] | 411 ] |
| 426 } | 412 } |
| 427 | 413 |
| 428 rtc_static_library("webrtc_h264_video_toolbox") { | 414 rtc_static_library("webrtc_h264_video_toolbox") { |
| 429 sources = [ | 415 sources = [ |
| 430 "objc/Framework/Classes/h264_video_toolbox_decoder.cc", | 416 "objc/Framework/Classes/h264_video_toolbox_decoder.cc", |
| 431 "objc/Framework/Classes/h264_video_toolbox_decoder.h", | 417 "objc/Framework/Classes/h264_video_toolbox_decoder.h", |
| 432 "objc/Framework/Classes/h264_video_toolbox_encoder.h", | 418 "objc/Framework/Classes/h264_video_toolbox_encoder.h", |
| 433 "objc/Framework/Classes/h264_video_toolbox_encoder.mm", | 419 "objc/Framework/Classes/h264_video_toolbox_encoder.mm", |
| 434 "objc/Framework/Classes/h264_video_toolbox_nalu.cc", | 420 "objc/Framework/Classes/h264_video_toolbox_nalu.cc", |
| 435 "objc/Framework/Classes/h264_video_toolbox_nalu.h", | 421 "objc/Framework/Classes/h264_video_toolbox_nalu.h", |
| 436 ] | 422 ] |
| 437 | 423 |
| 438 configs += [ "../:common_objc" ] | 424 configs += [ "//webrtc:common_objc" ] |
| 439 | 425 |
| 440 deps = [ | 426 deps = [ |
| 441 ":rtc_sdk_common_objc", | 427 ":rtc_sdk_common_objc", |
| 442 "../api:video_frame_api", | 428 "../api:video_frame_api", |
| 443 "../base:rtc_base_approved", | 429 "../base:rtc_base_approved", |
| 444 "../common_video", | 430 "../common_video", |
| 445 "../media:rtc_media_base", | 431 "../media:rtc_media_base", |
| 446 "../modules:module_api", | 432 "../modules:module_api", |
| 447 "../modules/video_coding:video_coding_utility", | 433 "../modules/video_coding:video_coding_utility", |
| 448 "../modules/video_coding:webrtc_h264", | 434 "../modules/video_coding:webrtc_h264", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 465 deps += [ "$rtc_libyuv_dir" ] | 451 deps += [ "$rtc_libyuv_dir" ] |
| 466 public_deps = [ | 452 public_deps = [ |
| 467 "$rtc_libyuv_dir", | 453 "$rtc_libyuv_dir", |
| 468 ] | 454 ] |
| 469 } else { | 455 } else { |
| 470 # Need to add a directory normally exported by libyuv. | 456 # Need to add a directory normally exported by libyuv. |
| 471 include_dirs = [ "$rtc_libyuv_dir/include" ] | 457 include_dirs = [ "$rtc_libyuv_dir/include" ] |
| 472 } | 458 } |
| 473 } | 459 } |
| 474 } | 460 } |
| OLD | NEW |