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