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") |
| 6 |
5 group("samples") { | 7 group("samples") { |
6 deps = [ | 8 deps = [ |
7 ":pdfium_test", | 9 ":pdfium_test", |
8 ":pdfium_diff", | 10 ":pdfium_diff", |
9 ] | 11 ] |
10 } | 12 } |
11 | 13 |
12 config("pdfium_samples_config") { | 14 config("pdfium_samples_config") { |
13 defines = [ | 15 defines = [ |
14 "PNG_PREFIX", | 16 "PNG_PREFIX", |
15 "PNGPREFIX_H", | 17 "PNGPREFIX_H", |
16 "PNG_USE_READ_MACROS", | 18 "PNG_USE_READ_MACROS", |
17 ] | 19 ] |
| 20 if (pdf_enable_v8) { |
| 21 defines += [ |
| 22 "PDF_ENABLE_V8", |
| 23 ] |
| 24 } |
18 } | 25 } |
19 | 26 |
20 executable("pdfium_test") { | 27 executable("pdfium_test") { |
21 sources = [ | 28 sources = [ |
22 "image_diff_png.cc", | 29 "image_diff_png.cc", |
23 "pdfium_test.cc", | 30 "pdfium_test.cc", |
24 ] | 31 ] |
25 deps = [ | 32 deps = [ |
26 "//third_party/pdfium", | 33 "//third_party/pdfium", |
27 # Regardless of whether the library ships against system freetype, | 34 # Regardless of whether the library ships against system freetype, |
28 # always link this binary against the bundled one for consistency | 35 # always link this binary against the bundled one for consistency |
29 # of results across platforms. | 36 # of results across platforms. |
30 "//third_party/pdfium/third_party:fx_freetype", | 37 "//third_party/pdfium/third_party:fx_freetype", |
31 "//v8:v8_libplatform", | |
32 ":fx_lpng", | 38 ":fx_lpng", |
33 ] | 39 ] |
34 include_dirs = [ | 40 if (pdf_enable_v8) { |
35 "//v8", | 41 deps += [ |
36 "//v8/include", | 42 "//v8:v8_libplatform", |
37 ] | 43 ] |
| 44 include_dirs = [ |
| 45 "//v8", |
| 46 "//v8/include", |
| 47 ] |
| 48 } |
38 configs += [ ":pdfium_samples_config" ] | 49 configs += [ ":pdfium_samples_config" ] |
39 } | 50 } |
40 | 51 |
41 executable("pdfium_diff") { | 52 executable("pdfium_diff") { |
42 sources = [ | 53 sources = [ |
43 "image_diff.cc", | 54 "image_diff.cc", |
44 "image_diff_png.cc", | 55 "image_diff_png.cc", |
45 "image_diff_png.h", | 56 "image_diff_png.h", |
46 ] | 57 ] |
47 deps = [ | 58 deps = [ |
(...skipping 24 matching lines...) Expand all Loading... |
72 "fx_lpng/src/fx_pngwio.c", | 83 "fx_lpng/src/fx_pngwio.c", |
73 "fx_lpng/src/fx_pngwrite.c", | 84 "fx_lpng/src/fx_pngwrite.c", |
74 "fx_lpng/src/fx_pngwtran.c", | 85 "fx_lpng/src/fx_pngwtran.c", |
75 "fx_lpng/src/fx_pngwutil.c", | 86 "fx_lpng/src/fx_pngwutil.c", |
76 ] | 87 ] |
77 include_dirs = [ | 88 include_dirs = [ |
78 "../core/src/fxcodec/fx_zlib/include/", | 89 "../core/src/fxcodec/fx_zlib/include/", |
79 ] | 90 ] |
80 configs += [ ":pdfium_samples_config" ] | 91 configs += [ ":pdfium_samples_config" ] |
81 } | 92 } |
OLD | NEW |