GN: Implement BUILD.gn for common_video.

This adds copying of Chromium's third_party/BUILD.gn
to acommondate libyuv's BUILD.gn that imports the 'jpeg'
config from that file.

BUG=3441
TEST=trybots + local compile passing with:
gn gen out/Default --args="build_with_chromium=false" && ninja -C out/Default
gn gen out/Default --args="build_with_chromium=false build_libyuv=false" && ninja -C out/Default

R=niklas.enbom@webrtc.org, pbos@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14839004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6595 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
kjellander@webrtc.org 2014-07-03 17:04:12 +00:00
parent c8364539d3
commit 11bea8977e
4 changed files with 54 additions and 3 deletions

2
.gitignore vendored
View File

@ -55,6 +55,8 @@
/third_party/android_tools
/third_party/asan
/third_party/binutils
/third_party/build_gn
/third_party/BUILD.gn
/third_party/clang_format
/third_party/colorama
/third_party/cygwin

11
DEPS
View File

@ -48,6 +48,9 @@ deps = {
"third_party/binutils":
Var("chromium_trunk") + "/src/third_party/binutils@" + Var("chromium_revision"),
"third_party/build_gn":
File(Var("chromium_trunk") + "/src/third_party/BUILD.gn@" + Var("chromium_revision")),
"third_party/clang_format":
Var("chromium_trunk") + "/src/third_party/clang_format@" + Var("chromium_revision"),
@ -244,6 +247,14 @@ hooks = [
Var("root_dir") + "/../chromium_gn/.gn",
Var("root_dir")],
},
{
# Copy BUILD.gn from temporary place (third_party/build_gn) to third_party.
"name": "copy third_party/BUILD.gn",
"pattern": ".",
"action": ["python", Var("root_dir") + "/build/cp.py",
Var("root_dir") + "/third_party/build_gn/BUILD.gn",
Var("root_dir") + "/third_party"],
},
# Pull GN binaries. This needs to be before running GYP below.
{
"name": "gn_win",

View File

@ -32,10 +32,16 @@ declare_args() {
# which can be easily parsed for offline processing.
enable_data_logging = false
build_libjpeg = true
# Enables the use of protocol buffers for debug recordings.
enable_protobuf = true
# Disable these to not build components which can be externally provided.
build_json = true
build_libjpeg = true
build_libyuv = true
build_libvpx = true
build_ssl = true
# Disable by default.
have_dbus_glib = false

View File

@ -8,6 +8,38 @@
import("../build/webrtc.gni")
source_set("common_video") {
# TODO(pbos): Implement.
config("common_video_config") {
include_dirs = [
"interface",
"libyuv/include",
]
}
source_set("common_video") {
sources = [
"i420_video_frame.cc",
"interface/i420_video_frame.h",
"interface/native_handle.h",
"interface/texture_video_frame.h",
"libyuv/include/scaler.h",
"libyuv/include/webrtc_libyuv.h",
"libyuv/scaler.cc",
"libyuv/webrtc_libyuv.cc",
"plane.cc",
"plane.h",
"texture_video_frame.cc"
]
include_dirs = [ "../modules/interface" ]
direct_dependent_configs = [ ":common_video_config" ]
deps = [ "../system_wrappers" ]
if (build_libyuv) {
deps += [ "//third_party/libyuv" ]
} else {
# Need to add a directory normally exported by libyuv.
include_dirs += [ "//third_party/libyuv/include" ]
}
}