Move image_diff code into testing/image_diff/
It is not actually a sample program to demonstrate how to use PDFium
APIs. It is more of a test utility program.
Remove header include dependency from samples/ to core/, to set a good
example.
Change-Id: Idd5d567c82314bcf0e4a7bec8a3210e7d57226ee
Reviewed-on: https://pdfium-review.googlesource.com/6871
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index 2c038b2..f577986 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -260,6 +260,18 @@
configs += [ ":pdfium_core_config" ]
}
+static_library("image_diff") {
+ testonly = true
+ sources = [
+ "testing/image_diff/image_diff_png.cpp",
+ "testing/image_diff/image_diff_png.h",
+ ]
+ deps = []
+ if (!pdf_enable_xfa) {
+ deps += [ "third_party:fx_lpng" ]
+ }
+}
+
# 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 = [
@@ -2045,6 +2057,22 @@
"//samples",
]
}
+
+ executable("pdfium_diff") {
+ testonly = true
+ sources = [
+ "testing/image_diff/image_diff.cpp",
+ ]
+ deps = [
+ ":image_diff",
+ ":pdfium",
+ "//build/config:exe_and_shlib_deps",
+ "//build/win:default_exe_manifest",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ }
+
group("fuzzers") {
testonly = true
deps = [
@@ -2062,6 +2090,7 @@
if (pdf_is_standalone) {
deps += [
":fuzzers",
+ ":pdfium_diff",
":samples",
]
}