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