Allow compiling PDFium without V8.
[pdfium.git] / pdfium.gyp
1 {
2   'variables': {
3     'pdf_use_skia%': 0,
4     'pdf_enable_v8%': 1,
5     'conditions': [
6       ['OS=="linux"', {
7         'bundle_freetype%': 0,
8       }, {  # On Android there's no system FreeType. On Windows and Mac, only a
9             # few methods are used from it.
10         'bundle_freetype%': 1,
11       }],
12     ],
13   },
14   'target_defaults': {
15     'defines' : [
16       'OPJ_STATIC',
17       'V8_DEPRECATION_WARNINGS',
18       '_CRT_SECURE_NO_WARNINGS',
19     ],
20     'include_dirs': [
21       'third_party/freetype/include',
22     ],
23     'conditions': [
24       ['pdf_use_skia==1', {
25         'defines': ['_SKIA_SUPPORT_'],
26       }],
27       ['pdf_enable_v8==1', {
28         'defines': ['PDF_ENABLE_V8'],
29       }],
30       ['OS=="linux"', {
31         'conditions': [
32           ['target_arch=="x64"', {
33             'defines' : [ '_FX_CPU_=_FX_X64_', ],
34             'cflags': [ '-fPIC', ],
35           }],
36           ['target_arch=="ia32"', {
37             'defines' : [ '_FX_CPU_=_FX_X86_', ],
38           }],
39         ],
40       }],
41     ],
42     'msvs_disabled_warnings': [
43       4005, 4018, 4146, 4333, 4345, 4267
44     ],
45   },
46   'targets': [
47     {
48       'target_name': 'pdfium',
49       'type': 'static_library',
50       'dependencies': [
51         'third_party/third_party.gyp:bigint',
52         'third_party/third_party.gyp:pdfium_base',
53         'fdrm',
54         'fpdfdoc',
55         'fpdfapi',
56         'fpdftext',
57         'formfiller',
58         'fxcodec',
59         'fxcrt',
60         'fxedit',
61         'fxge',
62         'javascript',
63         'pdfwindow',
64       ],
65       'ldflags': [ '-L<(PRODUCT_DIR)',],
66       'sources': [
67         'fpdfsdk/include/fsdk_actionhandler.h',
68         'fpdfsdk/include/fsdk_annothandler.h',
69         'fpdfsdk/include/fsdk_baseannot.h',
70         'fpdfsdk/include/fsdk_baseform.h',
71         'fpdfsdk/src/fpdfdoc.cpp',
72         'fpdfsdk/src/fpdfeditimg.cpp',
73         'fpdfsdk/src/fpdfeditpage.cpp',
74         'fpdfsdk/src/fpdfformfill.cpp',
75         'fpdfsdk/src/fpdfppo.cpp',
76         'fpdfsdk/src/fpdfsave.cpp',
77         'fpdfsdk/src/fpdftext.cpp',
78         'fpdfsdk/src/fpdfview.cpp',
79         'fpdfsdk/src/fpdf_dataavail.cpp',
80         'fpdfsdk/src/fpdf_ext.cpp',
81         'fpdfsdk/src/fpdf_flatten.cpp',
82         'fpdfsdk/src/fpdf_progressive.cpp',
83         'fpdfsdk/src/fpdf_searchex.cpp',
84         'fpdfsdk/src/fpdf_sysfontinfo.cpp',
85         'fpdfsdk/src/fpdf_transformpage.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         'public/fpdf_dataavail.h',
95         'public/fpdf_doc.h',
96         'public/fpdf_edit.h',
97         'public/fpdf_ext.h',
98         'public/fpdf_flatten.h',
99         'public/fpdf_formfill.h',
100         'public/fpdf_fwlevent.h',
101         'public/fpdf_ppo.h',
102         'public/fpdf_progressive.h',
103         'public/fpdf_save.h',
104         'public/fpdf_searchex.h',
105         'public/fpdf_sysfontinfo.h',
106         'public/fpdf_text.h',
107         'public/fpdf_transformpage.h',
108         'public/fpdfview.h',
109       ],
110       'conditions': [
111         ['OS!="win"', {
112           'sources!': [
113             'fpdfsdk/src/fpdfsdkdll.rc',
114           ],
115         }],
116         ['bundle_freetype==1', {
117           'dependencies': [
118             'third_party/third_party.gyp:fx_freetype',
119           ],
120         }, {
121           'link_settings': {
122             'libraries': [
123               '-lfreetype',
124             ],
125           },
126         }],
127       ],
128       'all_dependent_settings': {
129         'msvs_settings': {
130           'VCLinkerTool': {
131             'AdditionalDependencies': [
132               'advapi32.lib',
133               'gdi32.lib',
134               'user32.lib',
135             ],
136           },
137         },
138         'conditions': [
139           ['OS=="mac"', {
140             'link_settings': {
141               'libraries': [
142                 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
143                 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
144               ],
145             },
146           }],
147         ],
148       },
149     },
150     {
151       'target_name': 'fdrm',
152       'type': 'static_library',
153       'ldflags': [ '-L<(PRODUCT_DIR)',],
154       'sources': [
155         'core/include/fdrm/fx_crypt.h',
156         'core/src/fdrm/crypto/fx_crypt.cpp',
157         'core/src/fdrm/crypto/fx_crypt_aes.cpp',
158         'core/src/fdrm/crypto/fx_crypt_sha.cpp',
159       ],
160     },
161     {
162       'target_name': 'fpdfdoc',
163       'type': 'static_library',
164       'ldflags': [ '-L<(PRODUCT_DIR)',],
165       'sources': [
166         'core/include/fpdfdoc/fpdf_ap.h',
167         'core/include/fpdfdoc/fpdf_doc.h',
168         'core/include/fpdfdoc/fpdf_tagged.h',
169         'core/include/fpdfdoc/fpdf_vt.h',
170         'core/src/fpdfdoc/doc_action.cpp',
171         'core/src/fpdfdoc/doc_annot.cpp',
172         'core/src/fpdfdoc/doc_ap.cpp',
173         'core/src/fpdfdoc/doc_basic.cpp',
174         'core/src/fpdfdoc/doc_bookmark.cpp',
175         'core/src/fpdfdoc/doc_form.cpp',
176         'core/src/fpdfdoc/doc_formcontrol.cpp',
177         'core/src/fpdfdoc/doc_formfield.cpp',
178         'core/src/fpdfdoc/doc_link.cpp',
179         'core/src/fpdfdoc/doc_metadata.cpp',
180         'core/src/fpdfdoc/doc_ocg.cpp',
181         'core/src/fpdfdoc/doc_tagged.cpp',
182         'core/src/fpdfdoc/doc_utils.cpp',
183         'core/src/fpdfdoc/doc_utils.h',
184         'core/src/fpdfdoc/doc_viewerPreferences.cpp',
185         'core/src/fpdfdoc/doc_vt.cpp',
186         'core/src/fpdfdoc/doc_vtmodule.cpp',
187         'core/src/fpdfdoc/pdf_vt.h',
188         'core/src/fpdfdoc/tagged_int.h',
189       ],
190     },
191     {
192       'target_name': 'fpdfapi',
193       'type': 'static_library',
194       'ldflags': [ '-L<(PRODUCT_DIR)',],
195       'sources': [
196         'core/include/fpdfapi/fpdfapi.h',
197         'core/include/fpdfapi/fpdf_module.h',
198         'core/include/fpdfapi/fpdf_objects.h',
199         'core/include/fpdfapi/fpdf_page.h',
200         'core/include/fpdfapi/fpdf_pageobj.h',
201         'core/include/fpdfapi/fpdf_parser.h',
202         'core/include/fpdfapi/fpdf_render.h',
203         'core/include/fpdfapi/fpdf_resource.h',
204         'core/include/fpdfapi/fpdf_serial.h',
205         'core/src/fpdfapi/fpdf_basic_module.cpp',
206         'core/src/fpdfapi/fpdf_cmaps/cmap_int.h',
207         'core/src/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp',
208         'core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp',
209         'core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp',
210         'core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp',
211         'core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp',
212         'core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp',
213         'core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp',
214         'core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp',
215         'core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp',
216         'core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp',
217         'core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp',
218         'core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp',
219         'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp',
220         'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp',
221         'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp',
222         'core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp',
223         'core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp',
224         'core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp',
225         'core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp',
226         'core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp',
227         'core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp',
228         'core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp',
229         'core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp',
230         'core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp',
231         'core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp',
232         'core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp',
233         'core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp',
234         'core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp',
235         'core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp',
236         'core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp',
237         'core/src/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp',
238         'core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp',
239         'core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp',
240         'core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp',
241         'core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp',
242         'core/src/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp',
243         'core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp',
244         'core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp',
245         'core/src/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp',
246         'core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp',
247         'core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp',
248         'core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp',
249         'core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp',
250         'core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp',
251         'core/src/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp',
252         'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp',
253         'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp',
254         'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp',
255         'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp',
256         'core/src/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp',
257         'core/src/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp',
258         'core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp',
259         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp',
260         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp',
261         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp',
262         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp',
263         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp',
264         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp',
265         'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp',
266         'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp',
267         'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp',
268         'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp',
269         'core/src/fpdfapi/fpdf_edit/editint.h',
270         'core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp',
271         'core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp',
272         'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp',
273         'core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp',
274         'core/src/fpdfapi/fpdf_font/common.h',
275         'core/src/fpdfapi/fpdf_font/font_int.h',
276         'core/src/fpdfapi/fpdf_font/fpdf_font.cpp',
277         'core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp',
278         'core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp',
279         'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp',
280         'core/src/fpdfapi/fpdf_font/ttgsubtable.h',
281         'core/src/fpdfapi/fpdf_page/fpdf_page.cpp',
282         'core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp',
283         'core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp',
284         'core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp',
285         'core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp',
286         'core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp',
287         'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp',
288         'core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp',
289         'core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp',
290         'core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp',
291         'core/src/fpdfapi/fpdf_page/pageint.h',
292         'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp',
293         'core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp',
294         'core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp',
295         'core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp',
296         'core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp',
297         'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp',
298         'core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp',
299         'core/src/fpdfapi/fpdf_render/fpdf_render.cpp',
300         'core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp',
301         'core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp',
302         'core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp',
303         'core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp',
304         'core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp',
305         'core/src/fpdfapi/fpdf_render/render_int.h',
306       ],
307     },
308     {
309       'target_name': 'fpdftext',
310       'type': 'static_library',
311       'ldflags': [ '-L<(PRODUCT_DIR)',],
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         'core/src/fpdftext/unicodenormalizationdata.h',
322       ],
323     },
324     {
325       'target_name': 'fxcodec',
326       'type': 'static_library',
327       'dependencies': [
328         'third_party/third_party.gyp:fx_lcms2',
329         'third_party/third_party.gyp:fx_libjpeg',
330         'third_party/third_party.gyp:fx_libopenjpeg',
331         'third_party/third_party.gyp:fx_zlib',
332       ],
333       'ldflags': [ '-L<(PRODUCT_DIR)',],
334       'sources': [
335         'core/include/fxcodec/fx_codec.h',
336         'core/include/fxcodec/fx_codec_def.h',
337         'core/include/fxcodec/fx_codec_flate.h',
338         'core/include/fxcodec/fx_codec_provider.h',
339         'core/src/fxcodec/codec/codec_int.h',
340         'core/src/fxcodec/codec/fx_codec.cpp',
341         'core/src/fxcodec/codec/fx_codec_fax.cpp',
342         'core/src/fxcodec/codec/fx_codec_flate.cpp',
343         'core/src/fxcodec/codec/fx_codec_icc.cpp',
344         'core/src/fxcodec/codec/fx_codec_jbig.cpp',
345         'core/src/fxcodec/codec/fx_codec_jbig_enc.cpp',
346         'core/src/fxcodec/codec/fx_codec_jpeg.cpp',
347         'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp',
348         'core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp',
349         'core/src/fxcodec/jbig2/JBig2_ArithDecoder.h',
350         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp',
351         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h',
352         'core/src/fxcodec/jbig2/JBig2_BitStream.cpp',
353         'core/src/fxcodec/jbig2/JBig2_BitStream.h',
354         'core/src/fxcodec/jbig2/JBig2_Context.cpp',
355         'core/src/fxcodec/jbig2/JBig2_Context.h',
356         'core/src/fxcodec/jbig2/JBig2_Define.h',
357         'core/src/fxcodec/jbig2/JBig2_GrdProc.cpp',
358         'core/src/fxcodec/jbig2/JBig2_GrdProc.h',
359         'core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp',
360         'core/src/fxcodec/jbig2/JBig2_GrrdProc.h',
361         'core/src/fxcodec/jbig2/JBig2_GsidProc.cpp',
362         'core/src/fxcodec/jbig2/JBig2_GsidProc.h',
363         'core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp',
364         'core/src/fxcodec/jbig2/JBig2_HtrdProc.h',
365         'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp',
366         'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h',
367         'core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp',
368         'core/src/fxcodec/jbig2/JBig2_HuffmanTable.h',
369         'core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h',
370         'core/src/fxcodec/jbig2/JBig2_Image.cpp',
371         'core/src/fxcodec/jbig2/JBig2_Image.h',
372         'core/src/fxcodec/jbig2/JBig2_List.h',
373         'core/src/fxcodec/jbig2/JBig2_Page.h',
374         'core/src/fxcodec/jbig2/JBig2_PatternDict.cpp',
375         'core/src/fxcodec/jbig2/JBig2_PatternDict.h',
376         'core/src/fxcodec/jbig2/JBig2_PddProc.cpp',
377         'core/src/fxcodec/jbig2/JBig2_PddProc.h',
378         'core/src/fxcodec/jbig2/JBig2_SddProc.cpp',
379         'core/src/fxcodec/jbig2/JBig2_SddProc.h',
380         'core/src/fxcodec/jbig2/JBig2_Segment.cpp',
381         'core/src/fxcodec/jbig2/JBig2_Segment.h',
382         'core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp',
383         'core/src/fxcodec/jbig2/JBig2_SymbolDict.h',
384         'core/src/fxcodec/jbig2/JBig2_TrdProc.cpp',
385         'core/src/fxcodec/jbig2/JBig2_TrdProc.h',
386       ],
387       'msvs_settings': {
388         'VCCLCompilerTool': {
389           # Unresolved warnings in fx_codec_jpx_opj.cpp
390           # https://code.google.com/p/pdfium/issues/detail?id=100
391           'WarnAsError': 'false',
392         },
393       },
394       'conditions': [
395         ['os_posix==1', {
396           # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int
397           # conversion to check that an address is 16-bit aligned (benign).
398           'cflags_c': [ '-Wno-pointer-to-int-cast' ],
399         }],
400       ],
401     },
402     {
403       'target_name': 'fxcrt',
404       'type': 'static_library',
405       'ldflags': [ '-L<(PRODUCT_DIR)',],
406       'sources': [
407         'core/include/fxcrt/fx_basic.h',
408         'core/include/fxcrt/fx_bidi.h',
409         'core/include/fxcrt/fx_coordinates.h',
410         'core/include/fxcrt/fx_ext.h',
411         'core/include/fxcrt/fx_memory.h',
412         'core/include/fxcrt/fx_safe_types.h',
413         'core/include/fxcrt/fx_stream.h',
414         'core/include/fxcrt/fx_string.h',
415         'core/include/fxcrt/fx_system.h',
416         'core/include/fxcrt/fx_ucd.h',
417         'core/include/fxcrt/fx_xml.h',
418         'core/src/fxcrt/extension.h',
419         'core/src/fxcrt/fxcrt_platforms.cpp',
420         'core/src/fxcrt/fxcrt_platforms.h',
421         'core/src/fxcrt/fxcrt_posix.cpp',
422         'core/src/fxcrt/fxcrt_posix.h',
423         'core/src/fxcrt/fxcrt_windows.cpp',
424         'core/src/fxcrt/fxcrt_windows.h',
425         'core/src/fxcrt/fx_basic_array.cpp',
426         'core/src/fxcrt/fx_basic_bstring.cpp',
427         'core/src/fxcrt/fx_basic_buffer.cpp',
428         'core/src/fxcrt/fx_basic_coords.cpp',
429         'core/src/fxcrt/fx_basic_gcc.cpp',
430         'core/src/fxcrt/fx_basic_list.cpp',
431         'core/src/fxcrt/fx_basic_maps.cpp',
432         'core/src/fxcrt/fx_basic_memmgr.cpp',
433         'core/src/fxcrt/fx_basic_plex.cpp',
434         'core/src/fxcrt/fx_basic_utf.cpp',
435         'core/src/fxcrt/fx_basic_util.cpp',
436         'core/src/fxcrt/fx_basic_wstring.cpp',
437         'core/src/fxcrt/fx_bidi.cpp',
438         'core/src/fxcrt/fx_extension.cpp',
439         'core/src/fxcrt/fx_ucddata.cpp',
440         'core/src/fxcrt/fx_unicode.cpp',
441         'core/src/fxcrt/fx_xml_composer.cpp',
442         'core/src/fxcrt/fx_xml_parser.cpp',
443         'core/src/fxcrt/plex.h',
444         'core/src/fxcrt/xml_int.h',
445       ],
446     },
447     {
448       'target_name': 'fxge',
449       'type': 'static_library',
450       'ldflags': [
451         '-L<(PRODUCT_DIR)',
452       ],
453       'dependencies': [
454         'third_party/third_party.gyp:fx_agg',
455       ],
456       'sources': [
457         'core/include/fxge/fpf.h',
458         'core/include/fxge/fx_dib.h',
459         'core/include/fxge/fx_font.h',
460         'core/include/fxge/fx_freetype.h',
461         'core/include/fxge/fx_ge.h',
462         'core/include/fxge/fx_ge_apple.h',
463         'core/include/fxge/fx_ge_win32.h',
464         'core/src/fxge/agg/include/fx_agg_driver.h',
465         'core/src/fxge/agg/src/fx_agg_driver.cpp',
466         'core/src/fxge/android/fpf_skiafont.cpp',
467         'core/src/fxge/android/fpf_skiafont.h',
468         'core/src/fxge/android/fpf_skiafontmgr.cpp',
469         'core/src/fxge/android/fpf_skiafontmgr.h',
470         'core/src/fxge/android/fpf_skiamodule.cpp',
471         'core/src/fxge/android/fpf_skiamodule.h',
472         'core/src/fxge/android/fx_android_font.cpp',
473         'core/src/fxge/android/fx_android_font.h',
474         'core/src/fxge/android/fx_android_imp.cpp',
475         'core/src/fxge/android/fx_fpf.h',
476         'core/src/fxge/apple/apple_int.h',
477         'core/src/fxge/apple/fx_apple_platform.cpp',
478         'core/src/fxge/apple/fx_mac_imp.cpp',
479         'core/src/fxge/apple/fx_quartz_device.cpp',
480         'core/src/fxge/dib/dib_int.h',
481         'core/src/fxge/dib/fx_dib_composite.cpp',
482         'core/src/fxge/dib/fx_dib_convert.cpp',
483         'core/src/fxge/dib/fx_dib_engine.cpp',
484         'core/src/fxge/dib/fx_dib_main.cpp',
485         'core/src/fxge/dib/fx_dib_transform.cpp',
486         'core/src/fxge/fontdata/chromefontdata/chromefontdata.h',
487         'core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c',
488         'core/src/fxge/fontdata/chromefontdata/FoxitFixed.c',
489         'core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c',
490         'core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c',
491         'core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c',
492         'core/src/fxge/fontdata/chromefontdata/FoxitSans.c',
493         'core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c',
494         'core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c',
495         'core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c',
496         'core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c',
497         'core/src/fxge/fontdata/chromefontdata/FoxitSerif.c',
498         'core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c',
499         'core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c',
500         'core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c',
501         'core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c',
502         'core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c',
503         'core/src/fxge/freetype/fx_freetype.c',
504         'core/src/fxge/ge/fx_ge.cpp',
505         'core/src/fxge/ge/fx_ge_device.cpp',
506         'core/src/fxge/ge/fx_ge_font.cpp',
507         'core/src/fxge/ge/fx_ge_fontmap.cpp',
508         'core/src/fxge/ge/fx_ge_linux.cpp',
509         'core/src/fxge/ge/fx_ge_path.cpp',
510         'core/src/fxge/ge/fx_ge_ps.cpp',
511         'core/src/fxge/ge/fx_ge_text.cpp',
512         'core/src/fxge/ge/text_int.h',
513       ],
514       'variables': {
515         'clang_warning_flags': [
516           # http://code.google.com/p/pdfium/issues/detail?id=188
517           '-Wno-switch',
518         ],
519       },
520       'conditions': [
521         ['pdf_use_skia==1', {
522           'sources': [
523             'core/src/fxge/skia/fx_skia_blitter_new.cpp',
524             'core/src/fxge/skia/fx_skia_device.cpp',
525           ],
526           'dependencies': [
527             '<(DEPTH)/skia/skia.gyp:skia',
528           ],
529           'include_dirs': [
530             '<(DEPTH)/third_party/skia/include/config',
531             '<(DEPTH)/third_party/skia/include/core',
532             '<(DEPTH)/third_party/skia/include/effects',
533             '<(DEPTH)/third_party/skia/include/images',
534             '<(DEPTH)/third_party/skia/include/lazy',
535             '<(DEPTH)/third_party/skia/include/pathops',
536             '<(DEPTH)/third_party/skia/include/utils',
537             '<(DEPTH)/third_party/skia/src/core',
538           ],
539         }],
540         ['OS=="win"', {
541           'defines!': [
542             'WIN32_LEAN_AND_MEAN'
543           ],
544           'sources': [
545             'core/src/fxge/win32/dwrite_int.h',
546             'core/src/fxge/win32/fx_win32_device.cpp',
547             'core/src/fxge/win32/fx_win32_dib.cpp',
548             'core/src/fxge/win32/fx_win32_dwrite.cpp',
549             'core/src/fxge/win32/fx_win32_gdipext.cpp',
550             'core/src/fxge/win32/fx_win32_print.cpp',
551             'core/src/fxge/win32/win32_int.h',
552           ],
553         }],
554       ],
555     },
556     {
557       'target_name': 'fxedit',
558       'type': 'static_library',
559       'ldflags': [ '-L<(PRODUCT_DIR)',],
560       'sources': [
561         'fpdfsdk/include/fxedit/fx_edit.h',
562         'fpdfsdk/include/fxedit/fxet_edit.h',
563         'fpdfsdk/include/fxedit/fxet_list.h',
564         'fpdfsdk/include/fxedit/fxet_stub.h',
565         'fpdfsdk/src/fxedit/fxet_ap.cpp',
566         'fpdfsdk/src/fxedit/fxet_edit.cpp',
567         'fpdfsdk/src/fxedit/fxet_list.cpp',
568         'fpdfsdk/src/fxedit/fxet_module.cpp',
569         'fpdfsdk/src/fxedit/fxet_pageobjs.cpp',
570       ],
571     },
572     {
573       'target_name': 'pdfwindow',
574       'type': 'static_library',
575       'ldflags': [ '-L<(PRODUCT_DIR)',],
576       'sources': [
577         'fpdfsdk/include/pdfwindow/IPDFWindow.h',
578         'fpdfsdk/include/pdfwindow/PDFWindow.h',
579         'fpdfsdk/include/pdfwindow/PWL_Button.h',
580         'fpdfsdk/include/pdfwindow/PWL_Caret.h',
581         'fpdfsdk/include/pdfwindow/PWL_ComboBox.h',
582         'fpdfsdk/include/pdfwindow/PWL_Edit.h',
583         'fpdfsdk/include/pdfwindow/PWL_EditCtrl.h',
584         'fpdfsdk/include/pdfwindow/PWL_FontMap.h',
585         'fpdfsdk/include/pdfwindow/PWL_Icon.h',
586         'fpdfsdk/include/pdfwindow/PWL_IconList.h',
587         'fpdfsdk/include/pdfwindow/PWL_Label.h',
588         'fpdfsdk/include/pdfwindow/PWL_ListBox.h',
589         'fpdfsdk/include/pdfwindow/PWL_ListCtrl.h',
590         'fpdfsdk/include/pdfwindow/PWL_Note.h',
591         'fpdfsdk/include/pdfwindow/PWL_ScrollBar.h',
592         'fpdfsdk/include/pdfwindow/PWL_Signature.h',
593         'fpdfsdk/include/pdfwindow/PWL_SpecialButton.h',
594         'fpdfsdk/include/pdfwindow/PWL_Utils.h',
595         'fpdfsdk/include/pdfwindow/PWL_Wnd.h',
596         'fpdfsdk/src/pdfwindow/PWL_Button.cpp',
597         'fpdfsdk/src/pdfwindow/PWL_Caret.cpp',
598         'fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp',
599         'fpdfsdk/src/pdfwindow/PWL_Edit.cpp',
600         'fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp',
601         'fpdfsdk/src/pdfwindow/PWL_FontMap.cpp',
602         'fpdfsdk/src/pdfwindow/PWL_Icon.cpp',
603         'fpdfsdk/src/pdfwindow/PWL_IconList.cpp',
604         'fpdfsdk/src/pdfwindow/PWL_Label.cpp',
605         'fpdfsdk/src/pdfwindow/PWL_ListBox.cpp',
606         'fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp',
607         'fpdfsdk/src/pdfwindow/PWL_Note.cpp',
608         'fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp',
609         'fpdfsdk/src/pdfwindow/PWL_Signature.cpp',
610         'fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp',
611         'fpdfsdk/src/pdfwindow/PWL_Utils.cpp',
612         'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp',
613       ],
614     },
615     {
616       'target_name': 'javascript',
617       'type': 'static_library',
618       'ldflags': [ '-L<(PRODUCT_DIR)',],
619       'sources': [
620         'fpdfsdk/include/javascript/IJavaScript.h',
621         'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
622       ],
623       'conditions': [
624         ['pdf_enable_v8==1', {
625           'include_dirs': [
626             '<(DEPTH)/v8',
627             '<(DEPTH)/v8/include',
628           ],
629           'dependencies': [
630             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
631           ],
632           'export_dependent_settings': [
633             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
634           ],
635           'sources!': [
636             'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
637           ],
638           'sources': [
639             'fpdfsdk/src/javascript/Consts.cpp',
640             'fpdfsdk/src/javascript/Consts.h',
641             'fpdfsdk/src/javascript/Document.cpp',
642             'fpdfsdk/src/javascript/Document.h',
643             'fpdfsdk/src/javascript/Field.cpp',
644             'fpdfsdk/src/javascript/Field.h',
645             'fpdfsdk/src/javascript/Icon.cpp',
646             'fpdfsdk/src/javascript/Icon.h',
647             'fpdfsdk/src/javascript/JS_Context.cpp',
648             'fpdfsdk/src/javascript/JS_Context.h',
649             'fpdfsdk/src/javascript/JS_Define.h',
650             'fpdfsdk/src/javascript/JS_EventHandler.cpp',
651             'fpdfsdk/src/javascript/JS_EventHandler.h',
652             'fpdfsdk/src/javascript/JS_GlobalData.cpp',
653             'fpdfsdk/src/javascript/JS_GlobalData.h',
654             'fpdfsdk/src/javascript/JS_Object.cpp',
655             'fpdfsdk/src/javascript/JS_Object.h',
656             'fpdfsdk/src/javascript/JS_Runtime.cpp',
657             'fpdfsdk/src/javascript/JS_Runtime.h',
658             'fpdfsdk/src/javascript/JS_Value.cpp',
659             'fpdfsdk/src/javascript/JS_Value.h',
660             'fpdfsdk/src/javascript/PublicMethods.cpp',
661             'fpdfsdk/src/javascript/PublicMethods.h',
662             'fpdfsdk/src/javascript/app.cpp',
663             'fpdfsdk/src/javascript/app.cpp',
664             'fpdfsdk/src/javascript/app.h',
665             'fpdfsdk/src/javascript/color.cpp',
666             'fpdfsdk/src/javascript/color.cpp',
667             'fpdfsdk/src/javascript/color.h',
668             'fpdfsdk/src/javascript/console.cpp',
669             'fpdfsdk/src/javascript/console.cpp',
670             'fpdfsdk/src/javascript/console.h',
671             'fpdfsdk/src/javascript/event.cpp',
672             'fpdfsdk/src/javascript/event.h',
673             'fpdfsdk/src/javascript/global.cpp',
674             'fpdfsdk/src/javascript/global.h',
675             'fpdfsdk/src/javascript/report.cpp',
676             'fpdfsdk/src/javascript/report.h',
677             'fpdfsdk/src/javascript/resource.cpp',
678             'fpdfsdk/src/javascript/resource.h',
679             'fpdfsdk/src/javascript/util.cpp',
680             'fpdfsdk/src/javascript/util.h',
681             'fpdfsdk/include/jsapi/fxjs_v8.h',
682             'fpdfsdk/src/jsapi/fxjs_v8.cpp',
683           ],
684         }],
685       ],
686     },
687     {
688       'target_name': 'formfiller',
689       'type': 'static_library',
690       'ldflags': [ '-L<(PRODUCT_DIR)',],
691       'sources': [
692         'fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h',
693         'fpdfsdk/include/formfiller/FFL_CheckBox.h',
694         'fpdfsdk/include/formfiller/FFL_ComboBox.h',
695         'fpdfsdk/include/formfiller/FFL_FormFiller.h',
696         'fpdfsdk/include/formfiller/FFL_IFormFiller.h',
697         'fpdfsdk/include/formfiller/FFL_ListBox.h',
698         'fpdfsdk/include/formfiller/FFL_Notify.h',
699         'fpdfsdk/include/formfiller/FFL_PushButton.h',
700         'fpdfsdk/include/formfiller/FFL_RadioButton.h',
701         'fpdfsdk/include/formfiller/FFL_TextField.h',
702         'fpdfsdk/include/formfiller/FFL_Utils.h',
703         'fpdfsdk/include/formfiller/FormFiller.h',
704         'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp',
705         'fpdfsdk/src/formfiller/FFL_CheckBox.cpp',
706         'fpdfsdk/src/formfiller/FFL_ComboBox.cpp',
707         'fpdfsdk/src/formfiller/FFL_FormFiller.cpp',
708         'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp',
709         'fpdfsdk/src/formfiller/FFL_ListBox.cpp',
710         'fpdfsdk/src/formfiller/FFL_Notify.cpp',
711         'fpdfsdk/src/formfiller/FFL_PushButton.cpp',
712         'fpdfsdk/src/formfiller/FFL_RadioButton.cpp',
713         'fpdfsdk/src/formfiller/FFL_TextField.cpp',
714         'fpdfsdk/src/formfiller/FFL_Utils.cpp',
715       ],
716     },
717     {
718       'target_name': 'pdfium_unittests',
719       'type': 'executable',
720       'dependencies': [
721         '<(DEPTH)/testing/gtest.gyp:gtest_main',
722         '<(DEPTH)/testing/gtest.gyp:gtest',
723         'pdfium',
724       ],
725       'include_dirs': [
726         '<(DEPTH)'
727       ],
728       'sources': [
729         'core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp',
730         'core/src/fxcrt/fx_basic_bstring_unittest.cpp',
731         'core/src/fxcrt/fx_basic_memmgr_unittest.cpp',
732         'core/src/fxcrt/fx_basic_wstring_unittest.cpp',
733         'core/src/fxcrt/fx_bidi_unittest.cpp',
734         'core/src/fxcrt/fx_system_unittest.cpp',
735         'testing/fx_string_testhelpers.h',
736         'testing/fx_string_testhelpers.cpp',
737         'third_party/base/nonstd_unique_ptr_unittest.cpp',
738       ],
739     },
740     {
741       'target_name': 'pdfium_embeddertests',
742       'type': 'executable',
743       'dependencies': [
744         '<(DEPTH)/testing/gmock.gyp:gmock',
745         '<(DEPTH)/testing/gtest.gyp:gtest',
746         'pdfium',
747       ],
748       'include_dirs': [
749         '<(DEPTH)',
750       ],
751       'sources': [
752         'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp',
753         'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp',
754         'fpdfsdk/src/fpdf_dataavail_embeddertest.cpp',
755         'fpdfsdk/src/fpdfdoc_embeddertest.cpp',
756         'fpdfsdk/src/fpdfformfill_embeddertest.cpp',
757         'fpdfsdk/src/fpdftext_embeddertest.cpp',
758         'fpdfsdk/src/fpdfview_c_api_test.c',
759         'fpdfsdk/src/fpdfview_c_api_test.h',
760         'fpdfsdk/src/fpdfview_embeddertest.cpp',
761         'testing/embedder_test.cpp',
762         'testing/embedder_test.h',
763         'testing/embedder_test_mock_delegate.h',
764         'testing/embedder_test_timer_handling_delegate.h',
765         'testing/fx_string_testhelpers.cpp',
766         'testing/fx_string_testhelpers.h',
767       ],
768       'conditions': [
769         ['pdf_enable_v8==1', {
770           'include_dirs': [
771             '<(DEPTH)/v8',
772             '<(DEPTH)/v8/include',
773           ],
774           'dependencies': [
775             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
776             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
777           ],
778           'sources': [
779             'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp',
780           ],
781         }],
782       ],
783     },
784   ],
785 }