GN: Enable libvpx, add link target and convert some test targets
Libvpx now supports GN and this CL turns on compiling it. I also introduced an executable target 'webrtc_tests' that depends on all in WeBRTC + tests in order to get a full linking step executed (since we've seen link problems for GN when rolling WebRTC into Chromium). I also converted a few test targets and made a GN file for third_party/gflags. BUG=3441 TESTED=Trybots + full Chromium build with a symlinked src/third_party/webrtc dir to a workspace wit this CL applied. R=brettw@chromium.org TBR=niklas.enbom@webrtc.org Review URL: https://webrtc-codereview.appspot.com/25569004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7344 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
d05756f0a2
commit
b8caf6a504
5
.gitignore
vendored
5
.gitignore
vendored
@ -59,6 +59,7 @@
|
||||
/third_party/android_testrunner
|
||||
/third_party/android_tools
|
||||
/third_party/asan
|
||||
/third_party/ashmem
|
||||
/third_party/binutils
|
||||
/third_party/boringssl
|
||||
/third_party/BUILD.gn
|
||||
@ -73,17 +74,21 @@
|
||||
/third_party/google-visualization-python
|
||||
/third_party/icu
|
||||
/third_party/jsoncpp
|
||||
/third_party/jsr-305
|
||||
/third_party/junit
|
||||
/third_party/libc++
|
||||
/third_party/libc++abi
|
||||
/third_party/libevent
|
||||
/third_party/libjingle
|
||||
/third_party/libjpeg
|
||||
/third_party/libjpeg_turbo
|
||||
/third_party/libsrtp
|
||||
/third_party/libvpx
|
||||
/third_party/libxml
|
||||
/third_party/libyuv
|
||||
/third_party/llvm
|
||||
/third_party/llvm-build
|
||||
/third_party/modp_b64
|
||||
/third_party/nss
|
||||
/third_party/oauth2
|
||||
/third_party/openmax_dl
|
||||
|
@ -79,6 +79,11 @@ if 'android' in get_target_os_list():
|
||||
'base',
|
||||
'third_party/android_testrunner',
|
||||
'third_party/android_tools',
|
||||
'third_party/ashmem',
|
||||
'third_party/jsr-305',
|
||||
'third_party/libevent',
|
||||
'third_party/libxml',
|
||||
'third_party/modp_b64',
|
||||
'tools/android',
|
||||
]
|
||||
|
||||
|
59
third_party/gflags/BUILD.gn
vendored
Normal file
59
third_party/gflags/BUILD.gn
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
if (is_win) {
|
||||
gflags_gen_arch_root = "gen/win"
|
||||
} else {
|
||||
gflags_gen_arch_root = "gen/posix"
|
||||
}
|
||||
|
||||
config("gflags_config") {
|
||||
include_dirs = [
|
||||
"$gflags_gen_arch_root/include", # For configured files.
|
||||
"src", # For everything else.
|
||||
]
|
||||
|
||||
defines = [
|
||||
# These macros exist so flags and symbols are properly exported when
|
||||
# building DLLs. Since we don't build DLLs, we need to disable them.
|
||||
"GFLAGS_DLL_DECL=",
|
||||
"GFLAGS_DLL_DECLARE_FLAG=",
|
||||
"GFLAGS_DLL_DEFINE_FLAG=",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("gflags") {
|
||||
sources = [
|
||||
"src/gflags.cc",
|
||||
"src/gflags_completions.cc",
|
||||
"src/gflags_reporting.cc",
|
||||
]
|
||||
if (is_win) {
|
||||
sources += [ "src/windows/port.cc" ]
|
||||
|
||||
cflags = [
|
||||
"/wd4005", # WIN32_LEAN_AND_MEAN.
|
||||
"/wd4267", # Conversion from size_t to "type".
|
||||
]
|
||||
}
|
||||
|
||||
include_dirs = [
|
||||
"$gflags_gen_arch_root/include/private", # For config.h
|
||||
]
|
||||
|
||||
public_configs = [ ":gflags_config" ]
|
||||
|
||||
configs -= [ "//build/config/compiler:chromium_code" ]
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
|
||||
if (is_clang) {
|
||||
# TODO(andrew): Look into fixing this warning upstream:
|
||||
# http://code.google.com/p/webrtc/issues/detail?id=760
|
||||
configs -= [ "//build/config/clang:extra_warnings" ]
|
||||
}
|
||||
}
|
2
third_party/gflags/OWNERS
vendored
2
third_party/gflags/OWNERS
vendored
@ -3,3 +3,5 @@
|
||||
# structural changes, please get a review from a reviewer in this file.
|
||||
per-file *.gyp=*
|
||||
per-file *.gypi=*
|
||||
|
||||
per-file BUILD.gn=kjellander@webrtc.org
|
||||
|
@ -205,12 +205,25 @@ static_library("webrtc") {
|
||||
"modules/video_processing",
|
||||
"modules/video_render",
|
||||
"system_wrappers",
|
||||
"tools",
|
||||
"video",
|
||||
"video_engine",
|
||||
"voice_engine",
|
||||
]
|
||||
}
|
||||
|
||||
if (!build_with_chromium) {
|
||||
executable("webrtc_tests") {
|
||||
testonly = true
|
||||
deps = [
|
||||
":webrtc",
|
||||
"modules/video_render:video_render_internal_impl",
|
||||
"modules/video_capture:video_capture_internal_impl",
|
||||
"test",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("webrtc_common") {
|
||||
sources = [
|
||||
"config.h",
|
||||
|
@ -116,15 +116,13 @@ source_set("common_audio") {
|
||||
sources += [ "signal_processing/vector_scaling_operations_mips.c" ]
|
||||
}
|
||||
} else {
|
||||
sources += [
|
||||
"signal_processing/complex_fft.c",
|
||||
"signal_processing/filter_ar_fast_q12.c",
|
||||
]
|
||||
sources += [ "signal_processing/complex_fft.c" ]
|
||||
}
|
||||
|
||||
if (cpu_arch != "arm" && cpu_arch != "mipsel") {
|
||||
sources += [
|
||||
"signal_processing/complex_bit_reverse.c",
|
||||
"signal_processing/filter_ar_fast_q12.c",
|
||||
"signal_processing/spl_sqrt_floor.c",
|
||||
]
|
||||
}
|
||||
|
@ -528,13 +528,12 @@ source_set("isacfix") {
|
||||
} else {
|
||||
sources += [ "codecs/isac/fix/source/pitch_filter_c.c" ]
|
||||
}
|
||||
} else {
|
||||
sources += [ "codecs/isac/fix/source/pitch_estimator_c.c" ]
|
||||
}
|
||||
|
||||
if (rtc_build_armv7_neon) {
|
||||
sources += [
|
||||
"codecs/isac/fix/source/lattice_c.c",
|
||||
"codecs/isac/fix/source/pitch_estimator_c.c",
|
||||
]
|
||||
if (!rtc_build_armv7_neon && cpu_arch != "mipsel") {
|
||||
sources += [ "codecs/isac/fix/source/lattice_c.c" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,22 @@
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
source_set("remote_bitrate_estimator") {
|
||||
sources = [
|
||||
"include/bwe_defines.h",
|
||||
"include/remote_bitrate_estimator.h",
|
||||
"rate_statistics.cc",
|
||||
"rate_statistics.h",
|
||||
]
|
||||
|
||||
configs += [ "../../:common_inherited_config"]
|
||||
|
||||
deps = [
|
||||
":rbe_components",
|
||||
"../../system_wrappers",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("rbe_components") {
|
||||
sources = [
|
||||
"overuse_detector.cc",
|
||||
"overuse_detector.h",
|
||||
|
@ -86,6 +86,8 @@ source_set("video_coding_utility") {
|
||||
sources = [
|
||||
"utility/include/frame_dropper.h",
|
||||
"utility/frame_dropper.cc",
|
||||
"utility/quality_scaler.cc",
|
||||
"utility/quality_scaler.h",
|
||||
]
|
||||
|
||||
configs += [ "../..:common_config" ]
|
||||
@ -118,21 +120,19 @@ source_set("webrtc_i420") {
|
||||
deps = [ "../../system_wrappers" ]
|
||||
}
|
||||
|
||||
# TODO(holmer): Some files below has been commented out since libvpx is still
|
||||
# missing a BUILD.gn file.
|
||||
source_set("webrtc_vp8") {
|
||||
sources = [
|
||||
# "codecs/vp8/default_temporal_layers.cc",
|
||||
# "codecs/vp8/default_temporal_layers.h",
|
||||
# "codecs/vp8/realtime_temporal_layers.cc",
|
||||
# "codecs/vp8/reference_picture_selection.cc",
|
||||
# "codecs/vp8/reference_picture_selection.h",
|
||||
"codecs/vp8/default_temporal_layers.cc",
|
||||
"codecs/vp8/default_temporal_layers.h",
|
||||
"codecs/vp8/realtime_temporal_layers.cc",
|
||||
"codecs/vp8/reference_picture_selection.cc",
|
||||
"codecs/vp8/reference_picture_selection.h",
|
||||
"codecs/vp8/include/vp8.h",
|
||||
"codecs/vp8/include/vp8_common_types.h",
|
||||
"codecs/vp8/temporal_layers.h",
|
||||
"codecs/vp8/vp8_factory.cc",
|
||||
# "codecs/vp8/vp8_impl.cc",
|
||||
# "codecs/vp8/vp8_impl.h",
|
||||
"codecs/vp8/vp8_impl.cc",
|
||||
"codecs/vp8/vp8_impl.h",
|
||||
]
|
||||
|
||||
configs += [ "../..:common_config" ]
|
||||
@ -144,14 +144,18 @@ source_set("webrtc_vp8") {
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
|
||||
# TODO(kjellander): Remove once libvpx has changed it's libvpx_config to be
|
||||
# in direct_dependent_configs.
|
||||
configs += [ "//third_party/libvpx:libvpx_config" ]
|
||||
|
||||
deps = [
|
||||
":video_coding_utility",
|
||||
"../../common_video",
|
||||
"../../system_wrappers",
|
||||
]
|
||||
# if (rtc_build_libvpx) {
|
||||
# deps += [
|
||||
# "//third_party/libvpx",
|
||||
# ]
|
||||
# }
|
||||
if (rtc_build_libvpx) {
|
||||
deps += [
|
||||
"//third_party/libvpx",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
102
webrtc/test/BUILD.gn
Normal file
102
webrtc/test/BUILD.gn
Normal file
@ -0,0 +1,102 @@
|
||||
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
# TODO(kjellander): Convert the rest of the test.gyp targets and put here.
|
||||
|
||||
source_set("test") {
|
||||
testonly = true
|
||||
|
||||
deps = [
|
||||
":field_trial",
|
||||
":test_support",
|
||||
":test_support_main",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("field_trial") {
|
||||
sources = [
|
||||
"field_trial.cc",
|
||||
"field_trial.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"../system_wrappers",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Suppress warnings from Chrome's Clang plugins.
|
||||
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("test_support") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"testsupport/fileutils.cc",
|
||||
"testsupport/fileutils.h",
|
||||
"testsupport/frame_reader.cc",
|
||||
"testsupport/frame_reader.h",
|
||||
"testsupport/frame_writer.cc",
|
||||
"testsupport/frame_writer.h",
|
||||
"testsupport/gtest_prod_util.h",
|
||||
"testsupport/gtest_disable.h",
|
||||
"testsupport/mock/mock_frame_reader.h",
|
||||
"testsupport/mock/mock_frame_writer.h",
|
||||
"testsupport/packet_reader.cc",
|
||||
"testsupport/packet_reader.h",
|
||||
"testsupport/perf_test.cc",
|
||||
"testsupport/perf_test.h",
|
||||
"testsupport/trace_to_stderr.cc",
|
||||
"testsupport/trace_to_stderr.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
"../system_wrappers",
|
||||
]
|
||||
|
||||
if (is_android) {
|
||||
sources += [ "testsupport/android/root_path_android_chromium.cc" ]
|
||||
deps += [ "//base:base" ]
|
||||
} else {
|
||||
sources += [ "testsupport/android/root_path_android.cc" ]
|
||||
}
|
||||
|
||||
if (is_clang) {
|
||||
# Suppress warnings from Chrome's Clang plugins.
|
||||
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("test_support_main") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"run_all_unittests.cc",
|
||||
"test_suite.cc",
|
||||
"test_suite.h",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":field_trial",
|
||||
":test_support",
|
||||
"//testing/gmock",
|
||||
"//testing/gtest",
|
||||
"//third_party/gflags",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Suppress warnings from Chrome's Clang plugins.
|
||||
# See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
40
webrtc/tools/BUILD.gn
Normal file
40
webrtc/tools/BUILD.gn
Normal file
@ -0,0 +1,40 @@
|
||||
# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by a BSD-style license
|
||||
# that can be found in the LICENSE file in the root of the source
|
||||
# tree. An additional intellectual property rights grant can be found
|
||||
# in the file PATENTS. All contributing project authors may
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
import("../build/webrtc.gni")
|
||||
|
||||
source_set("tools") {
|
||||
deps = [
|
||||
":command_line_parser",
|
||||
]
|
||||
}
|
||||
|
||||
source_set("command_line_parser") {
|
||||
sources = [
|
||||
"simple_command_line_parser.h",
|
||||
"simple_command_line_parser.cc",
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(kjellander): Convert all of tools.gyp into GN here.
|
||||
|
||||
if (!build_with_chromium) {
|
||||
executable("tools_unittests") {
|
||||
testonly = true
|
||||
|
||||
sources = [
|
||||
"simple_command_line_parser_unittest.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":command_line_parser",
|
||||
"../test:test_support_main",
|
||||
"//testing/gtest",
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user