Fix guard for unit test target
Guards the libjpeg_turbo_unittests target using the same condition
that imports test.gni.
Bug: 993876
Change-Id: I3cb6d7f31c9118aaca5f151780ee4e57397c5f37
diff --git a/BUILD.gn b/BUILD.gn
index 8f32332..d733cc1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -317,54 +317,54 @@
if (build_with_chromium) {
import("//testing/test.gni")
-}
-test("libjpeg_turbo_unittests") {
- testonly = true
+ test("libjpeg_turbo_unittests") {
+ testonly = true
- sources = [
- "cdjpeg.c",
- "cjpeg.c",
- "djpeg.c",
- "gtest/cjpeg-gtest-wrapper.cpp",
- "gtest/djpeg-gtest-wrapper.cpp",
- "gtest/gtest-utils.cpp",
- "gtest/jpegtran-gtest-wrapper.cpp",
- "gtest/tjbench-gtest-wrapper.cpp",
- "gtest/tjunittest-gtest-wrapper.cpp",
- "jpegtran.c",
- "md5/md5.c",
- "md5/md5hl.c",
- "tjbench.c",
- "tjunittest.c",
- "tjutil.c",
- "rdcolmap.c",
- "rdgif.c",
- "rdswitch.c",
- ]
+ sources = [
+ "cdjpeg.c",
+ "cjpeg.c",
+ "djpeg.c",
+ "gtest/cjpeg-gtest-wrapper.cpp",
+ "gtest/djpeg-gtest-wrapper.cpp",
+ "gtest/gtest-utils.cpp",
+ "gtest/jpegtran-gtest-wrapper.cpp",
+ "gtest/tjbench-gtest-wrapper.cpp",
+ "gtest/tjunittest-gtest-wrapper.cpp",
+ "jpegtran.c",
+ "md5/md5.c",
+ "md5/md5hl.c",
+ "tjbench.c",
+ "tjunittest.c",
+ "tjutil.c",
+ "rdcolmap.c",
+ "rdgif.c",
+ "rdswitch.c",
+ ]
- deps = [
- ":turbojpeg",
- "//base",
- "//testing/gtest",
- "//testing/gtest:gtest_main",
- ]
+ deps = [
+ ":turbojpeg",
+ "//base",
+ "//testing/gtest",
+ "//testing/gtest:gtest_main",
+ ]
- data = [
- "testimages/"
- ]
+ data = [
+ "testimages/"
+ ]
- defines = [
- "GTEST",
- "BMP_SUPPORTED",
- "PPM_SUPPORTED",
- ]
+ defines = [
+ "GTEST",
+ "BMP_SUPPORTED",
+ "PPM_SUPPORTED",
+ ]
- include_dirs = [
- "//third_party/googletest/src/googletest/include/gtest",
- ".",
- ]
+ include_dirs = [
+ "//third_party/googletest/src/googletest/include/gtest",
+ ".",
+ ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ }
}