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