blob: 16adbf70fd63e49fd7a4340237f29d9de04d1b44 [file] [log] [blame]
Bo Xu4c764f32014-12-19 14:29:17 -08001# 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
5group("third_party") {
6 deps = [
7 ":bigint",
Tom Sepez0dfd0302015-10-12 15:38:22 -07008 ":fx_freetype",
Tom Sepez35425892015-02-05 10:03:18 -08009 ":pdfium_base",
Bo Xu4c764f32014-12-19 14:29:17 -080010 ]
11}
12
13static_library("bigint") {
Tom Sepez54172662015-01-09 14:49:47 -080014 configs -= [ "//build/config/compiler:chromium_code" ]
15 configs += [
Tom Sepez6fd997b2015-06-18 17:51:37 -070016 "//build/config/compiler:no_chromium_code",
17 "//third_party/pdfium:pdfium_config",
Tom Sepez54172662015-01-09 14:49:47 -080018 ]
Bo Xu4c764f32014-12-19 14:29:17 -080019 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
Lei Zhang4f9ccbf2015-10-30 13:04:57 -070033config("fx_freetype_warnings") {
34 visibility = [ ":*" ]
35 if (is_clang) {
36 # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in
37 # ftbase.h are unused.
38 cflags = [ "-Wno-unused-function" ]
39 }
40}
41
Tom Sepez0dfd0302015-10-12 15:38:22 -070042source_set("fx_freetype") {
Tom Sepez54172662015-01-09 14:49:47 -080043 configs -= [ "//build/config/compiler:chromium_code" ]
44 configs += [
Tom Sepez6fd997b2015-06-18 17:51:37 -070045 "//build/config/compiler:no_chromium_code",
46 "//third_party/pdfium:pdfium_config",
Lei Zhang8241df72015-11-06 14:38:48 -080047
Lei Zhang4f9ccbf2015-10-30 13:04:57 -070048 # Must be after no_chromium_code for warning flags to be ordered correctly.
49 ":fx_freetype_warnings",
Bo Xu4c764f32014-12-19 14:29:17 -080050 ]
John Abd-El-Malekef4dce42015-02-02 16:52:07 -080051 defines = [ "FT2_BUILD_LIBRARY" ]
Bo Xu4c764f32014-12-19 14:29:17 -080052 sources = [
Oliver Changcec3f682015-11-05 16:00:40 -080053 "freetype/include/freetype/freetype.h",
54 "freetype/include/freetype/ftmm.h",
55 "freetype/include/freetype/ftotval.h",
56 "freetype/include/freetype/ftoutln.h",
57 "freetype/include/freetype/internal/ftobjs.h",
58 "freetype/include/freetype/internal/ftstream.h",
59 "freetype/include/freetype/internal/tttypes.h",
60 "freetype/include/freetype/tttables.h",
Bo Xu4c764f32014-12-19 14:29:17 -080061 "freetype/include/ft2build.h",
Bo Xu4c764f32014-12-19 14:29:17 -080062 "freetype/src/base/ftbase.c",
Oliver Changcec3f682015-11-05 16:00:40 -080063 "freetype/src/base/ftbase.h",
Bo Xu4c764f32014-12-19 14:29:17 -080064 "freetype/src/base/ftbitmap.c",
65 "freetype/src/base/ftglyph.c",
66 "freetype/src/base/ftinit.c",
67 "freetype/src/base/ftlcdfil.c",
68 "freetype/src/base/ftmm.c",
69 "freetype/src/base/ftsystem.c",
Oliver Changcec3f682015-11-05 16:00:40 -080070 "freetype/src/cff/cff.c",
71 "freetype/src/cff/cffobjs.h",
72 "freetype/src/cff/cfftypes.h",
73 "freetype/src/cid/type1cid.c",
Bo Xu4c764f32014-12-19 14:29:17 -080074 "freetype/src/psaux/psaux.c",
75 "freetype/src/pshinter/pshinter.c",
76 "freetype/src/psnames/psmodule.c",
77 "freetype/src/raster/raster.c",
78 "freetype/src/sfnt/sfnt.c",
79 "freetype/src/smooth/smooth.c",
80 "freetype/src/truetype/truetype.c",
81 "freetype/src/type1/type1.c",
Bo Xu4c764f32014-12-19 14:29:17 -080082 ]
83}
84
Lei Zhang4f9ccbf2015-10-30 13:04:57 -070085config("fx_agg_warnings") {
86 visibility = [ ":*" ]
87 if (is_clang) {
88 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused.
89 cflags = [ "-Wno-unused-function" ]
90 }
91}
92
Tom Sepez8be55752015-06-17 11:05:02 -070093source_set("fx_agg") {
94 configs -= [ "//build/config/compiler:chromium_code" ]
95 configs += [
96 "//build/config/compiler:no_chromium_code",
97 "//third_party/pdfium:pdfium_config",
Lei Zhang8241df72015-11-06 14:38:48 -080098
Lei Zhang4f9ccbf2015-10-30 13:04:57 -070099 # Must be after no_chromium_code for warning flags to be ordered correctly.
100 ":fx_agg_warnings",
Tom Sepez8be55752015-06-17 11:05:02 -0700101 ]
102 sources = [
103 "agg23/agg_basics.h",
104 "agg23/agg_clip_liang_barsky.h",
105 "agg23/agg_conv_dash.h",
106 "agg23/agg_conv_stroke.h",
107 "agg23/agg_curves.cpp",
108 "agg23/agg_curves.h",
109 "agg23/agg_path_storage.cpp",
110 "agg23/agg_path_storage.h",
111 "agg23/agg_rasterizer_scanline_aa.cpp",
112 "agg23/agg_rasterizer_scanline_aa.h",
113 "agg23/agg_renderer_scanline.h",
114 "agg23/agg_rendering_buffer.h",
115 "agg23/agg_scanline_u.h",
116 "agg23/agg_vcgen_dash.cpp",
117 "agg23/agg_vcgen_stroke.cpp",
118 ]
119}
120
Lei Zhange262c9a2015-09-03 16:16:10 -0700121config("fx_lcms2_warnings") {
122 if (is_clang) {
Lei Zhang8241df72015-11-06 14:38:48 -0800123 cflags = [
124 # cmslut.cc is sloppy with aggregate initialization. Version 2.7 of this
125 # library doesn't appear to have this problem.
126 "-Wno-missing-braces",
127
128 # FindPrev() in cmsplugin.c is unused.
129 "-Wno-unused-function",
130 ]
Nico Weber2827bdd2015-07-01 14:08:08 -0700131 }
Lei Zhange262c9a2015-09-03 16:16:10 -0700132}
133
134source_set("fx_lcms2") {
Tom Sepez8be55752015-06-17 11:05:02 -0700135 configs -= [ "//build/config/compiler:chromium_code" ]
136 configs += [
137 "//build/config/compiler:no_chromium_code",
138 "//third_party/pdfium:pdfium_config",
Lei Zhang8241df72015-11-06 14:38:48 -0800139
Lei Zhang4f9ccbf2015-10-30 13:04:57 -0700140 # Must be after no_chromium_code for warning flags to be ordered correctly.
Nico Weber2827bdd2015-07-01 14:08:08 -0700141 ":fx_lcms2_warnings",
Tom Sepez8be55752015-06-17 11:05:02 -0700142 ]
143 sources = [
144 "lcms2-2.6/include/lcms2.h",
145 "lcms2-2.6/include/lcms2_plugin.h",
146 "lcms2-2.6/src/cmscam02.c",
147 "lcms2-2.6/src/cmscgats.c",
148 "lcms2-2.6/src/cmscnvrt.c",
149 "lcms2-2.6/src/cmserr.c",
150 "lcms2-2.6/src/cmsgamma.c",
151 "lcms2-2.6/src/cmsgmt.c",
152 "lcms2-2.6/src/cmshalf.c",
153 "lcms2-2.6/src/cmsintrp.c",
154 "lcms2-2.6/src/cmsio0.c",
155 "lcms2-2.6/src/cmsio1.c",
156 "lcms2-2.6/src/cmslut.c",
157 "lcms2-2.6/src/cmsmd5.c",
158 "lcms2-2.6/src/cmsmtrx.c",
159 "lcms2-2.6/src/cmsnamed.c",
160 "lcms2-2.6/src/cmsopt.c",
161 "lcms2-2.6/src/cmspack.c",
162 "lcms2-2.6/src/cmspcs.c",
163 "lcms2-2.6/src/cmsplugin.c",
164 "lcms2-2.6/src/cmsps2.c",
165 "lcms2-2.6/src/cmssamp.c",
166 "lcms2-2.6/src/cmssm.c",
167 "lcms2-2.6/src/cmstypes.c",
168 "lcms2-2.6/src/cmsvirt.c",
169 "lcms2-2.6/src/cmswtpnt.c",
170 "lcms2-2.6/src/cmsxform.c",
171 ]
172}
173
Lei Zhang8241df72015-11-06 14:38:48 -0800174# This is only used for standalone builds.
175source_set("jpeg") {
Tom Sepez0a119752015-06-17 15:46:03 -0700176 configs -= [ "//build/config/compiler:chromium_code" ]
177 configs += [
178 "//build/config/compiler:no_chromium_code",
179 "//third_party/pdfium:pdfium_config",
180 ]
181 sources = [
182 "libjpeg/cderror.h",
183 "libjpeg/cdjpeg.h",
184 "libjpeg/fpdfapi_jcapimin.c",
185 "libjpeg/fpdfapi_jcapistd.c",
186 "libjpeg/fpdfapi_jccoefct.c",
187 "libjpeg/fpdfapi_jccolor.c",
188 "libjpeg/fpdfapi_jcdctmgr.c",
189 "libjpeg/fpdfapi_jchuff.c",
190 "libjpeg/fpdfapi_jcinit.c",
191 "libjpeg/fpdfapi_jcmainct.c",
192 "libjpeg/fpdfapi_jcmarker.c",
193 "libjpeg/fpdfapi_jcmaster.c",
194 "libjpeg/fpdfapi_jcomapi.c",
195 "libjpeg/fpdfapi_jcparam.c",
196 "libjpeg/fpdfapi_jcphuff.c",
197 "libjpeg/fpdfapi_jcprepct.c",
198 "libjpeg/fpdfapi_jcsample.c",
199 "libjpeg/fpdfapi_jctrans.c",
200 "libjpeg/fpdfapi_jdapimin.c",
201 "libjpeg/fpdfapi_jdapistd.c",
202 "libjpeg/fpdfapi_jdcoefct.c",
203 "libjpeg/fpdfapi_jdcolor.c",
204 "libjpeg/fpdfapi_jddctmgr.c",
205 "libjpeg/fpdfapi_jdhuff.c",
206 "libjpeg/fpdfapi_jdinput.c",
207 "libjpeg/fpdfapi_jdmainct.c",
208 "libjpeg/fpdfapi_jdmarker.c",
209 "libjpeg/fpdfapi_jdmaster.c",
210 "libjpeg/fpdfapi_jdmerge.c",
211 "libjpeg/fpdfapi_jdphuff.c",
212 "libjpeg/fpdfapi_jdpostct.c",
213 "libjpeg/fpdfapi_jdsample.c",
214 "libjpeg/fpdfapi_jdtrans.c",
215 "libjpeg/fpdfapi_jerror.c",
216 "libjpeg/fpdfapi_jfdctfst.c",
217 "libjpeg/fpdfapi_jfdctint.c",
218 "libjpeg/fpdfapi_jidctfst.c",
219 "libjpeg/fpdfapi_jidctint.c",
220 "libjpeg/fpdfapi_jidctred.c",
221 "libjpeg/fpdfapi_jmemmgr.c",
222 "libjpeg/fpdfapi_jmemnobs.c",
223 "libjpeg/fpdfapi_jutils.c",
224 "libjpeg/jchuff.h",
225 "libjpeg/jconfig.h",
226 "libjpeg/jdct.h",
227 "libjpeg/jdhuff.h",
228 "libjpeg/jerror.h",
229 "libjpeg/jinclude.h",
230 "libjpeg/jmemsys.h",
231 "libjpeg/jmorecfg.h",
232 "libjpeg/jpegint.h",
233 "libjpeg/jpeglib.h",
234 "libjpeg/jversion.h",
235 "libjpeg/makefile",
236 "libjpeg/transupp.h",
237 ]
238}
239
Tom Sepez6fd997b2015-06-18 17:51:37 -0700240source_set("fx_libopenjpeg") {
Tom Sepez54172662015-01-09 14:49:47 -0800241 configs -= [ "//build/config/compiler:chromium_code" ]
242 configs += [
Tom Sepez6fd997b2015-06-18 17:51:37 -0700243 "//build/config/compiler:no_chromium_code",
244 "//third_party/pdfium:pdfium_config",
245 ]
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
Tom Sepez5ef9faa2015-10-12 15:43:01 -0700269source_set("fx_lpng") {
270 configs -= [ "//build/config/compiler:chromium_code" ]
271 configs += [
272 "//build/config/compiler:no_chromium_code",
273 "//third_party/pdfium:pdfium_config",
274 ]
275 sources = [
276 "lpng_v163/png.h",
277 "lpng_v163/png.c",
278 "lpng_v163/pngerror.c",
279 "lpng_v163/pngget.c",
280 "lpng_v163/pngmem.c",
281 "lpng_v163/pngpread.c",
282 "lpng_v163/pngread.c",
283 "lpng_v163/pngrio.c",
284 "lpng_v163/pngrtran.c",
285 "lpng_v163/pngrutil.c",
286 "lpng_v163/pngset.c",
287 "lpng_v163/pngtrans.c",
288 "lpng_v163/pngwio.c",
289 "lpng_v163/pngwrite.c",
290 "lpng_v163/pngwtran.c",
291 "lpng_v163/pngwutil.c",
292 ]
293}
294
295source_set("fx_tiff") {
296 configs -= [ "//build/config/compiler:chromium_code" ]
297 configs += [
298 "//build/config/compiler:no_chromium_code",
299 "//third_party/pdfium:pdfium_config",
300 ]
301 sources = [
302 "tiff_v403/tiffiop.h",
303 "tiff_v403/tif_aux.c",
304 "tiff_v403/tif_close.c",
305 "tiff_v403/tif_codec.c",
306 "tiff_v403/tif_color.c",
307 "tiff_v403/tif_compress.c",
308 "tiff_v403/tif_dir.c",
309 "tiff_v403/tif_dirinfo.c",
310 "tiff_v403/tif_dirread.c",
311 "tiff_v403/tif_dirwrite.c",
312 "tiff_v403/tif_dumpmode.c",
313 "tiff_v403/tif_error.c",
314 "tiff_v403/tif_extension.c",
315 "tiff_v403/tif_fax3.c",
316 "tiff_v403/tif_fax3sm.c",
317 "tiff_v403/tif_flush.c",
318 "tiff_v403/tif_getimage.c",
319 "tiff_v403/tif_jpeg.c",
320 "tiff_v403/tif_luv.c",
321 "tiff_v403/tif_lzw.c",
322 "tiff_v403/tif_next.c",
323 "tiff_v403/tif_ojpeg.c",
324 "tiff_v403/tif_open.c",
325 "tiff_v403/tif_packbits.c",
326 "tiff_v403/tif_pixarlog.c",
327 "tiff_v403/tif_predict.c",
328 "tiff_v403/tif_print.c",
329 "tiff_v403/tif_read.c",
330 "tiff_v403/tif_strip.c",
331 "tiff_v403/tif_swab.c",
332 "tiff_v403/tif_thunder.c",
333 "tiff_v403/tif_tile.c",
334 "tiff_v403/tif_version.c",
335 "tiff_v403/tif_warning.c",
336 "tiff_v403/tif_write.c",
337 "tiff_v403/tif_zip.c",
338 ]
339}
340
Tom Sepez6f93de52015-06-19 12:57:10 -0700341source_set("fx_zlib") {
342 configs -= [ "//build/config/compiler:chromium_code" ]
343 configs += [
344 "//build/config/compiler:no_chromium_code",
345 "//third_party/pdfium:pdfium_config",
346 ]
347 sources = [
348 "zlib_v128/adler32.c",
349 "zlib_v128/compress.c",
350 "zlib_v128/crc32.c",
351 "zlib_v128/deflate.c",
352 "zlib_v128/gzclose.c",
353 "zlib_v128/gzlib.c",
354 "zlib_v128/gzread.c",
355 "zlib_v128/gzwrite.c",
356 "zlib_v128/infback.c",
357 "zlib_v128/inffast.c",
358 "zlib_v128/inflate.c",
359 "zlib_v128/inftrees.c",
360 "zlib_v128/trees.c",
361 "zlib_v128/uncompr.c",
362 "zlib_v128/zutil.c",
363 ]
364}
365
Tom Sepez6fd997b2015-06-18 17:51:37 -0700366source_set("pdfium_base") {
367 configs -= [ "//build/config/compiler:chromium_code" ]
368 configs += [
369 "//build/config/compiler:no_chromium_code",
370 "//third_party/pdfium:pdfium_config",
Tom Sepez54172662015-01-09 14:49:47 -0800371 ]
Bo Xu4c764f32014-12-19 14:29:17 -0800372 sources = [
Tom Sepez35425892015-02-05 10:03:18 -0800373 "base/logging.h",
374 "base/macros.h",
Tom Sepeza07aa982015-04-17 13:05:21 -0700375 "base/nonstd_unique_ptr.h",
Tom Sepez35425892015-02-05 10:03:18 -0800376 "base/numerics/safe_conversions.h",
377 "base/numerics/safe_conversions_impl.h",
378 "base/numerics/safe_math.h",
379 "base/numerics/safe_math_impl.h",
Lei Zhang54285552015-10-09 13:57:36 -0700380 "base/stl_util.h",
Tom Sepeza07aa982015-04-17 13:05:21 -0700381 "base/template_util.h",
Bo Xu4c764f32014-12-19 14:29:17 -0800382 ]
383}