| OLD | NEW |
| 1 # Copyright 2014 PDFium Authors. All rights reserved. | 1 # Copyright 2014 PDFium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build_overrides/v8.gni") | 6 import("//build_overrides/v8.gni") |
| 7 import("../pdfium.gni") | 7 import("../pdfium.gni") |
| 8 | 8 |
| 9 group("samples") { | 9 group("samples") { |
| 10 testonly = true | 10 testonly = true |
| 11 deps = [ | 11 deps = [ |
| 12 ":pdfium_diff", |
| 12 ":pdfium_test", | 13 ":pdfium_test", |
| 13 ":pdfium_diff", | |
| 14 ] | 14 ] |
| 15 } | 15 } |
| 16 | 16 |
| 17 config("pdfium_samples_config") { | 17 config("pdfium_samples_config") { |
| 18 defines = [ | 18 defines = [ |
| 19 "PNG_PREFIX", | 19 "PNG_PREFIX", |
| 20 "PNG_USE_READ_MACROS", | 20 "PNG_USE_READ_MACROS", |
| 21 ] | 21 ] |
| 22 include_dirs = [ ".." ] | 22 include_dirs = [ ".." ] |
| 23 if (pdf_enable_v8) { | 23 if (pdf_enable_v8) { |
| 24 defines += [ "PDF_ENABLE_V8" ] | 24 defines += [ "PDF_ENABLE_V8" ] |
| 25 } | 25 } |
| 26 if (pdf_enable_xfa) { | 26 if (pdf_enable_xfa) { |
| 27 defines += [ "PDF_ENABLE_XFA" ] | 27 defines += [ "PDF_ENABLE_XFA" ] |
| 28 } | 28 } |
| 29 if (pdf_use_skia) { |
| 30 defines += [ "PDF_ENABLE_SKIA" ] |
| 31 } |
| 29 } | 32 } |
| 30 | 33 |
| 31 executable("pdfium_test") { | 34 executable("pdfium_test") { |
| 32 testonly = true | 35 testonly = true |
| 33 sources = [ | 36 sources = [ |
| 34 "image_diff_png.cc", | 37 "image_diff_png.cc", |
| 35 "image_diff_png.h", | 38 "image_diff_png.h", |
| 36 "pdfium_test.cc", | 39 "pdfium_test.cc", |
| 37 ] | 40 ] |
| 38 deps = [ | 41 deps = [ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 49 deps += [ "../third_party:fx_lpng" ] | 52 deps += [ "../third_party:fx_lpng" ] |
| 50 } | 53 } |
| 51 if (pdf_enable_v8) { | 54 if (pdf_enable_v8) { |
| 52 deps += [ "//v8:v8_libplatform" ] | 55 deps += [ "//v8:v8_libplatform" ] |
| 53 include_dirs = [ | 56 include_dirs = [ |
| 54 "//v8", | 57 "//v8", |
| 55 "//v8/include", | 58 "//v8/include", |
| 56 ] | 59 ] |
| 57 configs += [ "//v8:external_startup_data" ] | 60 configs += [ "//v8:external_startup_data" ] |
| 58 } | 61 } |
| 62 if (pdf_use_skia) { |
| 63 deps += [ "//skia" ] |
| 64 } |
| 59 configs += [ ":pdfium_samples_config" ] | 65 configs += [ ":pdfium_samples_config" ] |
| 60 } | 66 } |
| 61 | 67 |
| 62 executable("pdfium_diff") { | 68 executable("pdfium_diff") { |
| 63 testonly = true | 69 testonly = true |
| 64 sources = [ | 70 sources = [ |
| 65 "image_diff.cc", | 71 "image_diff.cc", |
| 66 "image_diff_png.cc", | 72 "image_diff_png.cc", |
| 67 "image_diff_png.h", | 73 "image_diff_png.h", |
| 68 ] | 74 ] |
| 69 deps = [ | 75 deps = [ |
| 70 "//build/config/sanitizers:deps", | 76 "//build/config/sanitizers:deps", |
| 71 "//third_party/pdfium", | 77 "//third_party/pdfium", |
| 72 ] | 78 ] |
| 73 if (!pdf_enable_xfa) { | 79 if (!pdf_enable_xfa) { |
| 74 deps += [ "../third_party:fx_lpng" ] | 80 deps += [ "../third_party:fx_lpng" ] |
| 75 } | 81 } |
| 76 configs -= [ "//build/config/compiler:chromium_code" ] | 82 configs -= [ "//build/config/compiler:chromium_code" ] |
| 77 configs += [ | 83 configs += [ |
| 78 ":pdfium_samples_config", | 84 ":pdfium_samples_config", |
| 79 "//build/config/compiler:no_chromium_code", | 85 "//build/config/compiler:no_chromium_code", |
| 80 ] | 86 ] |
| 81 } | 87 } |
| OLD | NEW |