• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2014 PDFium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6  'variables': {
7    'pdf_enable_xfa%': 0,  # Set to 1 by standalone.gypi in standalone builds.
8  },
9  'target_defaults': {
10    'defines': [
11      'OPJ_STATIC',
12      'PNG_PREFIX',
13      'PNGPREFIX_H',
14      'PNG_USE_READ_MACROS',
15      '_CRT_SECURE_NO_WARNINGS',
16    ],
17    'include_dirs': [
18      # This is implicit in GN.
19      '<(DEPTH)',
20      '..',
21    ],
22    'msvs_disabled_warnings': [
23      4005, 4018, 4146, 4333, 4345, 4267
24    ],
25  },
26  'targets': [
27    {
28      'target_name': 'bigint',
29      'type': 'static_library',
30      'sources': [
31        'bigint/BigInteger.hh',
32        'bigint/BigIntegerLibrary.hh',
33        'bigint/BigIntegerUtils.hh',
34        'bigint/BigUnsigned.hh',
35        'bigint/NumberlikeArray.hh',
36        'bigint/BigUnsignedInABase.hh',
37        'bigint/BigInteger.cc',
38        'bigint/BigIntegerUtils.cc',
39        'bigint/BigUnsigned.cc',
40        'bigint/BigUnsignedInABase.cc',
41      ],
42    },
43    {
44      'target_name': 'fx_freetype',
45      'type': 'static_library',
46      'defines': [
47        'FT2_BUILD_LIBRARY',
48      ],
49      'include_dirs': [
50         'freetype/include',
51         'freetype/include/freetype',
52      ],
53      'sources': [
54        'freetype/include/freetype/freetype.h',
55        'freetype/include/freetype/ftmm.h',
56        'freetype/include/freetype/ftotval.h',
57        'freetype/include/freetype/ftoutln.h',
58        'freetype/include/freetype/internal/ftobjs.h',
59        'freetype/include/freetype/internal/ftstream.h',
60        'freetype/include/freetype/internal/tttypes.h',
61        'freetype/include/freetype/tttables.h',
62        'freetype/include/ft2build.h',
63        'freetype/src/base/ftbase.c',
64        'freetype/src/base/ftbase.h',
65        'freetype/src/base/ftbitmap.c',
66        'freetype/src/base/ftglyph.c',
67        'freetype/src/base/ftinit.c',
68        'freetype/src/base/ftlcdfil.c',
69        'freetype/src/base/ftmm.c',
70        'freetype/src/base/ftsystem.c',
71        'freetype/src/cff/cff.c',
72        'freetype/src/cff/cffobjs.h',
73        'freetype/src/cff/cfftypes.h',
74        'freetype/src/cid/type1cid.c',
75        'freetype/src/psaux/psaux.c',
76        'freetype/src/pshinter/pshinter.c',
77        'freetype/src/psnames/psmodule.c',
78        'freetype/src/raster/raster.c',
79        'freetype/src/sfnt/sfnt.c',
80        'freetype/src/smooth/smooth.c',
81        'freetype/src/truetype/truetype.c',
82        'freetype/src/type1/type1.c',
83      ],
84      'variables': {
85        'clang_warning_flags': [
86          # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in
87          # ftbase.h are unused.
88          '-Wno-unused-function',
89        ],
90      },
91    },
92    {
93      'target_name': 'fx_agg',
94      'type': 'static_library',
95      'sources': [
96        'agg23/agg_basics.h',
97        'agg23/agg_clip_liang_barsky.h',
98        'agg23/agg_conv_dash.h',
99        'agg23/agg_conv_stroke.h',
100        'agg23/agg_curves.cpp',
101        'agg23/agg_curves.h',
102        'agg23/agg_path_storage.cpp',
103        'agg23/agg_path_storage.h',
104        'agg23/agg_rasterizer_scanline_aa.cpp',
105        'agg23/agg_rasterizer_scanline_aa.h',
106        'agg23/agg_renderer_scanline.h',
107        'agg23/agg_rendering_buffer.h',
108        'agg23/agg_scanline_u.h',
109        'agg23/agg_vcgen_dash.cpp',
110        'agg23/agg_vcgen_stroke.cpp',
111      ],
112      'conditions': [
113        ['os_posix==1', {
114          # library contains several enum vs non-enum conditionals.
115          'cflags': [ '-Wno-extra', ],
116        }],
117      ],
118      'variables': {
119        'clang_warning_flags': [
120          # calc_butt_cap() in agg_vcgen_stroke.cpp is unused.
121          '-Wno-unused-function',
122        ],
123      },
124    },
125    {
126      'target_name': 'fx_lcms2',
127      'type': 'static_library',
128      'sources': [
129        'lcms2-2.6/include/lcms2.h',
130        'lcms2-2.6/include/lcms2_plugin.h',
131        'lcms2-2.6/src/cmscam02.c',
132        'lcms2-2.6/src/cmscgats.c',
133        'lcms2-2.6/src/cmscnvrt.c',
134        'lcms2-2.6/src/cmserr.c',
135        'lcms2-2.6/src/cmsgamma.c',
136        'lcms2-2.6/src/cmsgmt.c',
137        'lcms2-2.6/src/cmshalf.c',
138        'lcms2-2.6/src/cmsintrp.c',
139        'lcms2-2.6/src/cmsio0.c',
140        'lcms2-2.6/src/cmsio1.c',
141        'lcms2-2.6/src/cmslut.c',
142        'lcms2-2.6/src/cmsmd5.c',
143        'lcms2-2.6/src/cmsmtrx.c',
144        'lcms2-2.6/src/cmsnamed.c',
145        'lcms2-2.6/src/cmsopt.c',
146        'lcms2-2.6/src/cmspack.c',
147        'lcms2-2.6/src/cmspcs.c',
148        'lcms2-2.6/src/cmsplugin.c',
149        'lcms2-2.6/src/cmsps2.c',
150        'lcms2-2.6/src/cmssamp.c',
151        'lcms2-2.6/src/cmssm.c',
152        'lcms2-2.6/src/cmstypes.c',
153        'lcms2-2.6/src/cmsvirt.c',
154        'lcms2-2.6/src/cmswtpnt.c',
155        'lcms2-2.6/src/cmsxform.c',
156      ],
157      'conditions': [
158        ['os_posix==1', {
159          'cflags': [
160            '-Wno-main',
161            '-Wno-missing-braces',
162            '-Wno-unused',
163          ],
164        }],
165      ],
166      'variables': {
167        'clang_warning_flags': [
168          '-Wno-missing-braces',
169          # FindPrev() in cmsplugin.c is unused.
170          '-Wno-unused-function',
171        ],
172      },
173    },
174    {
175      'target_name': 'libjpeg',
176      'type': 'static_library',
177      'sources': [
178        'libjpeg/cderror.h',
179        'libjpeg/cdjpeg.h',
180        'libjpeg/fpdfapi_jcapimin.c',
181        'libjpeg/fpdfapi_jcapistd.c',
182        'libjpeg/fpdfapi_jccoefct.c',
183        'libjpeg/fpdfapi_jccolor.c',
184        'libjpeg/fpdfapi_jcdctmgr.c',
185        'libjpeg/fpdfapi_jchuff.c',
186        'libjpeg/fpdfapi_jcinit.c',
187        'libjpeg/fpdfapi_jcmainct.c',
188        'libjpeg/fpdfapi_jcmarker.c',
189        'libjpeg/fpdfapi_jcmaster.c',
190        'libjpeg/fpdfapi_jcomapi.c',
191        'libjpeg/fpdfapi_jcparam.c',
192        'libjpeg/fpdfapi_jcphuff.c',
193        'libjpeg/fpdfapi_jcprepct.c',
194        'libjpeg/fpdfapi_jcsample.c',
195        'libjpeg/fpdfapi_jctrans.c',
196        'libjpeg/fpdfapi_jdapimin.c',
197        'libjpeg/fpdfapi_jdapistd.c',
198        'libjpeg/fpdfapi_jdcoefct.c',
199        'libjpeg/fpdfapi_jdcolor.c',
200        'libjpeg/fpdfapi_jddctmgr.c',
201        'libjpeg/fpdfapi_jdhuff.c',
202        'libjpeg/fpdfapi_jdinput.c',
203        'libjpeg/fpdfapi_jdmainct.c',
204        'libjpeg/fpdfapi_jdmarker.c',
205        'libjpeg/fpdfapi_jdmaster.c',
206        'libjpeg/fpdfapi_jdmerge.c',
207        'libjpeg/fpdfapi_jdphuff.c',
208        'libjpeg/fpdfapi_jdpostct.c',
209        'libjpeg/fpdfapi_jdsample.c',
210        'libjpeg/fpdfapi_jdtrans.c',
211        'libjpeg/fpdfapi_jerror.c',
212        'libjpeg/fpdfapi_jfdctfst.c',
213        'libjpeg/fpdfapi_jfdctint.c',
214        'libjpeg/fpdfapi_jidctfst.c',
215        'libjpeg/fpdfapi_jidctint.c',
216        'libjpeg/fpdfapi_jidctred.c',
217        'libjpeg/fpdfapi_jmemmgr.c',
218        'libjpeg/fpdfapi_jmemnobs.c',
219        'libjpeg/fpdfapi_jutils.c',
220        'libjpeg/jchuff.h',
221        'libjpeg/jconfig.h',
222        'libjpeg/jdct.h',
223        'libjpeg/jdhuff.h',
224        'libjpeg/jerror.h',
225        'libjpeg/jinclude.h',
226        'libjpeg/jmemsys.h',
227        'libjpeg/jmorecfg.h',
228        'libjpeg/jpegint.h',
229        'libjpeg/jpeglib.h',
230        'libjpeg/jversion.h',
231        'libjpeg/transupp.h',
232      ],
233      'conditions': [
234        ['os_posix==1', {
235          'cflags': [
236            '-Wno-main',
237            '-Wno-missing-braces',
238            '-Wno-unused',
239          ],
240        }],
241      ],
242    },
243    {
244      'target_name': 'fx_libopenjpeg',
245      'type': 'static_library',
246      'sources': [
247        'libopenjpeg20/bio.c',
248        'libopenjpeg20/cio.c',
249        'libopenjpeg20/dwt.c',
250        'libopenjpeg20/event.c',
251        'libopenjpeg20/function_list.c',
252        'libopenjpeg20/image.c',
253        'libopenjpeg20/invert.c',
254        'libopenjpeg20/j2k.c',
255        'libopenjpeg20/jp2.c',
256        'libopenjpeg20/mct.c',
257        'libopenjpeg20/mqc.c',
258        'libopenjpeg20/openjpeg.c',
259        'libopenjpeg20/opj_clock.c',
260        'libopenjpeg20/pi.c',
261        'libopenjpeg20/raw.c',
262        'libopenjpeg20/t1.c',
263        'libopenjpeg20/t2.c',
264        'libopenjpeg20/tcd.c',
265        'libopenjpeg20/tgt.c',
266      ],
267    },
268    {
269      'target_name': 'fx_lpng',
270      'type': 'static_library',
271      'sources': [
272        'lpng_v163/png.h',
273        'lpng_v163/png.c',
274        'lpng_v163/pngerror.c',
275        'lpng_v163/pngget.c',
276        'lpng_v163/pngmem.c',
277        'lpng_v163/pngpread.c',
278        'lpng_v163/pngread.c',
279        'lpng_v163/pngrio.c',
280        'lpng_v163/pngrtran.c',
281        'lpng_v163/pngrutil.c',
282        'lpng_v163/pngset.c',
283        'lpng_v163/pngtrans.c',
284        'lpng_v163/pngwio.c',
285        'lpng_v163/pngwrite.c',
286        'lpng_v163/pngwtran.c',
287        'lpng_v163/pngwutil.c',
288      ],
289    },
290    {
291      'target_name': 'fx_zlib',
292      'type': 'static_library',
293      'sources': [
294        'zlib_v128/adler32.c',
295        'zlib_v128/compress.c',
296        'zlib_v128/crc32.c',
297        'zlib_v128/deflate.c',
298        'zlib_v128/gzclose.c',
299        'zlib_v128/gzlib.c',
300        'zlib_v128/gzread.c',
301        'zlib_v128/gzwrite.c',
302        'zlib_v128/infback.c',
303        'zlib_v128/inffast.c',
304        'zlib_v128/inflate.c',
305        'zlib_v128/inftrees.c',
306        'zlib_v128/trees.c',
307        'zlib_v128/uncompr.c',
308        'zlib_v128/zutil.c',
309      ],
310    },
311    {
312      'target_name': 'pdfium_base',
313      'type': 'none',
314      'sources': [
315        'base/logging.h',
316        'base/macros.h',
317        'base/numerics/safe_conversions.h',
318        'base/numerics/safe_conversions_impl.h',
319        'base/numerics/safe_math.h',
320        'base/numerics/safe_math_impl.h',
321        'base/stl_util.h',
322      ],
323    },
324  ],
325  'conditions': [
326    ['pdf_enable_xfa==1', {
327      'targets': [
328        {
329          'target_name': 'fx_tiff',
330          'type': 'static_library',
331          'sources': [
332            'libtiff/tiffiop.h',
333            'libtiff/tiffvers.h',
334            'libtiff/tif_aux.c',
335            'libtiff/tif_close.c',
336            'libtiff/tif_codec.c',
337            'libtiff/tif_color.c',
338            'libtiff/tif_compress.c',
339            'libtiff/tif_dir.c',
340            'libtiff/tif_dirinfo.c',
341            'libtiff/tif_dirread.c',
342            'libtiff/tif_dirwrite.c',
343            'libtiff/tif_dumpmode.c',
344            'libtiff/tif_error.c',
345            'libtiff/tif_extension.c',
346            'libtiff/tif_fax3.c',
347            'libtiff/tif_fax3sm.c',
348            'libtiff/tif_flush.c',
349            'libtiff/tif_getimage.c',
350            'libtiff/tif_jpeg.c',
351            'libtiff/tif_luv.c',
352            'libtiff/tif_lzw.c',
353            'libtiff/tif_next.c',
354            'libtiff/tif_ojpeg.c',
355            'libtiff/tif_open.c',
356            'libtiff/tif_packbits.c',
357            'libtiff/tif_pixarlog.c',
358            'libtiff/tif_predict.c',
359            'libtiff/tif_print.c',
360            'libtiff/tif_read.c',
361            'libtiff/tif_strip.c',
362            'libtiff/tif_swab.c',
363            'libtiff/tif_thunder.c',
364            'libtiff/tif_tile.c',
365            'libtiff/tif_version.c',
366            'libtiff/tif_warning.c',
367            'libtiff/tif_write.c',
368            'libtiff/tif_zip.c',
369          ],
370        },
371      ],
372    }],
373  ],
374}
375