chromium_code tweaks for Windows and Linux/gyp.
[pdfium.git] / pdfium.gyp
1 {
2   'variables': {
3     'chromium_code': 1,
4     'pdf_use_skia%': 0,
5     'pdf_enable_v8%': 1,
6     'conditions': [
7       ['OS=="linux"', {
8         'bundle_freetype%': 0,
9       }, {  # On Android there's no system FreeType. On Windows and Mac, only a
10             # few methods are used from it.
11         'bundle_freetype%': 1,
12       }],
13     ],
14   },
15   'target_defaults': {
16     'defines' : [
17       'OPJ_STATIC',
18       'V8_DEPRECATION_WARNINGS',
19       '_CRT_SECURE_NO_WARNINGS',
20     ],
21     'include_dirs': [
22       'third_party/freetype/include',
23     ],
24     'conditions': [
25       ['pdf_use_skia==1', {
26         'defines': ['_SKIA_SUPPORT_'],
27       }],
28       ['pdf_enable_v8==1', {
29         'defines': ['PDF_ENABLE_V8'],
30       }],
31       ['OS=="linux"', {
32         'conditions': [
33           ['target_arch=="x64"', {
34             'defines' : [ '_FX_CPU_=_FX_X64_', ],
35             'cflags': [ '-fPIC', ],
36           }],
37           ['target_arch=="ia32"', {
38             'defines' : [ '_FX_CPU_=_FX_X86_', ],
39           }],
40         ],
41       }],
42     ],
43     'msvs_disabled_warnings': [
44       4005, 4018, 4146, 4333, 4345, 4267,
45       # TODO(thestig): Fix all instances, remove this, pdfium:29
46       4245, 4389, 4701, 4706, 4800,
47     ],
48     'variables': {
49       'clang_warning_flags': [
50         # TODO(thestig): Fix all instances, remove this, pdfium:29
51         '-Wno-sign-compare',
52       ],
53       # Make sure Chromium's build/common.gypi doesn't re-add the flag on linux.
54       'cflags_cc!': [ '-Wsign-compare' ],
55     },
56   },
57   'targets': [
58     {
59       'target_name': 'pdfium',
60       'type': 'static_library',
61       'dependencies': [
62         'third_party/third_party.gyp:bigint',
63         'third_party/third_party.gyp:pdfium_base',
64         'fdrm',
65         'fpdfdoc',
66         'fpdfapi',
67         'fpdftext',
68         'formfiller',
69         'fxcodec',
70         'fxcrt',
71         'fxedit',
72         'fxge',
73         'javascript',
74         'pdfwindow',
75       ],
76       'sources': [
77         'fpdfsdk/include/fsdk_actionhandler.h',
78         'fpdfsdk/include/fsdk_annothandler.h',
79         'fpdfsdk/include/fsdk_baseannot.h',
80         'fpdfsdk/include/fsdk_baseform.h',
81         'fpdfsdk/src/fpdfdoc.cpp',
82         'fpdfsdk/src/fpdfeditimg.cpp',
83         'fpdfsdk/src/fpdfeditpage.cpp',
84         'fpdfsdk/src/fpdfformfill.cpp',
85         'fpdfsdk/src/fpdfppo.cpp',
86         'fpdfsdk/src/fpdfsave.cpp',
87         'fpdfsdk/src/fpdftext.cpp',
88         'fpdfsdk/src/fpdfview.cpp',
89         'fpdfsdk/src/fpdf_dataavail.cpp',
90         'fpdfsdk/src/fpdf_ext.cpp',
91         'fpdfsdk/src/fpdf_flatten.cpp',
92         'fpdfsdk/src/fpdf_progressive.cpp',
93         'fpdfsdk/src/fpdf_searchex.cpp',
94         'fpdfsdk/src/fpdf_sysfontinfo.cpp',
95         'fpdfsdk/src/fpdf_transformpage.cpp',
96         'fpdfsdk/src/fsdk_actionhandler.cpp',
97         'fpdfsdk/src/fsdk_annothandler.cpp',
98         'fpdfsdk/src/fsdk_baseannot.cpp',
99         'fpdfsdk/src/fsdk_baseform.cpp',
100         'fpdfsdk/src/fsdk_mgr.cpp',
101         'fpdfsdk/src/fsdk_rendercontext.cpp',
102         'public/fpdf_dataavail.h',
103         'public/fpdf_doc.h',
104         'public/fpdf_edit.h',
105         'public/fpdf_ext.h',
106         'public/fpdf_flatten.h',
107         'public/fpdf_formfill.h',
108         'public/fpdf_fwlevent.h',
109         'public/fpdf_ppo.h',
110         'public/fpdf_progressive.h',
111         'public/fpdf_save.h',
112         'public/fpdf_searchex.h',
113         'public/fpdf_sysfontinfo.h',
114         'public/fpdf_text.h',
115         'public/fpdf_transformpage.h',
116         'public/fpdfview.h',
117       ],
118       'conditions': [
119         ['bundle_freetype==1', {
120           'dependencies': [
121             'third_party/third_party.gyp:fx_freetype',
122           ],
123         }, {
124           'link_settings': {
125             'libraries': [
126               '-lfreetype',
127             ],
128           },
129         }],
130       ],
131       'all_dependent_settings': {
132         'msvs_settings': {
133           'VCLinkerTool': {
134             'AdditionalDependencies': [
135               'advapi32.lib',
136               'gdi32.lib',
137               'user32.lib',
138             ],
139           },
140         },
141         'conditions': [
142           ['OS=="mac"', {
143             'link_settings': {
144               'libraries': [
145                 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
146                 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
147               ],
148             },
149           }],
150         ],
151       },
152     },
153     {
154       'target_name': 'fdrm',
155       'type': 'static_library',
156       'sources': [
157         'core/include/fdrm/fx_crypt.h',
158         'core/src/fdrm/crypto/fx_crypt.cpp',
159         'core/src/fdrm/crypto/fx_crypt_aes.cpp',
160         'core/src/fdrm/crypto/fx_crypt_sha.cpp',
161       ],
162     },
163     {
164       'target_name': 'fpdfdoc',
165       'type': 'static_library',
166       'sources': [
167         'core/include/fpdfdoc/fpdf_ap.h',
168         'core/include/fpdfdoc/fpdf_doc.h',
169         'core/include/fpdfdoc/fpdf_tagged.h',
170         'core/include/fpdfdoc/fpdf_vt.h',
171         'core/src/fpdfdoc/doc_action.cpp',
172         'core/src/fpdfdoc/doc_annot.cpp',
173         'core/src/fpdfdoc/doc_ap.cpp',
174         'core/src/fpdfdoc/doc_basic.cpp',
175         'core/src/fpdfdoc/doc_bookmark.cpp',
176         'core/src/fpdfdoc/doc_form.cpp',
177         'core/src/fpdfdoc/doc_formcontrol.cpp',
178         'core/src/fpdfdoc/doc_formfield.cpp',
179         'core/src/fpdfdoc/doc_link.cpp',
180         'core/src/fpdfdoc/doc_metadata.cpp',
181         'core/src/fpdfdoc/doc_ocg.cpp',
182         'core/src/fpdfdoc/doc_tagged.cpp',
183         'core/src/fpdfdoc/doc_utils.cpp',
184         'core/src/fpdfdoc/doc_utils.h',
185         'core/src/fpdfdoc/doc_viewerPreferences.cpp',
186         'core/src/fpdfdoc/doc_vt.cpp',
187         'core/src/fpdfdoc/doc_vtmodule.cpp',
188         'core/src/fpdfdoc/pdf_vt.h',
189         'core/src/fpdfdoc/tagged_int.h',
190       ],
191     },
192     {
193       'target_name': 'fpdfapi',
194       'type': 'static_library',
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       'sources': [
312         'core/include/fpdftext/fpdf_text.h',
313         'core/src/fpdftext/fpdf_text.cpp',
314         'core/src/fpdftext/fpdf_text_int.cpp',
315         'core/src/fpdftext/fpdf_text_search.cpp',
316         'core/src/fpdftext/text_int.h',
317         'core/src/fpdftext/txtproc.h',
318         'core/src/fpdftext/unicodenormalization.cpp',
319         'core/src/fpdftext/unicodenormalizationdata.cpp',
320         'core/src/fpdftext/unicodenormalizationdata.h',
321       ],
322     },
323     {
324       'target_name': 'fxcodec',
325       'type': 'static_library',
326       'dependencies': [
327         'third_party/third_party.gyp:fx_lcms2',
328         'third_party/third_party.gyp:fx_libjpeg',
329         'third_party/third_party.gyp:fx_libopenjpeg',
330         'third_party/third_party.gyp:fx_zlib',
331       ],
332       'sources': [
333         'core/include/fxcodec/fx_codec.h',
334         'core/include/fxcodec/fx_codec_def.h',
335         'core/include/fxcodec/fx_codec_flate.h',
336         'core/include/fxcodec/fx_codec_provider.h',
337         'core/src/fxcodec/codec/codec_int.h',
338         'core/src/fxcodec/codec/fx_codec.cpp',
339         'core/src/fxcodec/codec/fx_codec_fax.cpp',
340         'core/src/fxcodec/codec/fx_codec_flate.cpp',
341         'core/src/fxcodec/codec/fx_codec_icc.cpp',
342         'core/src/fxcodec/codec/fx_codec_jbig.cpp',
343         'core/src/fxcodec/codec/fx_codec_jbig_enc.cpp',
344         'core/src/fxcodec/codec/fx_codec_jpeg.cpp',
345         'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp',
346         'core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp',
347         'core/src/fxcodec/jbig2/JBig2_ArithDecoder.h',
348         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp',
349         'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h',
350         'core/src/fxcodec/jbig2/JBig2_BitStream.cpp',
351         'core/src/fxcodec/jbig2/JBig2_BitStream.h',
352         'core/src/fxcodec/jbig2/JBig2_Context.cpp',
353         'core/src/fxcodec/jbig2/JBig2_Context.h',
354         'core/src/fxcodec/jbig2/JBig2_Define.h',
355         'core/src/fxcodec/jbig2/JBig2_GrdProc.cpp',
356         'core/src/fxcodec/jbig2/JBig2_GrdProc.h',
357         'core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp',
358         'core/src/fxcodec/jbig2/JBig2_GrrdProc.h',
359         'core/src/fxcodec/jbig2/JBig2_GsidProc.cpp',
360         'core/src/fxcodec/jbig2/JBig2_GsidProc.h',
361         'core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp',
362         'core/src/fxcodec/jbig2/JBig2_HtrdProc.h',
363         'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp',
364         'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h',
365         'core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp',
366         'core/src/fxcodec/jbig2/JBig2_HuffmanTable.h',
367         'core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h',
368         'core/src/fxcodec/jbig2/JBig2_Image.cpp',
369         'core/src/fxcodec/jbig2/JBig2_Image.h',
370         'core/src/fxcodec/jbig2/JBig2_List.h',
371         'core/src/fxcodec/jbig2/JBig2_Page.h',
372         'core/src/fxcodec/jbig2/JBig2_PatternDict.cpp',
373         'core/src/fxcodec/jbig2/JBig2_PatternDict.h',
374         'core/src/fxcodec/jbig2/JBig2_PddProc.cpp',
375         'core/src/fxcodec/jbig2/JBig2_PddProc.h',
376         'core/src/fxcodec/jbig2/JBig2_SddProc.cpp',
377         'core/src/fxcodec/jbig2/JBig2_SddProc.h',
378         'core/src/fxcodec/jbig2/JBig2_Segment.cpp',
379         'core/src/fxcodec/jbig2/JBig2_Segment.h',
380         'core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp',
381         'core/src/fxcodec/jbig2/JBig2_SymbolDict.h',
382         'core/src/fxcodec/jbig2/JBig2_TrdProc.cpp',
383         'core/src/fxcodec/jbig2/JBig2_TrdProc.h',
384       ],
385       'msvs_settings': {
386         'VCCLCompilerTool': {
387           # Unresolved warnings in fx_codec_jpx_opj.cpp
388           # https://code.google.com/p/pdfium/issues/detail?id=100
389           'WarnAsError': 'false',
390         },
391       },
392       'conditions': [
393         ['os_posix==1', {
394           # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int
395           # conversion to check that an address is 16-bit aligned (benign).
396           'cflags_c': [ '-Wno-pointer-to-int-cast' ],
397         }],
398       ],
399     },
400     {
401       'target_name': 'fxcrt',
402       'type': 'static_library',
403       'sources': [
404         'core/include/fxcrt/fx_basic.h',
405         'core/include/fxcrt/fx_bidi.h',
406         'core/include/fxcrt/fx_coordinates.h',
407         'core/include/fxcrt/fx_ext.h',
408         'core/include/fxcrt/fx_memory.h',
409         'core/include/fxcrt/fx_safe_types.h',
410         'core/include/fxcrt/fx_stream.h',
411         'core/include/fxcrt/fx_string.h',
412         'core/include/fxcrt/fx_system.h',
413         'core/include/fxcrt/fx_ucd.h',
414         'core/include/fxcrt/fx_xml.h',
415         'core/src/fxcrt/extension.h',
416         'core/src/fxcrt/fxcrt_platforms.cpp',
417         'core/src/fxcrt/fxcrt_platforms.h',
418         'core/src/fxcrt/fxcrt_posix.cpp',
419         'core/src/fxcrt/fxcrt_posix.h',
420         'core/src/fxcrt/fxcrt_windows.cpp',
421         'core/src/fxcrt/fxcrt_windows.h',
422         'core/src/fxcrt/fx_basic_array.cpp',
423         'core/src/fxcrt/fx_basic_bstring.cpp',
424         'core/src/fxcrt/fx_basic_buffer.cpp',
425         'core/src/fxcrt/fx_basic_coords.cpp',
426         'core/src/fxcrt/fx_basic_gcc.cpp',
427         'core/src/fxcrt/fx_basic_list.cpp',
428         'core/src/fxcrt/fx_basic_maps.cpp',
429         'core/src/fxcrt/fx_basic_memmgr.cpp',
430         'core/src/fxcrt/fx_basic_plex.cpp',
431         'core/src/fxcrt/fx_basic_utf.cpp',
432         'core/src/fxcrt/fx_basic_util.cpp',
433         'core/src/fxcrt/fx_basic_wstring.cpp',
434         'core/src/fxcrt/fx_bidi.cpp',
435         'core/src/fxcrt/fx_extension.cpp',
436         'core/src/fxcrt/fx_ucddata.cpp',
437         'core/src/fxcrt/fx_unicode.cpp',
438         'core/src/fxcrt/fx_xml_composer.cpp',
439         'core/src/fxcrt/fx_xml_parser.cpp',
440         'core/src/fxcrt/plex.h',
441         'core/src/fxcrt/xml_int.h',
442       ],
443     },
444     {
445       'target_name': 'fxge',
446       'type': 'static_library',
447       'dependencies': [
448         'third_party/third_party.gyp:fx_agg',
449       ],
450       'sources': [
451         'core/include/fxge/fpf.h',
452         'core/include/fxge/fx_dib.h',
453         'core/include/fxge/fx_font.h',
454         'core/include/fxge/fx_freetype.h',
455         'core/include/fxge/fx_ge.h',
456         'core/include/fxge/fx_ge_apple.h',
457         'core/include/fxge/fx_ge_win32.h',
458         'core/src/fxge/agg/include/fx_agg_driver.h',
459         'core/src/fxge/agg/src/fx_agg_driver.cpp',
460         'core/src/fxge/android/fpf_skiafont.cpp',
461         'core/src/fxge/android/fpf_skiafont.h',
462         'core/src/fxge/android/fpf_skiafontmgr.cpp',
463         'core/src/fxge/android/fpf_skiafontmgr.h',
464         'core/src/fxge/android/fpf_skiamodule.cpp',
465         'core/src/fxge/android/fpf_skiamodule.h',
466         'core/src/fxge/android/fx_android_font.cpp',
467         'core/src/fxge/android/fx_android_font.h',
468         'core/src/fxge/android/fx_android_imp.cpp',
469         'core/src/fxge/android/fx_fpf.h',
470         'core/src/fxge/apple/apple_int.h',
471         'core/src/fxge/apple/fx_apple_platform.cpp',
472         'core/src/fxge/apple/fx_mac_imp.cpp',
473         'core/src/fxge/apple/fx_quartz_device.cpp',
474         'core/src/fxge/dib/dib_int.h',
475         'core/src/fxge/dib/fx_dib_composite.cpp',
476         'core/src/fxge/dib/fx_dib_convert.cpp',
477         'core/src/fxge/dib/fx_dib_engine.cpp',
478         'core/src/fxge/dib/fx_dib_main.cpp',
479         'core/src/fxge/dib/fx_dib_transform.cpp',
480         'core/src/fxge/fontdata/chromefontdata/chromefontdata.h',
481         'core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c',
482         'core/src/fxge/fontdata/chromefontdata/FoxitFixed.c',
483         'core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c',
484         'core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c',
485         'core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c',
486         'core/src/fxge/fontdata/chromefontdata/FoxitSans.c',
487         'core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c',
488         'core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c',
489         'core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c',
490         'core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c',
491         'core/src/fxge/fontdata/chromefontdata/FoxitSerif.c',
492         'core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c',
493         'core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c',
494         'core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c',
495         'core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c',
496         'core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c',
497         'core/src/fxge/freetype/fx_freetype.c',
498         'core/src/fxge/ge/fx_ge.cpp',
499         'core/src/fxge/ge/fx_ge_device.cpp',
500         'core/src/fxge/ge/fx_ge_font.cpp',
501         'core/src/fxge/ge/fx_ge_fontmap.cpp',
502         'core/src/fxge/ge/fx_ge_linux.cpp',
503         'core/src/fxge/ge/fx_ge_path.cpp',
504         'core/src/fxge/ge/fx_ge_ps.cpp',
505         'core/src/fxge/ge/fx_ge_text.cpp',
506         'core/src/fxge/ge/text_int.h',
507       ],
508       'variables': {
509         'clang_warning_flags': [
510           # http://code.google.com/p/pdfium/issues/detail?id=188
511           '-Wno-switch',
512         ],
513       },
514       'conditions': [
515         ['pdf_use_skia==1', {
516           'sources': [
517             'core/src/fxge/skia/fx_skia_blitter_new.cpp',
518             'core/src/fxge/skia/fx_skia_device.cpp',
519           ],
520           'dependencies': [
521             '<(DEPTH)/skia/skia.gyp:skia',
522           ],
523           'include_dirs': [
524             '<(DEPTH)/third_party/skia/include/config',
525             '<(DEPTH)/third_party/skia/include/core',
526             '<(DEPTH)/third_party/skia/include/effects',
527             '<(DEPTH)/third_party/skia/include/images',
528             '<(DEPTH)/third_party/skia/include/lazy',
529             '<(DEPTH)/third_party/skia/include/pathops',
530             '<(DEPTH)/third_party/skia/include/utils',
531             '<(DEPTH)/third_party/skia/src/core',
532           ],
533         }],
534         ['OS=="win"', {
535           'defines!': [
536             'WIN32_LEAN_AND_MEAN'
537           ],
538           'sources': [
539             'core/src/fxge/win32/dwrite_int.h',
540             'core/src/fxge/win32/fx_win32_device.cpp',
541             'core/src/fxge/win32/fx_win32_dib.cpp',
542             'core/src/fxge/win32/fx_win32_dwrite.cpp',
543             'core/src/fxge/win32/fx_win32_gdipext.cpp',
544             'core/src/fxge/win32/fx_win32_print.cpp',
545             'core/src/fxge/win32/win32_int.h',
546           ],
547         }],
548       ],
549     },
550     {
551       'target_name': 'fxedit',
552       'type': 'static_library',
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       'sources': [
569         'fpdfsdk/include/pdfwindow/IPDFWindow.h',
570         'fpdfsdk/include/pdfwindow/PDFWindow.h',
571         'fpdfsdk/include/pdfwindow/PWL_Button.h',
572         'fpdfsdk/include/pdfwindow/PWL_Caret.h',
573         'fpdfsdk/include/pdfwindow/PWL_ComboBox.h',
574         'fpdfsdk/include/pdfwindow/PWL_Edit.h',
575         'fpdfsdk/include/pdfwindow/PWL_EditCtrl.h',
576         'fpdfsdk/include/pdfwindow/PWL_FontMap.h',
577         'fpdfsdk/include/pdfwindow/PWL_Icon.h',
578         'fpdfsdk/include/pdfwindow/PWL_IconList.h',
579         'fpdfsdk/include/pdfwindow/PWL_Label.h',
580         'fpdfsdk/include/pdfwindow/PWL_ListBox.h',
581         'fpdfsdk/include/pdfwindow/PWL_ListCtrl.h',
582         'fpdfsdk/include/pdfwindow/PWL_Note.h',
583         'fpdfsdk/include/pdfwindow/PWL_ScrollBar.h',
584         'fpdfsdk/include/pdfwindow/PWL_Signature.h',
585         'fpdfsdk/include/pdfwindow/PWL_SpecialButton.h',
586         'fpdfsdk/include/pdfwindow/PWL_Utils.h',
587         'fpdfsdk/include/pdfwindow/PWL_Wnd.h',
588         'fpdfsdk/src/pdfwindow/PWL_Button.cpp',
589         'fpdfsdk/src/pdfwindow/PWL_Caret.cpp',
590         'fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp',
591         'fpdfsdk/src/pdfwindow/PWL_Edit.cpp',
592         'fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp',
593         'fpdfsdk/src/pdfwindow/PWL_FontMap.cpp',
594         'fpdfsdk/src/pdfwindow/PWL_Icon.cpp',
595         'fpdfsdk/src/pdfwindow/PWL_IconList.cpp',
596         'fpdfsdk/src/pdfwindow/PWL_Label.cpp',
597         'fpdfsdk/src/pdfwindow/PWL_ListBox.cpp',
598         'fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp',
599         'fpdfsdk/src/pdfwindow/PWL_Note.cpp',
600         'fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp',
601         'fpdfsdk/src/pdfwindow/PWL_Signature.cpp',
602         'fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp',
603         'fpdfsdk/src/pdfwindow/PWL_Utils.cpp',
604         'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp',
605       ],
606     },
607     {
608       'target_name': 'javascript',
609       'type': 'static_library',
610       'sources': [
611         'fpdfsdk/include/javascript/IJavaScript.h',
612         'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
613       ],
614       'conditions': [
615         ['pdf_enable_v8==1', {
616           'include_dirs': [
617             '<(DEPTH)/v8',
618             '<(DEPTH)/v8/include',
619           ],
620           'dependencies': [
621             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
622           ],
623           'export_dependent_settings': [
624             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
625           ],
626           'sources!': [
627             'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
628           ],
629           'sources': [
630             'fpdfsdk/src/javascript/Consts.cpp',
631             'fpdfsdk/src/javascript/Consts.h',
632             'fpdfsdk/src/javascript/Document.cpp',
633             'fpdfsdk/src/javascript/Document.h',
634             'fpdfsdk/src/javascript/Field.cpp',
635             'fpdfsdk/src/javascript/Field.h',
636             'fpdfsdk/src/javascript/Icon.cpp',
637             'fpdfsdk/src/javascript/Icon.h',
638             'fpdfsdk/src/javascript/JS_Context.cpp',
639             'fpdfsdk/src/javascript/JS_Context.h',
640             'fpdfsdk/src/javascript/JS_Define.h',
641             'fpdfsdk/src/javascript/JS_EventHandler.cpp',
642             'fpdfsdk/src/javascript/JS_EventHandler.h',
643             'fpdfsdk/src/javascript/JS_GlobalData.cpp',
644             'fpdfsdk/src/javascript/JS_GlobalData.h',
645             'fpdfsdk/src/javascript/JS_Object.cpp',
646             'fpdfsdk/src/javascript/JS_Object.h',
647             'fpdfsdk/src/javascript/JS_Runtime.cpp',
648             'fpdfsdk/src/javascript/JS_Runtime.h',
649             'fpdfsdk/src/javascript/JS_Value.cpp',
650             'fpdfsdk/src/javascript/JS_Value.h',
651             'fpdfsdk/src/javascript/PublicMethods.cpp',
652             'fpdfsdk/src/javascript/PublicMethods.h',
653             'fpdfsdk/src/javascript/app.cpp',
654             'fpdfsdk/src/javascript/app.cpp',
655             'fpdfsdk/src/javascript/app.h',
656             'fpdfsdk/src/javascript/color.cpp',
657             'fpdfsdk/src/javascript/color.cpp',
658             'fpdfsdk/src/javascript/color.h',
659             'fpdfsdk/src/javascript/console.cpp',
660             'fpdfsdk/src/javascript/console.cpp',
661             'fpdfsdk/src/javascript/console.h',
662             'fpdfsdk/src/javascript/event.cpp',
663             'fpdfsdk/src/javascript/event.h',
664             'fpdfsdk/src/javascript/global.cpp',
665             'fpdfsdk/src/javascript/global.h',
666             'fpdfsdk/src/javascript/report.cpp',
667             'fpdfsdk/src/javascript/report.h',
668             'fpdfsdk/src/javascript/resource.cpp',
669             'fpdfsdk/src/javascript/resource.h',
670             'fpdfsdk/src/javascript/util.cpp',
671             'fpdfsdk/src/javascript/util.h',
672             'fpdfsdk/include/jsapi/fxjs_v8.h',
673             'fpdfsdk/src/jsapi/fxjs_v8.cpp',
674           ],
675         }],
676       ],
677     },
678     {
679       'target_name': 'formfiller',
680       'type': 'static_library',
681       'sources': [
682         'fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h',
683         'fpdfsdk/include/formfiller/FFL_CheckBox.h',
684         'fpdfsdk/include/formfiller/FFL_ComboBox.h',
685         'fpdfsdk/include/formfiller/FFL_FormFiller.h',
686         'fpdfsdk/include/formfiller/FFL_IFormFiller.h',
687         'fpdfsdk/include/formfiller/FFL_ListBox.h',
688         'fpdfsdk/include/formfiller/FFL_PushButton.h',
689         'fpdfsdk/include/formfiller/FFL_RadioButton.h',
690         'fpdfsdk/include/formfiller/FFL_TextField.h',
691         'fpdfsdk/include/formfiller/FormFiller.h',
692         'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp',
693         'fpdfsdk/src/formfiller/FFL_CheckBox.cpp',
694         'fpdfsdk/src/formfiller/FFL_ComboBox.cpp',
695         'fpdfsdk/src/formfiller/FFL_FormFiller.cpp',
696         'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp',
697         'fpdfsdk/src/formfiller/FFL_ListBox.cpp',
698         'fpdfsdk/src/formfiller/FFL_PushButton.cpp',
699         'fpdfsdk/src/formfiller/FFL_RadioButton.cpp',
700         'fpdfsdk/src/formfiller/FFL_TextField.cpp',
701       ],
702     },
703     {
704       'target_name': 'pdfium_unittests',
705       'type': 'executable',
706       'dependencies': [
707         '<(DEPTH)/testing/gtest.gyp:gtest_main',
708         '<(DEPTH)/testing/gtest.gyp:gtest',
709         'pdfium',
710         'test_support',
711       ],
712       'include_dirs': [
713         '<(DEPTH)'
714       ],
715       'sources': [
716         'core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp',
717         'core/src/fxcrt/fx_basic_bstring_unittest.cpp',
718         'core/src/fxcrt/fx_basic_memmgr_unittest.cpp',
719         'core/src/fxcrt/fx_basic_wstring_unittest.cpp',
720         'core/src/fxcrt/fx_bidi_unittest.cpp',
721         'core/src/fxcrt/fx_system_unittest.cpp',
722         'testing/fx_string_testhelpers.h',
723         'testing/fx_string_testhelpers.cpp',
724         'third_party/base/nonstd_unique_ptr_unittest.cpp',
725       ],
726     },
727     {
728       'target_name': 'pdfium_embeddertests',
729       'type': 'executable',
730       'dependencies': [
731         '<(DEPTH)/testing/gmock.gyp:gmock',
732         '<(DEPTH)/testing/gtest.gyp:gtest',
733         'pdfium',
734         'test_support',
735       ],
736       'include_dirs': [
737         '<(DEPTH)',
738       ],
739       'sources': [
740         'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp',
741         'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp',
742         'core/src/fpdfapi/fpdf_render/fpdf_render_pattern_embeddertest.cpp',
743         'fpdfsdk/src/fpdf_dataavail_embeddertest.cpp',
744         'fpdfsdk/src/fpdfdoc_embeddertest.cpp',
745         'fpdfsdk/src/fpdfformfill_embeddertest.cpp',
746         'fpdfsdk/src/fpdftext_embeddertest.cpp',
747         'fpdfsdk/src/fpdfview_c_api_test.c',
748         'fpdfsdk/src/fpdfview_c_api_test.h',
749         'fpdfsdk/src/fpdfview_embeddertest.cpp',
750         'testing/embedder_test.cpp',
751         'testing/embedder_test.h',
752         'testing/embedder_test_mock_delegate.h',
753         'testing/embedder_test_timer_handling_delegate.h',
754       ],
755       'conditions': [
756         ['pdf_enable_v8==1', {
757           'include_dirs': [
758             '<(DEPTH)/v8',
759             '<(DEPTH)/v8/include',
760           ],
761           'dependencies': [
762             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
763             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
764           ],
765           'sources': [
766             'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp',
767           ],
768         }],
769       ],
770     },
771     {
772       'target_name': 'test_support',
773       'type': 'static_library',
774       'dependencies': [
775         '<(DEPTH)/testing/gmock.gyp:gmock',
776         '<(DEPTH)/testing/gtest.gyp:gtest',
777       ],
778       'include_dirs': [
779         '<(DEPTH)',
780       ],
781       'sources': [
782         'testing/fx_string_testhelpers.cpp',
783         'testing/fx_string_testhelpers.h',
784         'testing/test_support.cpp',
785         'testing/test_support.h',
786       ],
787       'conditions': [
788         ['pdf_enable_v8==1', {
789           'include_dirs': [
790             '<(DEPTH)/v8',
791             '<(DEPTH)/v8/include',
792           ],
793           'dependencies': [
794             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
795             '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
796           ],
797         }],
798       ],
799     },
800   ],
801 }