Clean up CPDF_AnnotList.
[pdfium.git] / samples / BUILD.gn
1 # Copyright 2014 PDFium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import("../pdfium.gni")
6
7 group("samples") {
8   testonly = true
9   deps = [
10     ":pdfium_test",
11     ":pdfium_diff",
12   ]
13 }
14
15 config("pdfium_samples_config") {
16   defines = [
17     "PNG_PREFIX",
18     "PNGPREFIX_H",
19     "PNG_USE_READ_MACROS",
20   ]
21   if (pdf_enable_v8) {
22     defines += [
23       "PDF_ENABLE_V8",
24     ]
25   }
26 }
27
28 executable("pdfium_test") {
29   testonly = true
30   sources = [
31     "image_diff_png.cc",
32     "pdfium_test.cc",
33   ]
34   deps = [
35     "//third_party/pdfium:pdfium",
36     "//third_party/pdfium:test_support",
37     # Regardless of whether the library ships against system freetype,
38     # always link this binary against the bundled one for consistency
39     # of results across platforms.
40     "//third_party/pdfium/third_party:fx_freetype",
41     ":fx_lpng",
42   ]
43   if (pdf_enable_v8) {
44     deps += [
45       "//v8:v8_libplatform",
46     ]
47     include_dirs = [
48       "//v8",
49       "//v8/include",
50     ]
51   }
52   configs += [ ":pdfium_samples_config" ]
53 }
54
55 executable("pdfium_diff") {
56   testonly = true
57   sources = [
58     "image_diff.cc",
59     "image_diff_png.cc",
60     "image_diff_png.h",
61   ]
62   deps = [
63     "//third_party/pdfium",
64     ":fx_lpng",
65   ]
66   configs -= [ "//build/config/compiler:chromium_code" ]
67   configs += [
68     ":pdfium_samples_config",
69     "//build/config/compiler:no_chromium_code",
70   ]
71 }
72
73 static_library("fx_lpng") {
74   testonly = true
75   sources = [
76     "fx_lpng/include/fx_png.h",
77     "fx_lpng/src/fx_png.c",
78     "fx_lpng/src/fx_pngerror.c",
79     "fx_lpng/src/fx_pngget.c",
80     "fx_lpng/src/fx_pngmem.c",
81     "fx_lpng/src/fx_pngpread.c",
82     "fx_lpng/src/fx_pngread.c",
83     "fx_lpng/src/fx_pngrio.c",
84     "fx_lpng/src/fx_pngrtran.c",
85     "fx_lpng/src/fx_pngrutil.c",
86     "fx_lpng/src/fx_pngset.c",
87     "fx_lpng/src/fx_pngtrans.c",
88     "fx_lpng/src/fx_pngwio.c",
89     "fx_lpng/src/fx_pngwrite.c",
90     "fx_lpng/src/fx_pngwtran.c",
91     "fx_lpng/src/fx_pngwutil.c",
92   ]
93   include_dirs = [
94     "../core/src/fxcodec/fx_zlib/include/",
95   ]
96   configs += [ ":pdfium_samples_config" ]
97 }