Decoupling video_capture_internal_imlp from Obj-C code
The goal of this CL is to separate Obj-C/Obj-C++ code from targets which have
also C++ code (see https://bugs.chromium.org/p/webrtc/issues/detail?id=7743
for more information).
BUG=webrtc:7743
NOTRY=True
Review-Url: https://codereview.webrtc.org/2992953002
Cr-Commit-Position: refs/heads/master@{#19662}
diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn
index b382ca0..5176862 100644
--- a/webrtc/modules/video_capture/BUILD.gn
+++ b/webrtc/modules/video_capture/BUILD.gn
@@ -86,7 +86,38 @@
}
}
- rtc_static_library("video_capture_internal_impl") {
+ if (is_ios || is_mac) {
+ rtc_source_set("video_capture_internal_impl_objc") {
+ visibility = [ ":video_capture_internal_impl" ]
+ configs += [ ":video_capture_internal_impl_warnings_config" ]
+
+ deps = [
+ ":video_capture_module",
+ "../../rtc_base:rtc_base_approved",
+ "../../system_wrappers",
+ ]
+
+ sources = [
+ "objc/device_info.h",
+ "objc/device_info.mm",
+ "objc/device_info_objc.h",
+ "objc/device_info_objc.mm",
+ "objc/rtc_video_capture_objc.h",
+ "objc/rtc_video_capture_objc.mm",
+ "objc/video_capture.h",
+ "objc/video_capture.mm",
+ ]
+
+ all_dependent_configs = [ ":video_capture_internal_impl_config" ]
+
+ 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("video_capture_internal_impl") {
configs += [ ":video_capture_internal_impl_warnings_config" ]
deps = [
@@ -129,16 +160,7 @@
deps += [ "//third_party/winsdk_samples" ]
}
if (is_ios || is_mac) {
- sources = [
- "objc/device_info.h",
- "objc/device_info.mm",
- "objc/device_info_objc.h",
- "objc/device_info_objc.mm",
- "objc/rtc_video_capture_objc.h",
- "objc/rtc_video_capture_objc.mm",
- "objc/video_capture.h",
- "objc/video_capture.mm",
- ]
+ deps += [ ":video_capture_internal_impl_objc" ]
}
all_dependent_configs = [ ":video_capture_internal_impl_config" ]