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 testonly = true |
8 deps = [ | 9 deps = [ |
9 ":pdfium_test", | 10 ":pdfium_test", |
10 ":pdfium_diff", | 11 ":pdfium_diff", |
11 ] | 12 ] |
12 } | 13 } |
13 | 14 |
14 config("pdfium_samples_config") { | 15 config("pdfium_samples_config") { |
15 defines = [ | 16 defines = [ |
16 "PNG_PREFIX", | 17 "PNG_PREFIX", |
17 "PNGPREFIX_H", | 18 "PNGPREFIX_H", |
18 "PNG_USE_READ_MACROS", | 19 "PNG_USE_READ_MACROS", |
19 ] | 20 ] |
20 if (pdf_enable_v8) { | 21 if (pdf_enable_v8) { |
21 defines += [ | 22 defines += [ |
22 "PDF_ENABLE_V8", | 23 "PDF_ENABLE_V8", |
23 ] | 24 ] |
24 } | 25 } |
25 } | 26 } |
26 | 27 |
27 executable("pdfium_test") { | 28 executable("pdfium_test") { |
| 29 testonly = true |
28 sources = [ | 30 sources = [ |
29 "image_diff_png.cc", | 31 "image_diff_png.cc", |
30 "pdfium_test.cc", | 32 "pdfium_test.cc", |
31 ] | 33 ] |
32 deps = [ | 34 deps = [ |
33 "//third_party/pdfium", | 35 "//third_party/pdfium:pdfium", |
| 36 "//third_party/pdfium:test_support", |
34 # Regardless of whether the library ships against system freetype, | 37 # Regardless of whether the library ships against system freetype, |
35 # always link this binary against the bundled one for consistency | 38 # always link this binary against the bundled one for consistency |
36 # of results across platforms. | 39 # of results across platforms. |
37 "//third_party/pdfium/third_party:fx_freetype", | 40 "//third_party/pdfium/third_party:fx_freetype", |
38 ":fx_lpng", | 41 ":fx_lpng", |
39 ] | 42 ] |
40 if (pdf_enable_v8) { | 43 if (pdf_enable_v8) { |
41 deps += [ | 44 deps += [ |
42 "//v8:v8_libplatform", | 45 "//v8:v8_libplatform", |
43 ] | 46 ] |
44 include_dirs = [ | 47 include_dirs = [ |
45 "//v8", | 48 "//v8", |
46 "//v8/include", | 49 "//v8/include", |
47 ] | 50 ] |
48 } | 51 } |
49 configs += [ ":pdfium_samples_config" ] | 52 configs += [ ":pdfium_samples_config" ] |
50 } | 53 } |
51 | 54 |
52 executable("pdfium_diff") { | 55 executable("pdfium_diff") { |
| 56 testonly = true |
53 sources = [ | 57 sources = [ |
54 "image_diff.cc", | 58 "image_diff.cc", |
55 "image_diff_png.cc", | 59 "image_diff_png.cc", |
56 "image_diff_png.h", | 60 "image_diff_png.h", |
57 ] | 61 ] |
58 deps = [ | 62 deps = [ |
59 "//third_party/pdfium", | 63 "//third_party/pdfium", |
60 ":fx_lpng", | 64 ":fx_lpng", |
61 ] | 65 ] |
62 configs -= [ "//build/config/compiler:chromium_code" ] | 66 configs -= [ "//build/config/compiler:chromium_code" ] |
63 configs += [ | 67 configs += [ |
64 ":pdfium_samples_config", | 68 ":pdfium_samples_config", |
65 "//build/config/compiler:no_chromium_code", | 69 "//build/config/compiler:no_chromium_code", |
66 ] | 70 ] |
67 } | 71 } |
68 | 72 |
69 static_library("fx_lpng") { | 73 static_library("fx_lpng") { |
| 74 testonly = true |
70 sources = [ | 75 sources = [ |
71 "fx_lpng/include/fx_png.h", | 76 "fx_lpng/include/fx_png.h", |
72 "fx_lpng/src/fx_png.c", | 77 "fx_lpng/src/fx_png.c", |
73 "fx_lpng/src/fx_pngerror.c", | 78 "fx_lpng/src/fx_pngerror.c", |
74 "fx_lpng/src/fx_pngget.c", | 79 "fx_lpng/src/fx_pngget.c", |
75 "fx_lpng/src/fx_pngmem.c", | 80 "fx_lpng/src/fx_pngmem.c", |
76 "fx_lpng/src/fx_pngpread.c", | 81 "fx_lpng/src/fx_pngpread.c", |
77 "fx_lpng/src/fx_pngread.c", | 82 "fx_lpng/src/fx_pngread.c", |
78 "fx_lpng/src/fx_pngrio.c", | 83 "fx_lpng/src/fx_pngrio.c", |
79 "fx_lpng/src/fx_pngrtran.c", | 84 "fx_lpng/src/fx_pngrtran.c", |
80 "fx_lpng/src/fx_pngrutil.c", | 85 "fx_lpng/src/fx_pngrutil.c", |
81 "fx_lpng/src/fx_pngset.c", | 86 "fx_lpng/src/fx_pngset.c", |
82 "fx_lpng/src/fx_pngtrans.c", | 87 "fx_lpng/src/fx_pngtrans.c", |
83 "fx_lpng/src/fx_pngwio.c", | 88 "fx_lpng/src/fx_pngwio.c", |
84 "fx_lpng/src/fx_pngwrite.c", | 89 "fx_lpng/src/fx_pngwrite.c", |
85 "fx_lpng/src/fx_pngwtran.c", | 90 "fx_lpng/src/fx_pngwtran.c", |
86 "fx_lpng/src/fx_pngwutil.c", | 91 "fx_lpng/src/fx_pngwutil.c", |
87 ] | 92 ] |
88 include_dirs = [ | 93 include_dirs = [ |
89 "../core/src/fxcodec/fx_zlib/include/", | 94 "../core/src/fxcodec/fx_zlib/include/", |
90 ] | 95 ] |
91 configs += [ ":pdfium_samples_config" ] | 96 configs += [ ":pdfium_samples_config" ] |
92 } | 97 } |
OLD | NEW |