# Copyright 2018 The PDFium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("../../pdfium.gni")
import("../../testing/test.gni")

source_set("image_diff") {
  testonly = true
  sources = [ "image_diff_png.h" ]
  deps = []

  if (pdf_use_skia) {
    sources += [ "../utils/png_encode_skia.cpp" ]
    deps += [ "//skia" ]
  } else {
    sources += [ "../utils/png_encode_libpng.cpp" ]
    deps += [
      "../../third_party:png",
      "../../third_party:zlib",
    ]
  }

  configs += [
    "../../:pdfium_strict_config",
    "../../:pdfium_noshorten_config",
  ]
  public_deps = [ "../../core/fxcrt" ]
}

pdfium_unittest_source_set("unittests") {
  sources = [ "../utils/png_unittest.cpp" ]
  deps = [ ":image_diff" ]
  pdfium_root_dir = "../../"
}
