Stop using public_deps to depend on libyuv.

A lot of WebRTC targets were depending on //third_party/libyuv using
public_deps instead of deps. This causes issues because a the
inclusion of libyuv headers is not declared to the build system and
this creates hidden dependencies that put the modularity of the project
at risk.

Bug: webrtc:8603
Change-Id: Ide0ceb84eb5640ae664dc782f3a722b55c3b601a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/28120
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21039}
This commit is contained in:
Mirko Bonadei
2017-12-01 13:53:04 +01:00
committed by Commit Bot
parent 83d27683a8
commit 0250be51be
10 changed files with 25 additions and 80 deletions

View File

@ -225,18 +225,6 @@ rtc_source_set("video_frame_api") {
deps = [
"../rtc_base:rtc_base_approved",
]
# TODO(nisse): This logic is duplicated in multiple places.
# Define in a single place.
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs = [ "$rtc_libyuv_dir/include" ]
}
}
rtc_source_set("video_frame_api_i420") {
@ -246,6 +234,7 @@ rtc_source_set("video_frame_api_i420") {
]
deps = [
":video_frame_api",
"$rtc_libyuv_dir",
"../rtc_base:rtc_base_approved",
"../system_wrappers",
]

View File

@ -9,10 +9,7 @@
import("../webrtc.gni")
config("common_video_config") {
include_dirs = [
"include",
"$rtc_libyuv_dir/include",
]
include_dirs = [ "include" ]
}
rtc_static_library("common_video") {
@ -63,6 +60,7 @@ rtc_static_library("common_video") {
}
deps = [
"$rtc_libyuv_dir",
"..:webrtc_common",
"../api:optional",
"../api:video_frame_api_i420",
@ -75,14 +73,6 @@ rtc_static_library("common_video") {
public_deps = [
"../api:video_frame_api",
]
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps += [ "$rtc_libyuv_dir" ]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs += [ "$rtc_libyuv_dir/include" ]
}
}
if (rtc_include_tests) {
@ -123,6 +113,7 @@ if (rtc_include_tests) {
deps = [
":common_video",
"$rtc_libyuv_dir",
"../api:video_frame_api_i420",
"../modules/video_capture:video_capture",
"../rtc_base:rtc_base",

View File

@ -98,16 +98,8 @@ rtc_static_library("rtc_media_base") {
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
include_dirs = []
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps += [ "$rtc_libyuv_dir" ]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs += [ "$rtc_libyuv_dir/include" ]
}
deps += [
"$rtc_libyuv_dir",
"..:webrtc_common",
"../api:libjingle_peerconnection_api",
"../api:optional",
@ -213,15 +205,6 @@ rtc_static_library("rtc_audio_video") {
}
include_dirs = []
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs += [ "$rtc_libyuv_dir/include" ]
}
public_configs = []
if (build_with_chromium) {
@ -237,6 +220,7 @@ rtc_static_library("rtc_audio_video") {
}
deps += [
":rtc_media_base",
"$rtc_libyuv_dir",
"..:webrtc_common",
"../api:call_api",
"../api:libjingle_peerconnection_api",
@ -370,14 +354,6 @@ if (rtc_include_tests) {
configs += [ ":rtc_unittest_main_config" ]
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps += [ "$rtc_libyuv_dir" ]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs += [ "$rtc_libyuv_dir/include" ]
}
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" ]
@ -386,6 +362,7 @@ if (rtc_include_tests) {
deps += [
":rtc_media",
":rtc_media_base",
"$rtc_libyuv_dir",
"..:webrtc_common",
"../api:call_api",
"../api:video_frame_api",

View File

@ -26,6 +26,7 @@ rtc_static_library("video_capture_module") {
]
deps = [
"$rtc_libyuv_dir",
"..:module_api",
"../..:webrtc_common",
"../../api:video_frame_api_i420",

View File

@ -232,6 +232,7 @@ rtc_static_library("webrtc_i420") {
deps = [
":video_coding_utility",
"$rtc_libyuv_dir",
"../..:webrtc_common",
"../../api:video_frame_api_i420",
"../../common_video:common_video",
@ -291,6 +292,7 @@ rtc_static_library("webrtc_vp8") {
deps = [
":video_coding_utility",
"$rtc_libyuv_dir",
"..:module_api",
"../..:webrtc_common",
"../../api:optional",

View File

@ -26,6 +26,7 @@ rtc_static_library("video_processing") {
deps = [
":denoiser_filter",
"$rtc_libyuv_dir",
"..:module_api",
"../../common_audio",
"../../common_video",

View File

@ -63,9 +63,8 @@ rtc_static_library("video_quality_analysis") {
"frame_analyzer/video_quality_analysis.cc",
"frame_analyzer/video_quality_analysis.h",
]
public_deps = [
"../common_video",
deps = [
"$rtc_libyuv_dir",
]
}
@ -77,6 +76,7 @@ rtc_executable("frame_analyzer") {
deps = [
":command_line_parser",
":video_quality_analysis",
"$rtc_libyuv_dir",
"//build/win:default_exe_manifest",
]
}
@ -92,6 +92,7 @@ if (!build_with_chromium) {
deps = [
":command_line_parser",
":video_quality_analysis",
"$rtc_libyuv_dir",
"//build/win:default_exe_manifest",
]
}
@ -104,6 +105,7 @@ if (!build_with_chromium) {
deps = [
":video_quality_analysis",
"$rtc_libyuv_dir",
]
}
@ -128,6 +130,7 @@ if (!build_with_chromium) {
deps = [
":command_line_parser",
"$rtc_libyuv_dir",
"../common_video",
"//build/win:default_exe_manifest",
]
@ -322,6 +325,8 @@ if (rtc_include_tests) {
":frame_editing_lib",
":reference_less_video_analysis_lib",
":video_quality_analysis",
"$rtc_libyuv_dir",
"../common_video:common_video",
"../rtc_base",
"../test:test_main",
"//testing/gtest",

View File

@ -132,6 +132,7 @@ if (is_ios || is_mac) {
deps = [
":common_objc",
"$rtc_libyuv_dir",
"../api:libjingle_peerconnection_api",
"../api:video_frame_api",
"../api:video_frame_api_i420",
@ -299,6 +300,7 @@ if (is_ios || is_mac) {
":corevideoframebuffer_objc",
":peerconnectionfactory_objc",
":video_objc",
"$rtc_libyuv_dir",
"../api:video_frame_api",
"../media:rtc_media_base",
"../pc:libjingle_peerconnection",
@ -308,13 +310,6 @@ if (is_ios || is_mac) {
if (rtc_use_metal_rendering) {
deps += [ ":metal_objc" ]
}
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
}
}
rtc_static_library("peerconnectionfactory_objc") {
@ -770,6 +765,7 @@ if (is_ios || is_mac) {
]
deps = [
"$rtc_libyuv_dir",
"../api:video_frame_api_i420",
"../common_video",
"../rtc_base:rtc_base_approved",
@ -823,6 +819,7 @@ if (is_ios || is_mac) {
":video_objc",
":video_toolbox_cc",
":videotracksource_objc",
"$rtc_libyuv_dir",
"../api/video_codecs:video_codecs_api",
"../common_video",
"../media:rtc_media",
@ -846,16 +843,6 @@ if (is_ios || is_mac) {
# (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs = [ "$rtc_libyuv_dir/include" ]
}
}
}
}

View File

@ -205,6 +205,7 @@ rtc_static_library("video_jni") {
":base_jni",
":generated_video_jni",
":peerconnection_jni",
"$rtc_libyuv_dir",
"../..:webrtc_common",
"../../api:libjingle_peerconnection_api",
"../../api:video_frame_api",
@ -225,16 +226,6 @@ rtc_static_library("video_jni") {
"../../rtc_base:weak_ptr",
"../../system_wrappers:system_wrappers",
]
if (rtc_build_libyuv) {
deps += [ "$rtc_libyuv_dir" ]
public_deps = [
"$rtc_libyuv_dir",
]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs = [ "$rtc_libyuv_dir/include" ]
}
}
rtc_static_library("null_video_jni") {

View File

@ -211,6 +211,7 @@ if (rtc_include_tests) {
deps = [
":test_support",
":video_test_common",
"$rtc_libyuv_dir",
"..:webrtc_common",
"../api:video_frame_api",
"../api:video_frame_api_i420",