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("../pdfium.gni") | 5 import("../pdfium.gni") |
6 | 6 |
7 group("samples") { | 7 group("samples") { |
8 deps = [ | 8 deps = [ |
9 ":pdfium_test", | 9 ":pdfium_test", |
10 ] | 10 ] |
11 } | 11 } |
12 | 12 |
13 config("pdfium_samples_config") { | 13 config("pdfium_samples_config") { |
14 defines = [ | 14 defines = [ |
15 "PNG_PREFIX", | 15 "PNG_PREFIX", |
16 "PNGPREFIX_H", | 16 "PNGPREFIX_H", |
17 "PNG_USE_READ_MACROS", | 17 "PNG_USE_READ_MACROS", |
18 ] | 18 ] |
| 19 if (pdf_enable_v8) { |
| 20 defines += [ "PDF_ENABLE_V8", ] |
| 21 } |
19 if (pdf_enable_xfa) { | 22 if (pdf_enable_xfa) { |
20 defines += [ "PDF_ENABLE_XFA" ] | 23 defines += [ "PDF_ENABLE_XFA", ] |
21 } | 24 } |
22 } | 25 } |
23 | 26 |
24 executable("pdfium_test") { | 27 executable("pdfium_test") { |
25 sources = [ | 28 sources = [ |
26 "image_diff_png.cc", | 29 "image_diff_png.cc", |
27 "pdfium_test.cc", | 30 "pdfium_test.cc", |
28 ] | 31 ] |
29 deps = [ | 32 deps = [ |
30 "//third_party/pdfium", | 33 "//third_party/pdfium", |
31 "//v8:v8_libplatform", | |
32 ] | 34 ] |
33 include_dirs = [ | 35 if (pdf_enable_v8) { |
34 "//v8", | 36 deps += [ |
35 "//v8/include", | 37 "//v8:v8_libplatform", |
36 ] | 38 ] |
| 39 include_dirs = [ |
| 40 "//v8", |
| 41 "//v8/include", |
| 42 ] |
| 43 } |
37 configs += [ ":pdfium_samples_config" ] | 44 configs += [ ":pdfium_samples_config" ] |
38 } | 45 } |
39 | 46 |
40 executable("pdfium_diff") { | 47 executable("pdfium_diff") { |
41 sources = [ | 48 sources = [ |
42 "image_diff.cc", | 49 "image_diff.cc", |
43 "image_diff_png.cc", | 50 "image_diff_png.cc", |
44 "image_diff_png.h", | 51 "image_diff_png.h", |
45 ] | 52 ] |
46 deps = [ | 53 deps = [ |
47 "//third_party/pdfium", | 54 "//third_party/pdfium", |
48 ] | 55 ] |
49 configs += [ ":pdfium_samples_config" ] | 56 configs += [ ":pdfium_samples_config" ] |
50 } | 57 } |
OLD | NEW |