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") | |
Lei Zhang
2015/11/18 01:04:28
I suppose some day we'll have a standalone build,
| |
5 import("../pdfium.gni") | 6 import("../pdfium.gni") |
6 | 7 |
7 group("samples") { | 8 group("samples") { |
8 testonly = true | 9 testonly = true |
9 deps = [ | 10 deps = [ |
10 ":pdfium_test", | 11 ":pdfium_test", |
11 ":pdfium_diff", | 12 ":pdfium_diff", |
12 ] | 13 ] |
13 } | 14 } |
14 | 15 |
15 config("pdfium_samples_config") { | 16 config("pdfium_samples_config") { |
16 defines = [ | 17 defines = [ |
17 "PNG_PREFIX", | 18 "PNG_PREFIX", |
18 "PNGPREFIX_H", | 19 "PNGPREFIX_H", |
19 "PNG_USE_READ_MACROS", | 20 "PNG_USE_READ_MACROS", |
20 ] | 21 ] |
21 include_dirs = [ ".." ] | 22 include_dirs = [ ".." ] |
22 if (pdf_enable_v8) { | 23 if (pdf_enable_v8) { |
23 defines += [ "PDF_ENABLE_V8" ] | 24 defines += [ "PDF_ENABLE_V8" ] |
24 } | 25 } |
25 } | 26 } |
26 | 27 |
27 executable("pdfium_test") { | 28 executable("pdfium_test") { |
28 testonly = true | 29 testonly = true |
29 sources = [ | 30 sources = [ |
30 "image_diff_png.cc", | 31 "image_diff_png.cc", |
31 "pdfium_test.cc", | 32 "pdfium_test.cc", |
32 ] | 33 ] |
33 deps = [ | 34 deps = [ |
35 "//build/config/sanitizers:deps", | |
34 "//third_party/pdfium:pdfium", | 36 "//third_party/pdfium:pdfium", |
35 "//third_party/pdfium:test_support", | 37 "//third_party/pdfium:test_support", |
36 | 38 |
37 # Regardless of whether the library ships against system freetype, | 39 # Regardless of whether the library ships against system freetype, |
38 # always link this binary against the bundled one for consistency | 40 # always link this binary against the bundled one for consistency |
39 # of results across platforms. | 41 # of results across platforms. |
40 "//third_party/pdfium/third_party:fx_freetype", | 42 "//third_party/pdfium/third_party:fx_freetype", |
41 ":fx_lpng", | 43 ":fx_lpng", |
42 ] | 44 ] |
43 if (pdf_enable_v8) { | 45 if (pdf_enable_v8) { |
44 deps += [ "//v8:v8_libplatform" ] | 46 deps += [ "//v8:v8_libplatform" ] |
45 include_dirs = [ | 47 include_dirs = [ |
46 "//v8", | 48 "//v8", |
47 "//v8/include", | 49 "//v8/include", |
48 ] | 50 ] |
49 } | 51 } |
50 configs += [ ":pdfium_samples_config" ] | 52 configs += [ ":pdfium_samples_config" ] |
51 } | 53 } |
52 | 54 |
53 executable("pdfium_diff") { | 55 executable("pdfium_diff") { |
54 testonly = true | 56 testonly = true |
55 sources = [ | 57 sources = [ |
56 "image_diff.cc", | 58 "image_diff.cc", |
57 "image_diff_png.cc", | 59 "image_diff_png.cc", |
58 "image_diff_png.h", | 60 "image_diff_png.h", |
59 ] | 61 ] |
60 deps = [ | 62 deps = [ |
63 "//build/config/sanitizers:deps", | |
61 "//third_party/pdfium", | 64 "//third_party/pdfium", |
62 ":fx_lpng", | 65 ":fx_lpng", |
63 ] | 66 ] |
64 configs -= [ "//build/config/compiler:chromium_code" ] | 67 configs -= [ "//build/config/compiler:chromium_code" ] |
65 configs += [ | 68 configs += [ |
66 ":pdfium_samples_config", | 69 ":pdfium_samples_config", |
67 "//build/config/compiler:no_chromium_code", | 70 "//build/config/compiler:no_chromium_code", |
68 ] | 71 ] |
69 } | 72 } |
70 | 73 |
(...skipping 13 matching lines...) Expand all Loading... | |
84 "fx_lpng/src/fx_pngset.c", | 87 "fx_lpng/src/fx_pngset.c", |
85 "fx_lpng/src/fx_pngtrans.c", | 88 "fx_lpng/src/fx_pngtrans.c", |
86 "fx_lpng/src/fx_pngwio.c", | 89 "fx_lpng/src/fx_pngwio.c", |
87 "fx_lpng/src/fx_pngwrite.c", | 90 "fx_lpng/src/fx_pngwrite.c", |
88 "fx_lpng/src/fx_pngwtran.c", | 91 "fx_lpng/src/fx_pngwtran.c", |
89 "fx_lpng/src/fx_pngwutil.c", | 92 "fx_lpng/src/fx_pngwutil.c", |
90 ] | 93 ] |
91 include_dirs = [ "../core/src/fxcodec/fx_zlib/include/" ] | 94 include_dirs = [ "../core/src/fxcodec/fx_zlib/include/" ] |
92 configs += [ ":pdfium_samples_config" ] | 95 configs += [ ":pdfium_samples_config" ] |
93 } | 96 } |
OLD | NEW |