Move libopenjpeg to third_party/
[pdfium.git] / third_party / BUILD.gn
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 group("third_party") {
6   deps = [
7     ":bigint",
8     ":freetype",
9     ":pdfium_base",
10   ]
11 }
12
13 source_set("bigint") {
14   configs -= [ "//build/config/compiler:chromium_code" ]
15   configs += [
16     "//build/config/compiler:no_chromium_code",
17     "//third_party/pdfium:pdfium_config",
18   ]
19   sources = [
20     "bigint/BigInteger.cc",
21     "bigint/BigInteger.hh",
22     "bigint/BigIntegerLibrary.hh",
23     "bigint/BigIntegerUtils.cc",
24     "bigint/BigIntegerUtils.hh",
25     "bigint/BigUnsigned.cc",
26     "bigint/BigUnsigned.hh",
27     "bigint/BigUnsignedInABase.cc",
28     "bigint/BigUnsignedInABase.hh",
29     "bigint/NumberlikeArray.hh",
30   ]
31 }
32
33 source_set("freetype") {
34   configs -= [ "//build/config/compiler:chromium_code" ]
35   configs += [
36     "//build/config/compiler:no_chromium_code",
37     "//third_party/pdfium:pdfium_config",
38   ]
39   defines = [ "FT2_BUILD_LIBRARY" ]
40   sources = [
41     "freetype/include/freetype.h",
42     "freetype/include/ft2build.h",
43     "freetype/include/ftmm.h",
44     "freetype/include/ftotval.h",
45     "freetype/include/ftoutln.h",
46     "freetype/include/internal/ftobjs.h",
47     "freetype/include/internal/ftstream.h",
48     "freetype/include/internal/tttypes.h",
49     "freetype/include/tttables.h",
50     "freetype/src/base/ftbase.c",
51     "freetype/src/base/ftbitmap.c",
52     "freetype/src/base/ftglyph.c",
53     "freetype/src/base/ftinit.c",
54     "freetype/src/base/ftlcdfil.c",
55     "freetype/src/base/ftmm.c",
56     "freetype/src/base/ftsystem.c",
57     "freetype/src/cff/cff.c",
58     "freetype/src/cff/cffobjs.h",
59     "freetype/src/cff/cfftypes.h",
60     "freetype/src/cid/type1cid.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   ]
70 }
71
72 source_set("fx_agg") {
73   configs -= [ "//build/config/compiler:chromium_code" ]
74   configs += [
75     "//build/config/compiler:no_chromium_code",
76     "//third_party/pdfium:pdfium_config",
77   ]
78   sources = [
79     "agg23/agg_basics.h",
80     "agg23/agg_clip_liang_barsky.h",
81     "agg23/agg_conv_dash.h",
82     "agg23/agg_conv_stroke.h",
83     "agg23/agg_curves.cpp",
84     "agg23/agg_curves.h",
85     "agg23/agg_path_storage.cpp",
86     "agg23/agg_path_storage.h",
87     "agg23/agg_rasterizer_scanline_aa.cpp",
88     "agg23/agg_rasterizer_scanline_aa.h",
89     "agg23/agg_renderer_scanline.h",
90     "agg23/agg_rendering_buffer.h",
91     "agg23/agg_scanline_u.h",
92     "agg23/agg_vcgen_dash.cpp",
93     "agg23/agg_vcgen_stroke.cpp",
94   ]
95 }
96
97 source_set("fx_lcms2") {
98   configs -= [ "//build/config/compiler:chromium_code" ]
99   configs += [
100     "//build/config/compiler:no_chromium_code",
101     "//third_party/pdfium:pdfium_config",
102   ]
103   sources = [
104     "lcms2-2.6/include/lcms2.h",
105     "lcms2-2.6/include/lcms2_plugin.h",
106     "lcms2-2.6/src/cmscam02.c",
107     "lcms2-2.6/src/cmscgats.c",
108     "lcms2-2.6/src/cmscnvrt.c",
109     "lcms2-2.6/src/cmserr.c",
110     "lcms2-2.6/src/cmsgamma.c",
111     "lcms2-2.6/src/cmsgmt.c",
112     "lcms2-2.6/src/cmshalf.c",
113     "lcms2-2.6/src/cmsintrp.c",
114     "lcms2-2.6/src/cmsio0.c",
115     "lcms2-2.6/src/cmsio1.c",
116     "lcms2-2.6/src/cmslut.c",
117     "lcms2-2.6/src/cmsmd5.c",
118     "lcms2-2.6/src/cmsmtrx.c",
119     "lcms2-2.6/src/cmsnamed.c",
120     "lcms2-2.6/src/cmsopt.c",
121     "lcms2-2.6/src/cmspack.c",
122     "lcms2-2.6/src/cmspcs.c",
123     "lcms2-2.6/src/cmsplugin.c",
124     "lcms2-2.6/src/cmsps2.c",
125     "lcms2-2.6/src/cmssamp.c",
126     "lcms2-2.6/src/cmssm.c",
127     "lcms2-2.6/src/cmstypes.c",
128     "lcms2-2.6/src/cmsvirt.c",
129     "lcms2-2.6/src/cmswtpnt.c",
130     "lcms2-2.6/src/cmsxform.c",
131   ]
132 }
133
134 source_set("fx_libjpeg") {
135   configs -= [ "//build/config/compiler:chromium_code" ]
136   configs += [
137     "//build/config/compiler:no_chromium_code",
138     "//third_party/pdfium:pdfium_config",
139   ]
140   sources = [
141     "libjpeg/cderror.h",
142     "libjpeg/cdjpeg.h",
143     "libjpeg/fpdfapi_jcapimin.c",
144     "libjpeg/fpdfapi_jcapistd.c",
145     "libjpeg/fpdfapi_jccoefct.c",
146     "libjpeg/fpdfapi_jccolor.c",
147     "libjpeg/fpdfapi_jcdctmgr.c",
148     "libjpeg/fpdfapi_jchuff.c",
149     "libjpeg/fpdfapi_jcinit.c",
150     "libjpeg/fpdfapi_jcmainct.c",
151     "libjpeg/fpdfapi_jcmarker.c",
152     "libjpeg/fpdfapi_jcmaster.c",
153     "libjpeg/fpdfapi_jcomapi.c",
154     "libjpeg/fpdfapi_jcparam.c",
155     "libjpeg/fpdfapi_jcphuff.c",
156     "libjpeg/fpdfapi_jcprepct.c",
157     "libjpeg/fpdfapi_jcsample.c",
158     "libjpeg/fpdfapi_jctrans.c",
159     "libjpeg/fpdfapi_jdapimin.c",
160     "libjpeg/fpdfapi_jdapistd.c",
161     "libjpeg/fpdfapi_jdcoefct.c",
162     "libjpeg/fpdfapi_jdcolor.c",
163     "libjpeg/fpdfapi_jddctmgr.c",
164     "libjpeg/fpdfapi_jdhuff.c",
165     "libjpeg/fpdfapi_jdinput.c",
166     "libjpeg/fpdfapi_jdmainct.c",
167     "libjpeg/fpdfapi_jdmarker.c",
168     "libjpeg/fpdfapi_jdmaster.c",
169     "libjpeg/fpdfapi_jdmerge.c",
170     "libjpeg/fpdfapi_jdphuff.c",
171     "libjpeg/fpdfapi_jdpostct.c",
172     "libjpeg/fpdfapi_jdsample.c",
173     "libjpeg/fpdfapi_jdtrans.c",
174     "libjpeg/fpdfapi_jerror.c",
175     "libjpeg/fpdfapi_jfdctfst.c",
176     "libjpeg/fpdfapi_jfdctint.c",
177     "libjpeg/fpdfapi_jidctfst.c",
178     "libjpeg/fpdfapi_jidctint.c",
179     "libjpeg/fpdfapi_jidctred.c",
180     "libjpeg/fpdfapi_jmemmgr.c",
181     "libjpeg/fpdfapi_jmemnobs.c",
182     "libjpeg/fpdfapi_jutils.c",
183     "libjpeg/jchuff.h",
184     "libjpeg/jconfig.h",
185     "libjpeg/jdct.h",
186     "libjpeg/jdhuff.h",
187     "libjpeg/jerror.h",
188     "libjpeg/jinclude.h",
189     "libjpeg/jmemsys.h",
190     "libjpeg/jmorecfg.h",
191     "libjpeg/jpegint.h",
192     "libjpeg/jpeglib.h",
193     "libjpeg/jversion.h",
194     "libjpeg/makefile",
195     "libjpeg/transupp.h",
196   ]
197 }
198
199 source_set("fx_libopenjpeg") {
200   configs -= [ "//build/config/compiler:chromium_code" ]
201   configs += [
202     "//build/config/compiler:no_chromium_code",
203     "//third_party/pdfium:pdfium_config",
204   ]
205   defines = [ "_CRT_SECURE_NO_WARNINGS" ]
206   sources = [
207     "libopenjpeg20/bio.c",
208     "libopenjpeg20/cio.c",
209     "libopenjpeg20/dwt.c",
210     "libopenjpeg20/event.c",
211     "libopenjpeg20/function_list.c",
212     "libopenjpeg20/image.c",
213     "libopenjpeg20/invert.c",
214     "libopenjpeg20/j2k.c",
215     "libopenjpeg20/jp2.c",
216     "libopenjpeg20/mct.c",
217     "libopenjpeg20/mqc.c",
218     "libopenjpeg20/openjpeg.c",
219     "libopenjpeg20/opj_clock.c",
220     "libopenjpeg20/pi.c",
221     "libopenjpeg20/raw.c",
222     "libopenjpeg20/t1.c",
223     "libopenjpeg20/t2.c",
224     "libopenjpeg20/tcd.c",
225     "libopenjpeg20/tgt.c",
226   ]
227 }
228
229 source_set("pdfium_base") {
230   configs -= [ "//build/config/compiler:chromium_code" ]
231   configs += [
232     "//build/config/compiler:no_chromium_code",
233     "//third_party/pdfium:pdfium_config",
234   ]
235   sources = [
236     "base/logging.h",
237     "base/macros.h",
238     "base/nonstd_unique_ptr.h",
239     "base/numerics/safe_conversions.h",
240     "base/numerics/safe_conversions_impl.h",
241     "base/numerics/safe_math.h",
242     "base/numerics/safe_math_impl.h",
243     "base/template_util.h",
244   ]
245 }