Chromium Code Reviews| Index: webrtc/modules/audio_device/BUILD.gn |
| diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn |
| index 6cf2ea79cea59690600ea4e3cd11ed10e373e0a8..01551a372a4628fc4ac5bbd9edf908f208403222 100644 |
| --- a/webrtc/modules/audio_device/BUILD.gn |
| +++ b/webrtc/modules/audio_device/BUILD.gn |
| @@ -46,6 +46,60 @@ config("audio_device_warnings_config") { |
| } |
| rtc_static_library("audio_device") { |
| + if (is_ios || is_mac) { |
| + sources = [ |
| + "noop.cc", |
|
kjellander_webrtc
2017/08/16 12:46:16
Add a comment about why this silly thing is needed
|
| + ] |
| + } |
| + if (rtc_include_internal_audio_device && is_ios) { |
| + public_deps = [ |
| + ":audio_device_ios", |
| + ] |
| + } else { |
| + public_deps = [ |
| + ":audio_device_generic", |
| + ] |
| + } |
| +} |
| + |
| +if (rtc_include_internal_audio_device && is_ios) { |
| + rtc_static_library("audio_device_ios") { |
| + visibility = [ ":*" ] |
| + sources = [ |
| + "ios/audio_device_ios.h", |
| + "ios/audio_device_ios.mm", |
| + "ios/audio_device_not_implemented_ios.mm", |
| + "ios/audio_session_observer.h", |
| + "ios/objc/RTCAudioSessionDelegateAdapter.h", |
| + "ios/objc/RTCAudioSessionDelegateAdapter.mm", |
| + "ios/voice_processing_audio_unit.h", |
| + "ios/voice_processing_audio_unit.mm", |
| + ] |
| + libs = [ |
| + "AudioToolbox.framework", |
| + "AVFoundation.framework", |
| + "Foundation.framework", |
| + "UIKit.framework", |
| + ] |
| + deps = [ |
| + "../../rtc_base:gtest_prod", |
| + "../../rtc_base:rtc_base", |
| + "../../sdk:objc_audio", |
| + "../../sdk:objc_common", |
| + "../../system_wrappers:metrics_api", |
| + ] |
| + public_deps = [ |
| + ":audio_device_generic", |
| + ] |
| + if (!build_with_chromium && is_clang) { |
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| + } |
| + } |
| +} |
| + |
| +rtc_static_library("audio_device_generic") { |
| + visibility = [ ":*" ] |
| public_configs = [ ":audio_device_config" ] |
| deps = [ |
| @@ -175,30 +229,6 @@ rtc_static_library("audio_device") { |
| "CoreGraphics.framework", |
| ] |
| } |
| - if (is_ios) { |
| - public_deps = [ |
| - "../../rtc_base:gtest_prod", |
| - "../../rtc_base:rtc_base", |
| - "../../sdk:objc_audio", |
| - "../../sdk:objc_common", |
| - ] |
| - sources += [ |
| - "ios/audio_device_ios.h", |
| - "ios/audio_device_ios.mm", |
| - "ios/audio_device_not_implemented_ios.mm", |
| - "ios/audio_session_observer.h", |
| - "ios/objc/RTCAudioSessionDelegateAdapter.h", |
| - "ios/objc/RTCAudioSessionDelegateAdapter.mm", |
| - "ios/voice_processing_audio_unit.h", |
| - "ios/voice_processing_audio_unit.mm", |
| - ] |
| - libs = [ |
| - "AudioToolbox.framework", |
| - "AVFoundation.framework", |
| - "Foundation.framework", |
| - "UIKit.framework", |
| - ] |
| - } |
| if (is_win) { |
| sources += [ |
| "win/audio_device_core_win.cc", |
| @@ -266,6 +296,32 @@ rtc_source_set("mock_audio_device") { |
| } |
| if (rtc_include_tests) { |
| + # TODO(kthelgason): Reenable these tests on simulator. |
| + # See bugs.webrtc.org/7812 |
| + if (is_ios && !use_ios_simulator) { |
| + rtc_source_set("audio_device_ios_unittests") { |
| + testonly = true |
| + visibility = [ ":*" ] |
| + sources = [ |
| + "ios/audio_device_unittest_ios.mm", |
| + ] |
| + deps = [ |
| + ":audio_device", |
| + ":mock_audio_device", |
| + "../../rtc_base:rtc_base_approved", |
| + "../../sdk:objc_audio", |
| + "../../system_wrappers", |
| + "../../test:test_support", |
| + "//testing/gmock", |
| + "//third_party/ocmock", |
| + ] |
| + if (!build_with_chromium && is_clang) { |
| + # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| + suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |
| + } |
| + } |
| + } |
| + |
| rtc_source_set("audio_device_unittests") { |
| testonly = true |
| @@ -282,7 +338,7 @@ if (rtc_include_tests) { |
| ":audio_device", |
| ":mock_audio_device", |
| "../../rtc_base:rtc_base_approved", |
| - "../../system_wrappers:system_wrappers", |
| + "../../system_wrappers", |
| "../../test:test_support", |
| "../utility:utility", |
| "//testing/gmock", |
| @@ -307,12 +363,6 @@ if (rtc_include_tests) { |
| "../../sdk/android:libjingle_peerconnection_java", |
| ] |
| } |
| - if (is_ios && !use_ios_simulator) { |
| - # TODO(kthelgason): Reenable these tests on simulator. |
| - # See bugs.webrtc.org/7812 |
| - sources += [ "ios/audio_device_unittest_ios.mm" ] |
| - deps += [ "//third_party/ocmock" ] |
| - } |
| if (!build_with_chromium && is_clang) { |
| # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). |
| suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] |