summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn65
-rw-r--r--constants/BUILD.gn15
-rw-r--r--samples/BUILD.gn8
-rw-r--r--testing/BUILD.gn41
-rw-r--r--testing/fuzzers/BUILD.gn12
-rw-r--r--testing/image_diff/BUILD.gn18
6 files changed, 88 insertions, 71 deletions
diff --git a/BUILD.gn b/BUILD.gn
index aa676b76d6..068d41249c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -142,7 +142,6 @@ jumbo_static_library("pdfium") {
configs += [ ":pdfium_core_config" ]
deps = [
- ":constants",
":fdrm",
":fpdfapi",
":fpdfdoc",
@@ -150,6 +149,7 @@ jumbo_static_library("pdfium") {
":fxcodec",
":fxcrt",
":fxge",
+ "constants",
"fpdfsdk",
"fpdfsdk/formfiller",
"fpdfsdk/pwl",
@@ -183,52 +183,6 @@ jumbo_static_library("pdfium") {
}
}
-jumbo_source_set("test_support") {
- testonly = true
- sources = [
- "testing/fx_string_testhelpers.cpp",
- "testing/fx_string_testhelpers.h",
- "testing/string_write_stream.cpp",
- "testing/string_write_stream.h",
- "testing/test_support.cpp",
- "testing/test_support.h",
- "testing/utils/bitmap_saver.cpp",
- "testing/utils/bitmap_saver.h",
- "testing/utils/path_service.cpp",
- "testing/utils/path_service.h",
- ]
- data = [
- "testing/resources/",
- ]
- deps = [
- ":image_diff",
- ":pdfium",
- "//testing/gmock",
- "//testing/gtest",
- ]
- include_dirs = []
- if (pdf_enable_v8) {
- deps += [
- "//v8",
- "//v8:v8_libplatform",
- ]
- configs += [ "//v8:external_startup_data" ]
- }
- configs += [ ":pdfium_core_config" ]
-}
-
-jumbo_source_set("image_diff") {
- testonly = true
- sources = [
- "testing/image_diff/image_diff_png.cpp",
- "testing/image_diff/image_diff_png.h",
- ]
- configs += [ ":pdfium_core_config" ]
- deps = [
- "third_party:png",
- ]
-}
-
# Targets below this are only visible within this file (and to the
# top-level gn_visibility target used to help gn_all build everything).
visibility = [
@@ -236,15 +190,6 @@ visibility = [
"//:gn_visibility",
]
-jumbo_source_set("constants") {
- sources = [
- "constants/form_flags.h",
- "constants/page_object.h",
- "constants/stream_dict_common.h",
- "constants/transparency.h",
- ]
-}
-
jumbo_source_set("fdrm") {
sources = [
"core/fdrm/crypto/fx_crypt.cpp",
@@ -1187,7 +1132,7 @@ test("pdfium_unittests") {
]
deps = [
":pdfium",
- ":test_support",
+ "testing/:test_support",
"//testing/gmock",
"//testing/gtest",
]
@@ -1299,9 +1244,9 @@ test("pdfium_embeddertests") {
"testing/range_set.h",
]
deps = [
- ":image_diff",
":pdfium",
- ":test_support",
+ "testing/:test_support",
+ "testing/image_diff",
"//testing/gmock",
"//testing/gtest",
]
@@ -1347,8 +1292,8 @@ if (pdf_is_standalone) {
"testing/image_diff/image_diff.cpp",
]
deps = [
- ":image_diff",
":pdfium",
+ "testing/image_diff",
"//build/win:default_exe_manifest",
]
configs -= [ "//build/config/compiler:chromium_code" ]
diff --git a/constants/BUILD.gn b/constants/BUILD.gn
new file mode 100644
index 0000000000..7860539229
--- /dev/null
+++ b/constants/BUILD.gn
@@ -0,0 +1,15 @@
+# Copyright 2018 The PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/jumbo.gni")
+import("../pdfium.gni")
+
+jumbo_source_set("constants") {
+ sources = [
+ "constants/form_flags.h",
+ "constants/page_object.h",
+ "constants/stream_dict_common.h",
+ "constants/transparency.h",
+ ]
+}
diff --git a/samples/BUILD.gn b/samples/BUILD.gn
index 909de2eae0..01aff4114f 100644
--- a/samples/BUILD.gn
+++ b/samples/BUILD.gn
@@ -50,9 +50,9 @@ executable("pdfium_test") {
"pdfium_test_write_helper.h",
]
deps = [
- "../:image_diff",
"../:pdfium",
- "../:test_support",
+ "../testing/:test_support",
+ "../testing/image_diff",
"//build/win:default_exe_manifest",
]
configs += [ ":pdfium_samples_config" ]
@@ -62,9 +62,7 @@ executable("pdfium_test") {
"//v8:v8_headers",
"//v8:v8_libplatform",
]
- include_dirs = [
- "//v8",
- ]
+ include_dirs = [ "//v8" ]
configs += [ "//v8:external_startup_data" ]
}
if (pdf_use_skia || pdf_use_skia_paths) {
diff --git a/testing/BUILD.gn b/testing/BUILD.gn
new file mode 100644
index 0000000000..286921db2d
--- /dev/null
+++ b/testing/BUILD.gn
@@ -0,0 +1,41 @@
+# Copyright 2018 The PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/jumbo.gni")
+import("../pdfium.gni")
+
+jumbo_source_set("test_support") {
+ testonly = true
+ sources = [
+ "fx_string_testhelpers.cpp",
+ "fx_string_testhelpers.h",
+ "string_write_stream.cpp",
+ "string_write_stream.h",
+ "test_support.cpp",
+ "test_support.h",
+ "utils/bitmap_saver.cpp",
+ "utils/bitmap_saver.h",
+ "utils/path_service.cpp",
+ "utils/path_service.h",
+ ]
+ data = [
+ "resources/",
+ ]
+ deps = [
+ "../:pdfium",
+ "image_diff",
+ "//testing/gmock",
+ "//testing/gtest",
+ ]
+ configs += [ "../:pdfium_core_config" ]
+ visibility = [ "../*" ]
+
+ if (pdf_enable_v8) {
+ deps += [
+ "//v8",
+ "//v8:v8_libplatform",
+ ]
+ configs += [ "//v8:external_startup_data" ]
+ }
+}
diff --git a/testing/fuzzers/BUILD.gn b/testing/fuzzers/BUILD.gn
index 94f501ad65..c4c62f73cc 100644
--- a/testing/fuzzers/BUILD.gn
+++ b/testing/fuzzers/BUILD.gn
@@ -73,8 +73,8 @@ template("pdfium_public_fuzzer") {
"pdfium_fuzzer_helper.h",
]
deps = [
+ "../:test_support",
"../../:pdfium",
- "../../:test_support",
]
if (defined(invoker.deps)) {
deps += invoker.deps
@@ -136,7 +136,7 @@ if (pdf_enable_xfa) {
"xfa_codec_fuzzer.h",
]
deps = [
- "../../:test_support",
+ "../:test_support",
]
}
}
@@ -148,7 +148,7 @@ if (pdf_enable_xfa) {
"xfa_codec_fuzzer.h",
]
deps = [
- "../../:test_support",
+ "../:test_support",
]
}
@@ -165,7 +165,7 @@ if (pdf_enable_xfa) {
"xfa_codec_fuzzer.h",
]
deps = [
- "../../:test_support",
+ "../:test_support",
]
}
@@ -176,7 +176,7 @@ if (pdf_enable_xfa) {
"xfa_codec_fuzzer.h",
]
deps = [
- "../../:test_support",
+ "../:test_support",
]
}
}
@@ -188,7 +188,7 @@ if (pdf_enable_xfa) {
"xfa_codec_fuzzer.h",
]
deps = [
- "../../:test_support",
+ "../:test_support",
]
}
}
diff --git a/testing/image_diff/BUILD.gn b/testing/image_diff/BUILD.gn
new file mode 100644
index 0000000000..39261bac44
--- /dev/null
+++ b/testing/image_diff/BUILD.gn
@@ -0,0 +1,18 @@
+# Copyright 2018 The PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/jumbo.gni")
+import("../../pdfium.gni")
+
+jumbo_source_set("image_diff") {
+ testonly = true
+ sources = [
+ "image_diff_png.cpp",
+ "image_diff_png.h",
+ ]
+ configs += [ "../../:pdfium_core_config" ]
+ deps = [
+ "../../third_party:png",
+ ]
+}