b21a766bd99058a579be2e0a619a46987dad5be0
[pdfium.git] / BUILD.gn
1 # Copyright 2014 The Chromium 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("//testing/test.gni")
6
7 pdf_use_skia = false
8
9 declare_args() {
10   # On Android there's no system FreeType. On Windows and Mac, only a few
11   # methods are used from it.
12   pdfium_bundle_freetype = !is_linux
13 }
14
15 config("pdfium_config") {
16   cflags = []
17   include_dirs = [ "third_party/freetype/include" ]
18   defines = [
19     "_FPDFSDK_LIB",
20     "_NO_GDIPLUS_",  # workaround text rendering issues on Windows
21     "OPJ_STATIC",
22   ]
23
24   if (pdf_use_skia) {
25     defines += [ "_SKIA_SUPPORT_" ]
26   }
27
28   if (is_linux) {
29     if (current_cpu == "x64") {
30       defines += [ "_FX_CPU_=_FX_X64_" ]
31       cflags += [ "-fPIC" ]
32     } else if (current_cpu == "x86") {
33       defines += [ "_FX_CPU_=_FX_X86_" ]
34     }
35   }
36
37   if (is_win) {
38     cflags += [
39       "/wd4005",
40       "/wd4018",
41       "/wd4146",
42       "/wd4333",
43       "/wd4345",
44     ]
45   }
46 }
47
48 static_library("pdfium") {
49   sources = [
50     "fpdfsdk/include/fpdf_dataavail.h",
51     "fpdfsdk/include/fpdf_ext.h",
52     "fpdfsdk/include/fpdf_flatten.h",
53     "fpdfsdk/include/fpdf_progressive.h",
54     "fpdfsdk/include/fpdf_searchex.h",
55     "fpdfsdk/include/fpdf_sysfontinfo.h",
56     "fpdfsdk/include/fpdf_sysfontinfo.h",
57     "fpdfsdk/include/fpdf_transformpage.h",
58     "fpdfsdk/include/fpdfdoc.h",
59     "fpdfsdk/include/fpdfedit.h",
60     "fpdfsdk/include/fpdfformfill.h",
61     "fpdfsdk/include/fpdftext.h",
62     "fpdfsdk/include/fpdfview.h",
63     "fpdfsdk/include/fsdk_actionhandler.h",
64     "fpdfsdk/include/fsdk_annothandler.h",
65     "fpdfsdk/include/fsdk_baseannot.h",
66     "fpdfsdk/include/fsdk_baseform.h",
67     "fpdfsdk/src/fpdf_dataavail.cpp",
68     "fpdfsdk/src/fpdf_ext.cpp",
69     "fpdfsdk/src/fpdf_flatten.cpp",
70     "fpdfsdk/src/fpdf_progressive.cpp",
71     "fpdfsdk/src/fpdf_searchex.cpp",
72     "fpdfsdk/src/fpdf_sysfontinfo.cpp",
73     "fpdfsdk/src/fpdf_transformpage.cpp",
74     "fpdfsdk/src/fpdfdoc.cpp",
75     "fpdfsdk/src/fpdfeditimg.cpp",
76     "fpdfsdk/src/fpdfeditpage.cpp",
77     "fpdfsdk/src/fpdfformfill.cpp",
78     "fpdfsdk/src/fpdfppo.cpp",
79     "fpdfsdk/src/fpdfsave.cpp",
80     "fpdfsdk/src/fpdfsdkdll.rc",
81     "fpdfsdk/src/fpdftext.cpp",
82     "fpdfsdk/src/fpdfview.cpp",
83     "fpdfsdk/src/fsdk_actionhandler.cpp",
84     "fpdfsdk/src/fsdk_annothandler.cpp",
85     "fpdfsdk/src/fsdk_baseannot.cpp",
86     "fpdfsdk/src/fsdk_baseform.cpp",
87     "fpdfsdk/src/fsdk_mgr.cpp",
88     "fpdfsdk/src/fsdk_rendercontext.cpp",
89     "fpdfsdk/src/resource.h",
90   ]
91
92   libs = []
93   configs -= [ "//build/config/compiler:chromium_code" ]
94   configs += [
95     ":pdfium_config",
96     "//build/config/compiler:no_chromium_code",
97   ]
98
99   deps = [
100     "third_party:bigint",
101     "third_party:pdfium_base",
102     ":fdrm",
103     ":formfiller",
104     ":fpdfapi",
105     ":fpdfdoc",
106     ":fpdftext",
107     ":fxcodec",
108     ":fxcrt",
109     ":fxedit",
110     ":fxge",
111     ":javascript",
112     ":jsapi",
113     ":pdfwindow",
114   ]
115
116   if (is_win) {
117     libs += [
118       "advapi32.lib",
119       "gdi32.lib",
120       "user32.lib",
121     ]
122   }
123
124   if (is_mac) {
125     libs += [
126       "AppKit.framework",
127       "CoreFoundation.framework",
128     ]
129   }
130
131   if (pdfium_bundle_freetype) {
132     deps += [ "third_party:freetype" ]
133   } else {
134     libs += [ "freetype" ]
135   }
136 }
137
138 # Targets below this are only visible within this file.
139 visibility = [ ":*" ]
140
141 static_library("fdrm") {
142   sources = [
143     "core/include/fdrm/fx_crypt.h",
144     "core/src/fdrm/crypto/fx_crypt.cpp",
145     "core/src/fdrm/crypto/fx_crypt_aes.cpp",
146     "core/src/fdrm/crypto/fx_crypt_sha.cpp",
147   ]
148   configs -= [ "//build/config/compiler:chromium_code" ]
149   configs += [
150     ":pdfium_config",
151     "//build/config/compiler:no_chromium_code",
152   ]
153 }
154
155 static_library("fpdfdoc") {
156   sources = [
157     "core/include/fpdfdoc/fpdf_ap.h",
158     "core/include/fpdfdoc/fpdf_doc.h",
159     "core/include/fpdfdoc/fpdf_tagged.h",
160     "core/include/fpdfdoc/fpdf_vt.h",
161     "core/src/fpdfdoc/doc_action.cpp",
162     "core/src/fpdfdoc/doc_annot.cpp",
163     "core/src/fpdfdoc/doc_ap.cpp",
164     "core/src/fpdfdoc/doc_basic.cpp",
165     "core/src/fpdfdoc/doc_bookmark.cpp",
166     "core/src/fpdfdoc/doc_form.cpp",
167     "core/src/fpdfdoc/doc_formcontrol.cpp",
168     "core/src/fpdfdoc/doc_formfield.cpp",
169     "core/src/fpdfdoc/doc_link.cpp",
170     "core/src/fpdfdoc/doc_metadata.cpp",
171     "core/src/fpdfdoc/doc_ocg.cpp",
172     "core/src/fpdfdoc/doc_tagged.cpp",
173     "core/src/fpdfdoc/doc_utils.cpp",
174     "core/src/fpdfdoc/doc_viewerPreferences.cpp",
175     "core/src/fpdfdoc/doc_vt.cpp",
176     "core/src/fpdfdoc/doc_vtmodule.cpp",
177     "core/src/fpdfdoc/pdf_vt.h",
178     "core/src/fpdfdoc/tagged_int.h",
179   ]
180   configs -= [ "//build/config/compiler:chromium_code" ]
181   configs += [
182     ":pdfium_config",
183     "//build/config/compiler:no_chromium_code",
184   ]
185 }
186
187 static_library("fpdfapi") {
188   sources = [
189     "core/include/fpdfapi/fpdf_module.h",
190     "core/include/fpdfapi/fpdf_objects.h",
191     "core/include/fpdfapi/fpdf_page.h",
192     "core/include/fpdfapi/fpdf_pageobj.h",
193     "core/include/fpdfapi/fpdf_parser.h",
194     "core/include/fpdfapi/fpdf_render.h",
195     "core/include/fpdfapi/fpdf_resource.h",
196     "core/include/fpdfapi/fpdf_serial.h",
197     "core/include/fpdfapi/fpdfapi.h",
198     "core/src/fpdfapi/fpdf_basic_module.cpp",
199     "core/src/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp",
200     "core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp",
201     "core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp",
202     "core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp",
203     "core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp",
204     "core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp",
205     "core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp",
206     "core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp",
207     "core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp",
208     "core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp",
209     "core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp",
210     "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp",
211     "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp",
212     "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp",
213     "core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp",
214     "core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp",
215     "core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp",
216     "core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp",
217     "core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp",
218     "core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp",
219     "core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp",
220     "core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp",
221     "core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp",
222     "core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp",
223     "core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp",
224     "core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp",
225     "core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp",
226     "core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp",
227     "core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp",
228     "core/src/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp",
229     "core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp",
230     "core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp",
231     "core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp",
232     "core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp",
233     "core/src/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp",
234     "core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp",
235     "core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp",
236     "core/src/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp",
237     "core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp",
238     "core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp",
239     "core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp",
240     "core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp",
241     "core/src/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp",
242     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp",
243     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp",
244     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp",
245     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp",
246     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UTF16-H_5.cpp",
247     "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UTF16-V_5.cpp",
248     "core/src/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp",
249     "core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp",
250     "core/src/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp",
251     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp",
252     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp",
253     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp",
254     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp",
255     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp",
256     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp",
257     "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp",
258     "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp",
259     "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp",
260     "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp",
261     "core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp",
262     "core/src/fpdfapi/fpdf_cmaps/cmap_int.h",
263     "core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp",
264     "core/src/fpdfapi/fpdf_edit/editint.h",
265     "core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp",
266     "core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp",
267     "core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp",
268     "core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp",
269     "core/src/fpdfapi/fpdf_font/common.h",
270     "core/src/fpdfapi/fpdf_font/font_int.h",
271     "core/src/fpdfapi/fpdf_font/fpdf_font.cpp",
272     "core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp",
273     "core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp",
274     "core/src/fpdfapi/fpdf_font/ttgsubtable.cpp",
275     "core/src/fpdfapi/fpdf_font/ttgsubtable.h",
276     "core/src/fpdfapi/fpdf_page/fpdf_page.cpp",
277     "core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp",
278     "core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp",
279     "core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp",
280     "core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp",
281     "core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp",
282     "core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp",
283     "core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp",
284     "core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp",
285     "core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp",
286     "core/src/fpdfapi/fpdf_page/pageint.h",
287     "core/src/fpdfapi/fpdf_parser/filters_int.h",
288     "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp",
289     "core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp",
290     "core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp",
291     "core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp",
292     "core/src/fpdfapi/fpdf_parser/fpdf_parser_filters.cpp",
293     "core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp",
294     "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp",
295     "core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp",
296     "core/src/fpdfapi/fpdf_render/fpdf_render.cpp",
297     "core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp",
298     "core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp",
299     "core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp",
300     "core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp",
301     "core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp",
302     "core/src/fpdfapi/fpdf_render/render_int.h",
303   ]
304   configs -= [ "//build/config/compiler:chromium_code" ]
305   configs += [
306     ":pdfium_config",
307     "//build/config/compiler:no_chromium_code",
308   ]
309 }
310
311 static_library("fpdftext") {
312   sources = [
313     "core/include/fpdftext/fpdf_text.h",
314     "core/src/fpdftext/fpdf_text.cpp",
315     "core/src/fpdftext/fpdf_text_int.cpp",
316     "core/src/fpdftext/fpdf_text_search.cpp",
317     "core/src/fpdftext/text_int.h",
318     "core/src/fpdftext/txtproc.h",
319     "core/src/fpdftext/unicodenormalization.cpp",
320     "core/src/fpdftext/unicodenormalizationdata.cpp",
321   ]
322   configs -= [ "//build/config/compiler:chromium_code" ]
323   configs += [
324     ":pdfium_config",
325     "//build/config/compiler:no_chromium_code",
326   ]
327 }
328
329 static_library("fxcodec") {
330   sources = [
331     "core/include/fxcodec/fx_codec.h",
332     "core/include/fxcodec/fx_codec_def.h",
333     "core/include/fxcodec/fx_codec_provider.h",
334     "core/src/fxcodec/codec/codec_int.h",
335     "core/src/fxcodec/codec/fx_codec.cpp",
336     "core/src/fxcodec/codec/fx_codec_fax.cpp",
337     "core/src/fxcodec/codec/fx_codec_flate.cpp",
338     "core/src/fxcodec/codec/fx_codec_icc.cpp",
339     "core/src/fxcodec/codec/fx_codec_jbig.cpp",
340     "core/src/fxcodec/codec/fx_codec_jbig_enc.cpp",
341     "core/src/fxcodec/codec/fx_codec_jpeg.cpp",
342     "core/src/fxcodec/codec/fx_codec_jpx_opj.cpp",
343     "core/src/fxcodec/fx_libopenjpeg/include/fx_openjpeg.h",
344     "core/src/fxcodec/fx_libopenjpeg/src/fx_bio.c",
345     "core/src/fxcodec/fx_libopenjpeg/src/fx_cio.c",
346     "core/src/fxcodec/fx_libopenjpeg/src/fx_dwt.c",
347     "core/src/fxcodec/fx_libopenjpeg/src/fx_event.c",
348     "core/src/fxcodec/fx_libopenjpeg/src/fx_function_list.c",
349     "core/src/fxcodec/fx_libopenjpeg/src/fx_image.c",
350     "core/src/fxcodec/fx_libopenjpeg/src/fx_invert.c",
351     "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k.c",
352     "core/src/fxcodec/fx_libopenjpeg/src/fx_j2k_lib.c",
353     "core/src/fxcodec/fx_libopenjpeg/src/fx_jpt.c",
354     "core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c",
355     "core/src/fxcodec/fx_libopenjpeg/src/fx_mqc.c",
356     "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg.c",
357     "core/src/fxcodec/fx_libopenjpeg/src/fx_openjpeg_jp2.c",
358     "core/src/fxcodec/fx_libopenjpeg/src/fx_opj_clock.c",
359     "core/src/fxcodec/fx_libopenjpeg/src/fx_pi.c",
360     "core/src/fxcodec/fx_libopenjpeg/src/fx_raw.c",
361     "core/src/fxcodec/fx_libopenjpeg/src/fx_t1.c",
362     "core/src/fxcodec/fx_libopenjpeg/src/fx_t2.c",
363     "core/src/fxcodec/fx_libopenjpeg/src/fx_tcd.c",
364     "core/src/fxcodec/fx_libopenjpeg/src/fx_tgt.c",
365     "core/src/fxcodec/fx_zlib/include/fx_zlib.h",
366     "core/src/fxcodec/fx_zlib/src/fx_zlib_adler32.c",
367     "core/src/fxcodec/fx_zlib/src/fx_zlib_compress.c",
368     "core/src/fxcodec/fx_zlib/src/fx_zlib_crc32.c",
369     "core/src/fxcodec/fx_zlib/src/fx_zlib_deflate.c",
370     "core/src/fxcodec/fx_zlib/src/fx_zlib_gzclose.c",
371     "core/src/fxcodec/fx_zlib/src/fx_zlib_gzlib.c",
372     "core/src/fxcodec/fx_zlib/src/fx_zlib_gzread.c",
373     "core/src/fxcodec/fx_zlib/src/fx_zlib_gzwrite.c",
374     "core/src/fxcodec/fx_zlib/src/fx_zlib_infback.c",
375     "core/src/fxcodec/fx_zlib/src/fx_zlib_inffast.c",
376     "core/src/fxcodec/fx_zlib/src/fx_zlib_inflate.c",
377     "core/src/fxcodec/fx_zlib/src/fx_zlib_inftrees.c",
378     "core/src/fxcodec/fx_zlib/src/fx_zlib_trees.c",
379     "core/src/fxcodec/fx_zlib/src/fx_zlib_uncompr.c",
380     "core/src/fxcodec/fx_zlib/src/fx_zlib_zutil.c",
381     "core/src/fxcodec/jbig2/JBig2_ArithDecoder.h",
382     "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp",
383     "core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h",
384     "core/src/fxcodec/jbig2/JBig2_ArithQe.h",
385     "core/src/fxcodec/jbig2/JBig2_BitStream.h",
386     "core/src/fxcodec/jbig2/JBig2_Context.cpp",
387     "core/src/fxcodec/jbig2/JBig2_Context.h",
388     "core/src/fxcodec/jbig2/JBig2_Define.h",
389     "core/src/fxcodec/jbig2/JBig2_GeneralDecoder.cpp",
390     "core/src/fxcodec/jbig2/JBig2_GeneralDecoder.h",
391     "core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp",
392     "core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h",
393     "core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp",
394     "core/src/fxcodec/jbig2/JBig2_HuffmanTable.h",
395     "core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h",
396     "core/src/fxcodec/jbig2/JBig2_Image.cpp",
397     "core/src/fxcodec/jbig2/JBig2_Image.h",
398     "core/src/fxcodec/jbig2/JBig2_List.h",
399     "core/src/fxcodec/jbig2/JBig2_Module.h",
400     "core/src/fxcodec/jbig2/JBig2_Object.cpp",
401     "core/src/fxcodec/jbig2/JBig2_Object.h",
402     "core/src/fxcodec/jbig2/JBig2_Page.h",
403     "core/src/fxcodec/jbig2/JBig2_PatternDict.cpp",
404     "core/src/fxcodec/jbig2/JBig2_PatternDict.h",
405     "core/src/fxcodec/jbig2/JBig2_Segment.cpp",
406     "core/src/fxcodec/jbig2/JBig2_Segment.h",
407     "core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp",
408     "core/src/fxcodec/jbig2/JBig2_SymbolDict.h",
409     "core/src/fxcodec/lcms2/src/fx_cmscam02.c",
410     "core/src/fxcodec/lcms2/src/fx_cmscgats.c",
411     "core/src/fxcodec/lcms2/src/fx_cmscnvrt.c",
412     "core/src/fxcodec/lcms2/src/fx_cmserr.c",
413     "core/src/fxcodec/lcms2/src/fx_cmsgamma.c",
414     "core/src/fxcodec/lcms2/src/fx_cmsgmt.c",
415     "core/src/fxcodec/lcms2/src/fx_cmshalf.c",
416     "core/src/fxcodec/lcms2/src/fx_cmsintrp.c",
417     "core/src/fxcodec/lcms2/src/fx_cmsio0.c",
418     "core/src/fxcodec/lcms2/src/fx_cmsio1.c",
419     "core/src/fxcodec/lcms2/src/fx_cmslut.c",
420     "core/src/fxcodec/lcms2/src/fx_cmsmd5.c",
421     "core/src/fxcodec/lcms2/src/fx_cmsmtrx.c",
422     "core/src/fxcodec/lcms2/src/fx_cmsnamed.c",
423     "core/src/fxcodec/lcms2/src/fx_cmsopt.c",
424     "core/src/fxcodec/lcms2/src/fx_cmspack.c",
425     "core/src/fxcodec/lcms2/src/fx_cmspcs.c",
426     "core/src/fxcodec/lcms2/src/fx_cmsplugin.c",
427     "core/src/fxcodec/lcms2/src/fx_cmsps2.c",
428     "core/src/fxcodec/lcms2/src/fx_cmssamp.c",
429     "core/src/fxcodec/lcms2/src/fx_cmssm.c",
430     "core/src/fxcodec/lcms2/src/fx_cmstypes.c",
431     "core/src/fxcodec/lcms2/src/fx_cmsvirt.c",
432     "core/src/fxcodec/lcms2/src/fx_cmswtpnt.c",
433     "core/src/fxcodec/lcms2/src/fx_cmsxform.c",
434     "core/src/fxcodec/libjpeg/cderror.h",
435     "core/src/fxcodec/libjpeg/cdjpeg.h",
436     "core/src/fxcodec/libjpeg/fpdfapi_jcapimin.c",
437     "core/src/fxcodec/libjpeg/fpdfapi_jcapistd.c",
438     "core/src/fxcodec/libjpeg/fpdfapi_jccoefct.c",
439     "core/src/fxcodec/libjpeg/fpdfapi_jccolor.c",
440     "core/src/fxcodec/libjpeg/fpdfapi_jcdctmgr.c",
441     "core/src/fxcodec/libjpeg/fpdfapi_jchuff.c",
442     "core/src/fxcodec/libjpeg/fpdfapi_jcinit.c",
443     "core/src/fxcodec/libjpeg/fpdfapi_jcmainct.c",
444     "core/src/fxcodec/libjpeg/fpdfapi_jcmarker.c",
445     "core/src/fxcodec/libjpeg/fpdfapi_jcmaster.c",
446     "core/src/fxcodec/libjpeg/fpdfapi_jcomapi.c",
447     "core/src/fxcodec/libjpeg/fpdfapi_jcparam.c",
448     "core/src/fxcodec/libjpeg/fpdfapi_jcphuff.c",
449     "core/src/fxcodec/libjpeg/fpdfapi_jcprepct.c",
450     "core/src/fxcodec/libjpeg/fpdfapi_jcsample.c",
451     "core/src/fxcodec/libjpeg/fpdfapi_jctrans.c",
452     "core/src/fxcodec/libjpeg/fpdfapi_jdapimin.c",
453     "core/src/fxcodec/libjpeg/fpdfapi_jdapistd.c",
454     "core/src/fxcodec/libjpeg/fpdfapi_jdcoefct.c",
455     "core/src/fxcodec/libjpeg/fpdfapi_jdcolor.c",
456     "core/src/fxcodec/libjpeg/fpdfapi_jddctmgr.c",
457     "core/src/fxcodec/libjpeg/fpdfapi_jdhuff.c",
458     "core/src/fxcodec/libjpeg/fpdfapi_jdinput.c",
459     "core/src/fxcodec/libjpeg/fpdfapi_jdmainct.c",
460     "core/src/fxcodec/libjpeg/fpdfapi_jdmarker.c",
461     "core/src/fxcodec/libjpeg/fpdfapi_jdmaster.c",
462     "core/src/fxcodec/libjpeg/fpdfapi_jdmerge.c",
463     "core/src/fxcodec/libjpeg/fpdfapi_jdphuff.c",
464     "core/src/fxcodec/libjpeg/fpdfapi_jdpostct.c",
465     "core/src/fxcodec/libjpeg/fpdfapi_jdsample.c",
466     "core/src/fxcodec/libjpeg/fpdfapi_jdtrans.c",
467     "core/src/fxcodec/libjpeg/fpdfapi_jerror.c",
468     "core/src/fxcodec/libjpeg/fpdfapi_jfdctfst.c",
469     "core/src/fxcodec/libjpeg/fpdfapi_jfdctint.c",
470     "core/src/fxcodec/libjpeg/fpdfapi_jidctfst.c",
471     "core/src/fxcodec/libjpeg/fpdfapi_jidctint.c",
472     "core/src/fxcodec/libjpeg/fpdfapi_jidctred.c",
473     "core/src/fxcodec/libjpeg/fpdfapi_jmemmgr.c",
474     "core/src/fxcodec/libjpeg/fpdfapi_jmemnobs.c",
475     "core/src/fxcodec/libjpeg/fpdfapi_jutils.c",
476     "core/src/fxcodec/libjpeg/jchuff.h",
477     "core/src/fxcodec/libjpeg/jconfig.h",
478     "core/src/fxcodec/libjpeg/jdct.h",
479     "core/src/fxcodec/libjpeg/jdhuff.h",
480     "core/src/fxcodec/libjpeg/jerror.h",
481     "core/src/fxcodec/libjpeg/jinclude.h",
482     "core/src/fxcodec/libjpeg/jmemsys.h",
483     "core/src/fxcodec/libjpeg/jmorecfg.h",
484     "core/src/fxcodec/libjpeg/jpegint.h",
485     "core/src/fxcodec/libjpeg/jpeglib.h",
486     "core/src/fxcodec/libjpeg/jversion.h",
487     "core/src/fxcodec/libjpeg/makefile",
488     "core/src/fxcodec/libjpeg/transupp.h",
489   ]
490   configs -= [ "//build/config/compiler:chromium_code" ]
491
492   if (is_posix) {
493     # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int
494     # conversion to check that an address is 16-bit aligned (benign).
495     cflags_c = [ "-Wno-pointer-to-int-cast" ]
496   }
497   configs += [
498     ":pdfium_config",
499     "//build/config/compiler:no_chromium_code",
500   ]
501 }
502
503 static_library("fxcrt") {
504   sources = [
505     "core/include/fxcrt/fx_arb.h",
506     "core/include/fxcrt/fx_basic.h",
507     "core/include/fxcrt/fx_coordinates.h",
508     "core/include/fxcrt/fx_ext.h",
509     "core/include/fxcrt/fx_memory.h",
510     "core/include/fxcrt/fx_stream.h",
511     "core/include/fxcrt/fx_string.h",
512     "core/include/fxcrt/fx_system.h",
513     "core/include/fxcrt/fx_ucd.h",
514     "core/include/fxcrt/fx_xml.h",
515     "core/src/fxcrt/extension.h",
516     "core/src/fxcrt/fx_arabic.cpp",
517     "core/src/fxcrt/fx_arabic.h",
518     "core/src/fxcrt/fx_basic_array.cpp",
519     "core/src/fxcrt/fx_basic_bstring.cpp",
520     "core/src/fxcrt/fx_basic_buffer.cpp",
521     "core/src/fxcrt/fx_basic_coords.cpp",
522     "core/src/fxcrt/fx_basic_gcc.cpp",
523     "core/src/fxcrt/fx_basic_list.cpp",
524     "core/src/fxcrt/fx_basic_maps.cpp",
525     "core/src/fxcrt/fx_basic_memmgr.cpp",
526     "core/src/fxcrt/fx_basic_plex.cpp",
527     "core/src/fxcrt/fx_basic_utf.cpp",
528     "core/src/fxcrt/fx_basic_util.cpp",
529     "core/src/fxcrt/fx_basic_wstring.cpp",
530     "core/src/fxcrt/fx_extension.cpp",
531     "core/src/fxcrt/fx_safe_types.h",
532     "core/src/fxcrt/fx_ucddata.cpp",
533     "core/src/fxcrt/fx_unicode.cpp",
534     "core/src/fxcrt/fx_xml_composer.cpp",
535     "core/src/fxcrt/fx_xml_parser.cpp",
536     "core/src/fxcrt/fxcrt_platforms.cpp",
537     "core/src/fxcrt/fxcrt_platforms.h",
538     "core/src/fxcrt/fxcrt_posix.cpp",
539     "core/src/fxcrt/fxcrt_posix.h",
540     "core/src/fxcrt/fxcrt_windows.cpp",
541     "core/src/fxcrt/fxcrt_windows.h",
542     "core/src/fxcrt/plex.h",
543     "core/src/fxcrt/xml_int.h",
544   ]
545   configs -= [ "//build/config/compiler:chromium_code" ]
546   configs += [
547     ":pdfium_config",
548     "//build/config/compiler:no_chromium_code",
549   ]
550 }
551
552 static_library("fxge") {
553   sources = [
554     "core/include/fxge/fpf.h",
555     "core/include/fxge/fx_dib.h",
556     "core/include/fxge/fx_font.h",
557     "core/include/fxge/fx_freetype.h",
558     "core/include/fxge/fx_ge.h",
559     "core/include/fxge/fx_ge_apple.h",
560     "core/include/fxge/fx_ge_win32.h",
561     "core/src/fxge/agg/include/fx_agg_driver.h",
562     "core/src/fxge/agg/include/fxfx_agg_basics.h",
563     "core/src/fxge/agg/include/fxfx_agg_clip_liang_barsky.h",
564     "core/src/fxge/agg/include/fxfx_agg_conv_dash.h",
565     "core/src/fxge/agg/include/fxfx_agg_conv_stroke.h",
566     "core/src/fxge/agg/include/fxfx_agg_curves.h",
567     "core/src/fxge/agg/include/fxfx_agg_path_storage.h",
568     "core/src/fxge/agg/include/fxfx_agg_rasterizer_scanline_aa.h",
569     "core/src/fxge/agg/include/fxfx_agg_renderer_scanline.h",
570     "core/src/fxge/agg/include/fxfx_agg_rendering_buffer.h",
571     "core/src/fxge/agg/include/fxfx_agg_scanline_u.h",
572     "core/src/fxge/agg/src/fxfx_agg_curves.cpp",
573     "core/src/fxge/agg/src/fxfx_agg_driver.cpp",
574     "core/src/fxge/agg/src/fxfx_agg_path_storage.cpp",
575     "core/src/fxge/agg/src/fxfx_agg_rasterizer_scanline_aa.cpp",
576     "core/src/fxge/agg/src/fxfx_agg_vcgen_dash.cpp",
577     "core/src/fxge/agg/src/fxfx_agg_vcgen_stroke.cpp",
578     "core/src/fxge/android/fpf_skiafont.cpp",
579     "core/src/fxge/android/fpf_skiafont.h",
580     "core/src/fxge/android/fpf_skiafontmgr.cpp",
581     "core/src/fxge/android/fpf_skiafontmgr.h",
582     "core/src/fxge/android/fpf_skiamodule.cpp",
583     "core/src/fxge/android/fpf_skiamodule.h",
584     "core/src/fxge/android/fx_android_font.cpp",
585     "core/src/fxge/android/fx_android_font.h",
586     "core/src/fxge/android/fx_android_imp.cpp",
587     "core/src/fxge/android/fx_fpf.h",
588     "core/src/fxge/apple/apple_int.h",
589     "core/src/fxge/apple/fx_apple_platform.cpp",
590     "core/src/fxge/apple/fx_mac_imp.cpp",
591     "core/src/fxge/apple/fx_quartz_device.cpp",
592     "core/src/fxge/dib/dib_int.h",
593     "core/src/fxge/dib/fx_dib_composite.cpp",
594     "core/src/fxge/dib/fx_dib_convert.cpp",
595     "core/src/fxge/dib/fx_dib_engine.cpp",
596     "core/src/fxge/dib/fx_dib_main.cpp",
597     "core/src/fxge/dib/fx_dib_transform.cpp",
598     "core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c",
599     "core/src/fxge/fontdata/chromefontdata/FoxitFixed.c",
600     "core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c",
601     "core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c",
602     "core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c",
603     "core/src/fxge/fontdata/chromefontdata/FoxitSans.c",
604     "core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c",
605     "core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c",
606     "core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c",
607     "core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c",
608     "core/src/fxge/fontdata/chromefontdata/FoxitSerif.c",
609     "core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c",
610     "core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c",
611     "core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c",
612     "core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c",
613     "core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c",
614     "core/src/fxge/freetype/fx_freetype.c",
615     "core/src/fxge/ge/fx_ge.cpp",
616     "core/src/fxge/ge/fx_ge_device.cpp",
617     "core/src/fxge/ge/fx_ge_font.cpp",
618     "core/src/fxge/ge/fx_ge_fontmap.cpp",
619     "core/src/fxge/ge/fx_ge_linux.cpp",
620     "core/src/fxge/ge/fx_ge_path.cpp",
621     "core/src/fxge/ge/fx_ge_ps.cpp",
622     "core/src/fxge/ge/fx_ge_text.cpp",
623     "core/src/fxge/ge/text_int.h",
624   ]
625
626   configs -= [ "//build/config/compiler:chromium_code" ]
627   configs += [
628     ":pdfium_config",
629     "//build/config/compiler:no_chromium_code",
630   ]
631
632   if (pdf_use_skia) {
633     sources = [
634       "core/src/fxge/skia/fx_skia_blitter_new.cpp",
635       "core/src/fxge/skia/fx_skia_device.cpp",
636     ]
637     include_dirs = [
638       "//third_party/skia/include/config",
639       "//third_party/skia/include/core",
640       "//third_party/skia/include/effects",
641       "//third_party/skia/include/images",
642       "//third_party/skia/include/lazy",
643       "//third_party/skia/include/pathops",
644       "//third_party/skia/include/utils",
645       "//third_party/skia/src/core",
646     ]
647     deps = [
648       "//skia",
649     ]
650   }
651
652   if (is_win) {
653     sources += [
654       "core/src/fxge/win32/dwrite_int.h",
655       "core/src/fxge/win32/fx_win32_device.cpp",
656       "core/src/fxge/win32/fx_win32_dib.cpp",
657       "core/src/fxge/win32/fx_win32_dwrite.cpp",
658       "core/src/fxge/win32/fx_win32_gdipext.cpp",
659       "core/src/fxge/win32/fx_win32_print.cpp",
660       "core/src/fxge/win32/win32_int.h",
661     ]
662     configs -= [ "//build/config/win:lean_and_mean" ]
663   }
664 }
665
666 static_library("fxedit") {
667   sources = [
668     "fpdfsdk/include/fxedit/fx_edit.h",
669     "fpdfsdk/include/fxedit/fxet_edit.h",
670     "fpdfsdk/include/fxedit/fxet_list.h",
671     "fpdfsdk/include/fxedit/fxet_stub.h",
672     "fpdfsdk/src/fxedit/fxet_ap.cpp",
673     "fpdfsdk/src/fxedit/fxet_edit.cpp",
674     "fpdfsdk/src/fxedit/fxet_list.cpp",
675     "fpdfsdk/src/fxedit/fxet_module.cpp",
676     "fpdfsdk/src/fxedit/fxet_pageobjs.cpp",
677   ]
678   configs -= [ "//build/config/compiler:chromium_code" ]
679   configs += [
680     ":pdfium_config",
681     "//build/config/compiler:no_chromium_code",
682   ]
683 }
684
685 static_library("pdfwindow") {
686   sources = [
687     "fpdfsdk/include/pdfwindow/IPDFWindow.h",
688     "fpdfsdk/include/pdfwindow/PDFWindow.h",
689     "fpdfsdk/include/pdfwindow/PWL_Button.h",
690     "fpdfsdk/include/pdfwindow/PWL_Caret.h",
691     "fpdfsdk/include/pdfwindow/PWL_ComboBox.h",
692     "fpdfsdk/include/pdfwindow/PWL_Edit.h",
693     "fpdfsdk/include/pdfwindow/PWL_EditCtrl.h",
694     "fpdfsdk/include/pdfwindow/PWL_FontMap.h",
695     "fpdfsdk/include/pdfwindow/PWL_Icon.h",
696     "fpdfsdk/include/pdfwindow/PWL_IconList.h",
697     "fpdfsdk/include/pdfwindow/PWL_Label.h",
698     "fpdfsdk/include/pdfwindow/PWL_ListBox.h",
699     "fpdfsdk/include/pdfwindow/PWL_ListCtrl.h",
700     "fpdfsdk/include/pdfwindow/PWL_Note.h",
701     "fpdfsdk/include/pdfwindow/PWL_ScrollBar.h",
702     "fpdfsdk/include/pdfwindow/PWL_Signature.h",
703     "fpdfsdk/include/pdfwindow/PWL_SpecialButton.h",
704     "fpdfsdk/include/pdfwindow/PWL_Utils.h",
705     "fpdfsdk/include/pdfwindow/PWL_Wnd.h",
706     "fpdfsdk/src/pdfwindow/PWL_Button.cpp",
707     "fpdfsdk/src/pdfwindow/PWL_Caret.cpp",
708     "fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp",
709     "fpdfsdk/src/pdfwindow/PWL_Edit.cpp",
710     "fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp",
711     "fpdfsdk/src/pdfwindow/PWL_FontMap.cpp",
712     "fpdfsdk/src/pdfwindow/PWL_Icon.cpp",
713     "fpdfsdk/src/pdfwindow/PWL_IconList.cpp",
714     "fpdfsdk/src/pdfwindow/PWL_Label.cpp",
715     "fpdfsdk/src/pdfwindow/PWL_ListBox.cpp",
716     "fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp",
717     "fpdfsdk/src/pdfwindow/PWL_Note.cpp",
718     "fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp",
719     "fpdfsdk/src/pdfwindow/PWL_Signature.cpp",
720     "fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp",
721     "fpdfsdk/src/pdfwindow/PWL_Utils.cpp",
722     "fpdfsdk/src/pdfwindow/PWL_Wnd.cpp",
723   ]
724   configs -= [ "//build/config/compiler:chromium_code" ]
725   configs += [
726     ":pdfium_config",
727     "//build/config/compiler:no_chromium_code",
728   ]
729 }
730
731 static_library("javascript") {
732   sources = [
733     "fpdfsdk/include/javascript/Consts.h",
734     "fpdfsdk/include/javascript/Document.h",
735     "fpdfsdk/include/javascript/Field.h",
736     "fpdfsdk/include/javascript/IJavaScript.h",
737     "fpdfsdk/include/javascript/Icon.h",
738     "fpdfsdk/include/javascript/JS_Context.h",
739     "fpdfsdk/include/javascript/JS_Define.h",
740     "fpdfsdk/include/javascript/JS_EventHandler.h",
741     "fpdfsdk/include/javascript/JS_GlobalData.h",
742     "fpdfsdk/include/javascript/JS_Module.h",
743     "fpdfsdk/include/javascript/JS_Object.h",
744     "fpdfsdk/include/javascript/JS_Runtime.h",
745     "fpdfsdk/include/javascript/JS_Value.h",
746     "fpdfsdk/include/javascript/JavaScript.h",
747     "fpdfsdk/include/javascript/PublicMethods.h",
748     "fpdfsdk/include/javascript/app.h",
749     "fpdfsdk/include/javascript/color.h",
750     "fpdfsdk/include/javascript/console.h",
751     "fpdfsdk/include/javascript/event.h",
752     "fpdfsdk/include/javascript/global.h",
753     "fpdfsdk/include/javascript/report.h",
754     "fpdfsdk/include/javascript/resource.h",
755     "fpdfsdk/include/javascript/util.h",
756     "fpdfsdk/src/javascript/Consts.cpp",
757     "fpdfsdk/src/javascript/Document.cpp",
758     "fpdfsdk/src/javascript/Field.cpp",
759     "fpdfsdk/src/javascript/Icon.cpp",
760     "fpdfsdk/src/javascript/JS_Context.cpp",
761     "fpdfsdk/src/javascript/JS_EventHandler.cpp",
762     "fpdfsdk/src/javascript/JS_GlobalData.cpp",
763     "fpdfsdk/src/javascript/JS_Object.cpp",
764     "fpdfsdk/src/javascript/JS_Runtime.cpp",
765     "fpdfsdk/src/javascript/JS_Value.cpp",
766     "fpdfsdk/src/javascript/PublicMethods.cpp",
767     "fpdfsdk/src/javascript/app.cpp",
768     "fpdfsdk/src/javascript/color.cpp",
769     "fpdfsdk/src/javascript/console.cpp",
770     "fpdfsdk/src/javascript/event.cpp",
771     "fpdfsdk/src/javascript/global.cpp",
772     "fpdfsdk/src/javascript/report.cpp",
773     "fpdfsdk/src/javascript/resource.cpp",
774     "fpdfsdk/src/javascript/util.cpp",
775   ]
776
777   configs -= [ "//build/config/compiler:chromium_code" ]
778   configs += [
779     ":pdfium_config",
780     "//build/config/compiler:no_chromium_code",
781   ]
782   include_dirs = [
783     "//v8",
784     "//v8/include",
785   ]
786
787   public_deps = [
788     "//v8",
789   ]
790 }
791
792 static_library("jsapi") {
793   sources = [
794     "fpdfsdk/include/jsapi/fxjs_v8.h",
795     "fpdfsdk/src/jsapi/fxjs_v8.cpp",
796   ]
797
798   configs -= [ "//build/config/compiler:chromium_code" ]
799   configs += [
800     ":pdfium_config",
801     "//build/config/compiler:no_chromium_code",
802   ]
803   include_dirs = [
804     "//v8",
805     "//v8/include",
806   ]
807
808   public_deps = [
809     "//v8",
810   ]
811 }
812
813 static_library("formfiller") {
814   sources = [
815     "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h",
816     "fpdfsdk/include/formfiller/FFL_CheckBox.h",
817     "fpdfsdk/include/formfiller/FFL_ComboBox.h",
818     "fpdfsdk/include/formfiller/FFL_FormFiller.h",
819     "fpdfsdk/include/formfiller/FFL_IFormFiller.h",
820     "fpdfsdk/include/formfiller/FFL_ListBox.h",
821     "fpdfsdk/include/formfiller/FFL_Notify.h",
822     "fpdfsdk/include/formfiller/FFL_PushButton.h",
823     "fpdfsdk/include/formfiller/FFL_RadioButton.h",
824     "fpdfsdk/include/formfiller/FFL_TextField.h",
825     "fpdfsdk/include/formfiller/FFL_Utils.h",
826     "fpdfsdk/include/formfiller/FormFiller.h",
827     "fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp",
828     "fpdfsdk/src/formfiller/FFL_CheckBox.cpp",
829     "fpdfsdk/src/formfiller/FFL_ComboBox.cpp",
830     "fpdfsdk/src/formfiller/FFL_FormFiller.cpp",
831     "fpdfsdk/src/formfiller/FFL_IFormFiller.cpp",
832     "fpdfsdk/src/formfiller/FFL_ListBox.cpp",
833     "fpdfsdk/src/formfiller/FFL_Notify.cpp",
834     "fpdfsdk/src/formfiller/FFL_PushButton.cpp",
835     "fpdfsdk/src/formfiller/FFL_RadioButton.cpp",
836     "fpdfsdk/src/formfiller/FFL_TextField.cpp",
837     "fpdfsdk/src/formfiller/FFL_Utils.cpp",
838   ]
839   configs -= [ "//build/config/compiler:chromium_code" ]
840   configs += [
841     ":pdfium_config",
842     "//build/config/compiler:no_chromium_code",
843   ]
844 }
845
846 test("pdfium_unittests") {
847   sources = [
848     "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp",
849     "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp",
850     "core/src/fxcrt/fx_basic_bstring_unittest.cpp",
851     "core/src/fxcrt/fx_basic_wstring_unittest.cpp",
852     "testing/fx_string_testhelpers.cpp",
853     "testing/fx_string_testhelpers.h",
854   ]
855   deps = [
856     "//testing/gtest",
857     "//testing/gtest:gtest_main",
858     ":pdfium",
859   ]
860   include_dirs = [ "." ]
861   configs -= [ "//build/config/compiler:chromium_code" ]
862   configs += [
863     ":pdfium_config",
864     "//build/config/compiler:no_chromium_code",
865   ]
866 }
867
868 test("pdfium_embeddertests") {
869   sources = [
870     "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp",
871     "fpdfsdk/src/fpdfdoc_embeddertest.cpp",
872     "fpdfsdk/src/fpdfformfill_embeddertest.cpp",
873     "fpdfsdk/src/fpdftext_embeddertest.cpp",
874     "fpdfsdk/src/fpdfview_embeddertest.cpp",
875     "testing/embedder_test.cpp",
876     "testing/embedder_test.h",
877     "testing/embedder_test_mock_delegate.h",
878     "testing/fx_string_testhelpers.cpp",
879     "testing/fx_string_testhelpers.h",
880   ]
881   deps = [
882     "//testing/gmock",
883     "//testing/gtest",
884     ":pdfium",
885   ]
886   include_dirs = [ "." ]
887   configs -= [ "//build/config/compiler:chromium_code" ]
888   configs += [
889     ":pdfium_config",
890     "//build/config/compiler:no_chromium_code",
891   ]
892 }