Use bundled freetype for the pdfium_test binary.
[pdfium.git] / third_party / third_party.gyp
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   'target_defaults': {
7     'defines': [
8       'OPJ_STATIC',
9       '_CRT_SECURE_NO_WARNINGS',
10     ],
11     'msvs_disabled_warnings': [
12       4005, 4018, 4146, 4333, 4345, 4267
13     ],
14   },
15   'targets': [
16     {
17       'target_name': 'bigint',
18       'type': 'static_library',
19       'sources': [
20         'bigint/BigInteger.hh',
21         'bigint/BigIntegerLibrary.hh',
22         'bigint/BigIntegerUtils.hh',
23         'bigint/BigUnsigned.hh',
24         'bigint/NumberlikeArray.hh',
25         'bigint/BigUnsignedInABase.hh',
26         'bigint/BigInteger.cc',
27         'bigint/BigIntegerUtils.cc',
28         'bigint/BigUnsigned.cc',
29         'bigint/BigUnsignedInABase.cc',
30       ],
31     },
32     {
33       'target_name': 'fx_freetype',
34       'type': 'static_library',
35       'defines': [
36         'FT2_BUILD_LIBRARY',
37       ],
38       'include_dirs': [
39          'freetype/include',
40       ],
41       'sources': [
42         'freetype/include/freetype.h',
43         'freetype/include/ft2build.h',
44         'freetype/include/ftmm.h',
45         'freetype/include/ftotval.h',
46         'freetype/include/ftoutln.h',
47         'freetype/include/tttables.h',
48         'freetype/include/internal/ftobjs.h',
49         'freetype/include/internal/ftstream.h',
50         'freetype/include/internal/tttypes.h',
51         'freetype/src/cff/cffobjs.h',
52         'freetype/src/cff/cfftypes.h',
53         'freetype/src/cff/cff.c',
54         'freetype/src/base/ftbase.c',
55         'freetype/src/base/ftbitmap.c',
56         'freetype/src/base/ftglyph.c',
57         'freetype/src/base/ftinit.c',
58         'freetype/src/base/ftlcdfil.c',
59         'freetype/src/base/ftmm.c',
60         'freetype/src/base/ftsystem.c',
61         'freetype/src/psaux/psaux.c',
62         'freetype/src/pshinter/pshinter.c',
63         'freetype/src/psnames/psmodule.c',
64         'freetype/src/raster/raster.c',
65         'freetype/src/sfnt/sfnt.c',
66         'freetype/src/smooth/smooth.c',
67         'freetype/src/truetype/truetype.c',
68         'freetype/src/type1/type1.c',
69         'freetype/src/cid/type1cid.c',
70       ],
71     },
72     {
73       'target_name': 'fx_agg',
74       'type': 'static_library',
75       'sources': [
76         'agg23/agg_basics.h',
77         'agg23/agg_clip_liang_barsky.h',
78         'agg23/agg_conv_dash.h',
79         'agg23/agg_conv_stroke.h',
80         'agg23/agg_curves.cpp',
81         'agg23/agg_curves.h',
82         'agg23/agg_path_storage.cpp',
83         'agg23/agg_path_storage.h',
84         'agg23/agg_rasterizer_scanline_aa.cpp',
85         'agg23/agg_rasterizer_scanline_aa.h',
86         'agg23/agg_renderer_scanline.h',
87         'agg23/agg_rendering_buffer.h',
88         'agg23/agg_scanline_u.h',
89         'agg23/agg_vcgen_dash.cpp',
90         'agg23/agg_vcgen_stroke.cpp',
91       ],
92       'conditions': [
93         ['os_posix==1', {
94           # library contains several enum vs non-enum conditionals.
95           'cflags': [ '-Wno-extra', ],
96         }],
97       ],
98     },
99     {
100       'target_name': 'fx_lcms2',
101       'type': 'static_library',
102       'sources': [
103         'lcms2-2.6/include/lcms2.h',
104         'lcms2-2.6/include/lcms2_plugin.h',
105         'lcms2-2.6/src/cmscam02.c',
106         'lcms2-2.6/src/cmscgats.c',
107         'lcms2-2.6/src/cmscnvrt.c',
108         'lcms2-2.6/src/cmserr.c',
109         'lcms2-2.6/src/cmsgamma.c',
110         'lcms2-2.6/src/cmsgmt.c',
111         'lcms2-2.6/src/cmshalf.c',
112         'lcms2-2.6/src/cmsintrp.c',
113         'lcms2-2.6/src/cmsio0.c',
114         'lcms2-2.6/src/cmsio1.c',
115         'lcms2-2.6/src/cmslut.c',
116         'lcms2-2.6/src/cmsmd5.c',
117         'lcms2-2.6/src/cmsmtrx.c',
118         'lcms2-2.6/src/cmsnamed.c',
119         'lcms2-2.6/src/cmsopt.c',
120         'lcms2-2.6/src/cmspack.c',
121         'lcms2-2.6/src/cmspcs.c',
122         'lcms2-2.6/src/cmsplugin.c',
123         'lcms2-2.6/src/cmsps2.c',
124         'lcms2-2.6/src/cmssamp.c',
125         'lcms2-2.6/src/cmssm.c',
126         'lcms2-2.6/src/cmstypes.c',
127         'lcms2-2.6/src/cmsvirt.c',
128         'lcms2-2.6/src/cmswtpnt.c',
129         'lcms2-2.6/src/cmsxform.c',
130       ],
131       'conditions': [
132         ['os_posix==1', {
133           'cflags': [
134             '-Wno-main',
135             '-Wno-missing-braces',
136             '-Wno-unused',
137           ],
138         }],
139       ],
140       'variables': {
141         'clang_warning_flags': [
142           '-Wno-missing-braces',
143         ],
144       },
145     },
146     {
147       'target_name': 'fx_libjpeg',
148       'type': 'static_library',
149       'sources': [
150         'libjpeg/cderror.h',
151         'libjpeg/cdjpeg.h',
152         'libjpeg/fpdfapi_jcapimin.c',
153         'libjpeg/fpdfapi_jcapistd.c',
154         'libjpeg/fpdfapi_jccoefct.c',
155         'libjpeg/fpdfapi_jccolor.c',
156         'libjpeg/fpdfapi_jcdctmgr.c',
157         'libjpeg/fpdfapi_jchuff.c',
158         'libjpeg/fpdfapi_jcinit.c',
159         'libjpeg/fpdfapi_jcmainct.c',
160         'libjpeg/fpdfapi_jcmarker.c',
161         'libjpeg/fpdfapi_jcmaster.c',
162         'libjpeg/fpdfapi_jcomapi.c',
163         'libjpeg/fpdfapi_jcparam.c',
164         'libjpeg/fpdfapi_jcphuff.c',
165         'libjpeg/fpdfapi_jcprepct.c',
166         'libjpeg/fpdfapi_jcsample.c',
167         'libjpeg/fpdfapi_jctrans.c',
168         'libjpeg/fpdfapi_jdapimin.c',
169         'libjpeg/fpdfapi_jdapistd.c',
170         'libjpeg/fpdfapi_jdcoefct.c',
171         'libjpeg/fpdfapi_jdcolor.c',
172         'libjpeg/fpdfapi_jddctmgr.c',
173         'libjpeg/fpdfapi_jdhuff.c',
174         'libjpeg/fpdfapi_jdinput.c',
175         'libjpeg/fpdfapi_jdmainct.c',
176         'libjpeg/fpdfapi_jdmarker.c',
177         'libjpeg/fpdfapi_jdmaster.c',
178         'libjpeg/fpdfapi_jdmerge.c',
179         'libjpeg/fpdfapi_jdphuff.c',
180         'libjpeg/fpdfapi_jdpostct.c',
181         'libjpeg/fpdfapi_jdsample.c',
182         'libjpeg/fpdfapi_jdtrans.c',
183         'libjpeg/fpdfapi_jerror.c',
184         'libjpeg/fpdfapi_jfdctfst.c',
185         'libjpeg/fpdfapi_jfdctint.c',
186         'libjpeg/fpdfapi_jidctfst.c',
187         'libjpeg/fpdfapi_jidctint.c',
188         'libjpeg/fpdfapi_jidctred.c',
189         'libjpeg/fpdfapi_jmemmgr.c',
190         'libjpeg/fpdfapi_jmemnobs.c',
191         'libjpeg/fpdfapi_jutils.c',
192         'libjpeg/jchuff.h',
193         'libjpeg/jconfig.h',
194         'libjpeg/jdct.h',
195         'libjpeg/jdhuff.h',
196         'libjpeg/jerror.h',
197         'libjpeg/jinclude.h',
198         'libjpeg/jmemsys.h',
199         'libjpeg/jmorecfg.h',
200         'libjpeg/jpegint.h',
201         'libjpeg/jpeglib.h',
202         'libjpeg/jversion.h',
203         'libjpeg/transupp.h',
204       ],
205       'conditions': [
206         ['os_posix==1', {
207           'cflags': [
208             '-Wno-main',
209             '-Wno-missing-braces',
210             '-Wno-unused',
211           ],
212         }],
213       ],
214     },
215     {
216       'target_name': 'fx_libopenjpeg',
217       'type': 'static_library',
218       'sources': [
219         'libopenjpeg20/bio.c',
220         'libopenjpeg20/cio.c',
221         'libopenjpeg20/dwt.c',
222         'libopenjpeg20/event.c',
223         'libopenjpeg20/function_list.c',
224         'libopenjpeg20/image.c',
225         'libopenjpeg20/invert.c',
226         'libopenjpeg20/j2k.c',
227         'libopenjpeg20/jp2.c',
228         'libopenjpeg20/mct.c',
229         'libopenjpeg20/mqc.c',
230         'libopenjpeg20/openjpeg.c',
231         'libopenjpeg20/opj_clock.c',
232         'libopenjpeg20/pi.c',
233         'libopenjpeg20/raw.c',
234         'libopenjpeg20/t1.c',
235         'libopenjpeg20/t2.c',
236         'libopenjpeg20/tcd.c',
237         'libopenjpeg20/tgt.c',
238       ],
239     },
240     {
241       'target_name': 'fx_zlib',
242       'type': 'static_library',
243       'sources': [
244         'zlib_v128/adler32.c',
245         'zlib_v128/compress.c',
246         'zlib_v128/crc32.c',
247         'zlib_v128/deflate.c',
248         'zlib_v128/gzclose.c',
249         'zlib_v128/gzlib.c',
250         'zlib_v128/gzread.c',
251         'zlib_v128/gzwrite.c',
252         'zlib_v128/infback.c',
253         'zlib_v128/inffast.c',
254         'zlib_v128/inflate.c',
255         'zlib_v128/inftrees.c',
256         'zlib_v128/trees.c',
257         'zlib_v128/uncompr.c',
258         'zlib_v128/zutil.c',
259       ],
260     },
261     {
262       'target_name': 'pdfium_base',
263       'type': 'none',
264       'sources': [
265         'base/logging.h',
266         'base/macros.h',
267         'base/nonstd_unique_ptr.h',
268         'base/template_util.h',
269         'base/numerics/safe_conversions.h',
270         'base/numerics/safe_conversions_impl.h',
271         'base/numerics/safe_math.h',
272         'base/numerics/safe_math_impl.h',
273       ],
274     },
275   ],
276 }