Fix GN build after PNG support backport
[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     "//v8:v8_libplatform",
28     ":fx_lpng",
29   ]
30   include_dirs = [
31     "//v8",
32     "//v8/include",
33   ]
34   configs += [ ":pdfium_samples_config" ]
35 }
36
37 executable("pdfium_diff") {
38   sources = [
39     "image_diff.cc",
40     "image_diff_png.cc",
41     "image_diff_png.h",
42   ]
43   deps = [
44     "//third_party/pdfium",
45     ":fx_lpng",
46   ]
47   configs += [ ":pdfium_samples_config" ]
48 }
49
50 static_library("fx_lpng") {
51   sources = [
52     "fx_lpng/include/fx_png.h",
53     "fx_lpng/src/fx_png.c",
54     "fx_lpng/src/fx_pngerror.c",
55     "fx_lpng/src/fx_pngget.c",
56     "fx_lpng/src/fx_pngmem.c",
57     "fx_lpng/src/fx_pngpread.c",
58     "fx_lpng/src/fx_pngread.c",
59     "fx_lpng/src/fx_pngrio.c",
60     "fx_lpng/src/fx_pngrtran.c",
61     "fx_lpng/src/fx_pngrutil.c",
62     "fx_lpng/src/fx_pngset.c",
63     "fx_lpng/src/fx_pngtrans.c",
64     "fx_lpng/src/fx_pngwio.c",
65     "fx_lpng/src/fx_pngwrite.c",
66     "fx_lpng/src/fx_pngwtran.c",
67     "fx_lpng/src/fx_pngwutil.c",
68   ]
69   include_dirs = [
70     "../core/src/fxcodec/fx_zlib/include/",
71   ]
72   configs += [ ":pdfium_samples_config" ]
73 }