Reland of GN: Create target for video_capture_tests on Linux. (patchset #1 id:1 of https://codereview.webrtc.org/2217463002/ )
Reason for revert: Fix issue. Original issue's description: > Revert of GN: Create target for video_capture_tests on Linux. (patchset #2 id:20001 of https://codereview.webrtc.org/2207463004/ ) > > Reason for revert: > Breaks bots. > See https://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Builder%20%28dbg%29/builds/15490 > > Original issue's description: > > GN: Create target for video_capture_tests on Linux. > > > > BUG=webrtc:6042 > > > > Committed: https://crrev.com/171c7fef0a8b7a1598ac87e0349e210372cb974c > > Cr-Commit-Position: refs/heads/master@{#13638} > > TBR=mflodman@webrtc.org,sakal@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=webrtc:6042 > > Committed: https://crrev.com/41bce13482464741e916190b4e5ec3c628f606dd > Cr-Commit-Position: refs/heads/master@{#13640} TBR=mflodman@webrtc.org,guidou@webrtc.org BUG=webrtc:6042 Review-Url: https://codereview.webrtc.org/2211013002 Cr-Commit-Position: refs/heads/master@{#13641}
This commit is contained in:
@ -341,6 +341,7 @@ source_set("rtc_event_log") {
|
||||
|
||||
deps = [
|
||||
":webrtc_common",
|
||||
"modules/rtp_rtcp",
|
||||
]
|
||||
|
||||
if (rtc_enable_protobuf) {
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
# be found in the AUTHORS file in the root of the source tree.
|
||||
|
||||
import("../../build/webrtc.gni")
|
||||
import("//testing/test.gni")
|
||||
|
||||
# Note this target is missing an implementation for the video capture.
|
||||
# Targets must link with either 'video_capture' or
|
||||
@ -20,8 +21,8 @@ source_set("video_capture_module") {
|
||||
"video_capture_config.h",
|
||||
"video_capture_defines.h",
|
||||
"video_capture_delay.h",
|
||||
"video_capture_factory.h",
|
||||
"video_capture_factory.cc",
|
||||
"video_capture_factory.h",
|
||||
"video_capture_impl.cc",
|
||||
"video_capture_impl.h",
|
||||
]
|
||||
@ -163,4 +164,53 @@ if (!build_with_chromium) {
|
||||
configs -= [ "//build/config/clang:find_bad_constructs" ]
|
||||
}
|
||||
}
|
||||
|
||||
# TODO(mflodman): Change to "if (!is_android)" when tests are working on Mac
|
||||
if (is_linux && rtc_include_tests) {
|
||||
test("video_capture_tests") {
|
||||
sources = [
|
||||
"test/video_capture_main_mac.mm",
|
||||
"test/video_capture_unittest.cc",
|
||||
]
|
||||
|
||||
cflags = []
|
||||
if (is_linux || is_mac) {
|
||||
cflags += [ "-Wno-write-strings" ]
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
if (is_linux || is_mac) {
|
||||
ldflags += [
|
||||
"-lpthread",
|
||||
"-lm",
|
||||
]
|
||||
}
|
||||
if (is_linux) {
|
||||
ldflags += [
|
||||
"-lrt",
|
||||
"-lXext",
|
||||
"-lX11",
|
||||
]
|
||||
}
|
||||
|
||||
deps = [
|
||||
":video_capture_internal_impl",
|
||||
":video_capture_module",
|
||||
"//webrtc/modules/utility",
|
||||
"//webrtc/system_wrappers",
|
||||
"//webrtc/test:video_test_common",
|
||||
]
|
||||
if (!is_mac) {
|
||||
deps += [ "//webrtc/test:test_support_main" ]
|
||||
}
|
||||
|
||||
# TODO(mflodman): Add Mac dependencies / xcode_settings.
|
||||
|
||||
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" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user