Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: webrtc/modules/video_capture/BUILD.gn

Issue 2211013002: Reland of GN: Create target for video_capture_tests on Linux. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Replace absolute path with a relative one. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_capture/BUILD.gn
diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn
index 78f5212950ea218eddb79f625b7ac307e5599bdb..3df74b62e13355dd8b5cc7de5c4c2a6faef8b147 100644
--- a/webrtc/modules/video_capture/BUILD.gn
+++ b/webrtc/modules/video_capture/BUILD.gn
@@ -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" ]
+ }
+ }
+ }
}
« no previous file with comments | « webrtc/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698