diff --git a/api/BUILD.gn b/api/BUILD.gn index 27673142a0..8e8b44ec51 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -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", ] diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn index c4b810ea40..6c14100f55 100644 --- a/common_video/BUILD.gn +++ b/common_video/BUILD.gn @@ -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", diff --git a/media/BUILD.gn b/media/BUILD.gn index e24c8cfb57..b78f55da49 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -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", diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn index 9a44967fcd..ca945e29a4 100644 --- a/modules/video_capture/BUILD.gn +++ b/modules/video_capture/BUILD.gn @@ -26,6 +26,7 @@ rtc_static_library("video_capture_module") { ] deps = [ + "$rtc_libyuv_dir", "..:module_api", "../..:webrtc_common", "../../api:video_frame_api_i420", diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index c2b9cce7db..3e3cedcfd8 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -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", diff --git a/modules/video_processing/BUILD.gn b/modules/video_processing/BUILD.gn index fb4888ba58..9c0afbd2ed 100644 --- a/modules/video_processing/BUILD.gn +++ b/modules/video_processing/BUILD.gn @@ -26,6 +26,7 @@ rtc_static_library("video_processing") { deps = [ ":denoiser_filter", + "$rtc_libyuv_dir", "..:module_api", "../../common_audio", "../../common_video", diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 1ed375683d..595cc3122a 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -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", diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 35ac38b40b..0b0a56f582 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -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" ] - } } } } diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index cfaf0a4287..5d5c330d10 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -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") { diff --git a/test/BUILD.gn b/test/BUILD.gn index c9f8cfc2dc..e54228dd45 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -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",