OLD | NEW |
1 # Copyright 2014 PDFium Authors. All rights reserved. | 1 # Copyright 2014 PDFium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("../pdfium.gni") | 5 import("../pdfium.gni") |
6 | 6 |
7 group("third_party") { | 7 group("third_party") { |
8 deps = [ | 8 deps = [ |
9 ":bigint", | 9 ":bigint", |
10 ":fx_freetype", | 10 ":fx_freetype", |
11 ":pdfium_base", | 11 ":pdfium_base", |
12 ] | 12 ] |
13 } | 13 } |
14 | 14 |
| 15 config("pdfium_third_party_config") { |
| 16 configs = ["..:pdfium_common_config"] |
| 17 } |
| 18 |
15 source_set("bigint") { | 19 source_set("bigint") { |
16 configs -= [ "//build/config/compiler:chromium_code" ] | 20 configs -= [ "//build/config/compiler:chromium_code" ] |
17 configs += [ | 21 configs += [ |
18 "//build/config/compiler:no_chromium_code", | 22 "//build/config/compiler:no_chromium_code", |
19 "../:pdfium_config", | 23 ":pdfium_third_party_config", |
20 ] | 24 ] |
21 sources = [ | 25 sources = [ |
22 "bigint/BigInteger.cc", | 26 "bigint/BigInteger.cc", |
23 "bigint/BigInteger.hh", | 27 "bigint/BigInteger.hh", |
24 "bigint/BigIntegerLibrary.hh", | 28 "bigint/BigIntegerLibrary.hh", |
25 "bigint/BigIntegerUtils.cc", | 29 "bigint/BigIntegerUtils.cc", |
26 "bigint/BigIntegerUtils.hh", | 30 "bigint/BigIntegerUtils.hh", |
27 "bigint/BigUnsigned.cc", | 31 "bigint/BigUnsigned.cc", |
28 "bigint/BigUnsigned.hh", | 32 "bigint/BigUnsigned.hh", |
29 "bigint/BigUnsignedInABase.cc", | 33 "bigint/BigUnsignedInABase.cc", |
(...skipping 10 matching lines...) Expand all Loading... |
40 cflags = [ "-Wno-unused-function" ] | 44 cflags = [ "-Wno-unused-function" ] |
41 } | 45 } |
42 } | 46 } |
43 | 47 |
44 # Tests may link against this even if the production library doesn't, | 48 # Tests may link against this even if the production library doesn't, |
45 # so it needs to be separate from it. | 49 # so it needs to be separate from it. |
46 static_library("fx_freetype") { | 50 static_library("fx_freetype") { |
47 configs -= [ "//build/config/compiler:chromium_code" ] | 51 configs -= [ "//build/config/compiler:chromium_code" ] |
48 configs += [ | 52 configs += [ |
49 "//build/config/compiler:no_chromium_code", | 53 "//build/config/compiler:no_chromium_code", |
50 "../:pdfium_config", | 54 ":pdfium_third_party_config", |
51 | 55 |
52 # Must be after no_chromium_code for warning flags to be ordered correctly. | 56 # Must be after no_chromium_code for warning flags to be ordered correctly. |
53 ":fx_freetype_warnings", | 57 ":fx_freetype_warnings", |
54 ] | 58 ] |
55 defines = [ "FT2_BUILD_LIBRARY" ] | 59 defines = [ "FT2_BUILD_LIBRARY" ] |
56 sources = [ | 60 sources = [ |
57 "freetype/include/freetype/freetype.h", | 61 "freetype/include/freetype/freetype.h", |
58 "freetype/include/freetype/ftmm.h", | 62 "freetype/include/freetype/ftmm.h", |
59 "freetype/include/freetype/ftotval.h", | 63 "freetype/include/freetype/ftotval.h", |
60 "freetype/include/freetype/ftoutln.h", | 64 "freetype/include/freetype/ftoutln.h", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 if (is_clang) { | 96 if (is_clang) { |
93 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. | 97 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. |
94 cflags = [ "-Wno-unused-function" ] | 98 cflags = [ "-Wno-unused-function" ] |
95 } | 99 } |
96 } | 100 } |
97 | 101 |
98 source_set("fx_agg") { | 102 source_set("fx_agg") { |
99 configs -= [ "//build/config/compiler:chromium_code" ] | 103 configs -= [ "//build/config/compiler:chromium_code" ] |
100 configs += [ | 104 configs += [ |
101 "//build/config/compiler:no_chromium_code", | 105 "//build/config/compiler:no_chromium_code", |
102 "../:pdfium_config", | 106 ":pdfium_third_party_config", |
103 | 107 |
104 # Must be after no_chromium_code for warning flags to be ordered correctly
. | 108 # Must be after no_chromium_code for warning flags to be ordered correctly
. |
105 ":fx_agg_warnings", | 109 ":fx_agg_warnings", |
106 ] | 110 ] |
107 sources = [ | 111 sources = [ |
108 "agg23/agg_basics.h", | 112 "agg23/agg_basics.h", |
109 "agg23/agg_clip_liang_barsky.h", | 113 "agg23/agg_clip_liang_barsky.h", |
110 "agg23/agg_conv_dash.h", | 114 "agg23/agg_conv_dash.h", |
111 "agg23/agg_conv_stroke.h", | 115 "agg23/agg_conv_stroke.h", |
112 "agg23/agg_curves.cpp", | 116 "agg23/agg_curves.cpp", |
(...skipping 22 matching lines...) Expand all Loading... |
135 # FindPrev() in cmsplugin.c is unused. | 139 # FindPrev() in cmsplugin.c is unused. |
136 "-Wno-unused-function", | 140 "-Wno-unused-function", |
137 ] | 141 ] |
138 } | 142 } |
139 } | 143 } |
140 | 144 |
141 source_set("fx_lcms2") { | 145 source_set("fx_lcms2") { |
142 configs -= [ "//build/config/compiler:chromium_code" ] | 146 configs -= [ "//build/config/compiler:chromium_code" ] |
143 configs += [ | 147 configs += [ |
144 "//build/config/compiler:no_chromium_code", | 148 "//build/config/compiler:no_chromium_code", |
145 "../:pdfium_config", | 149 ":pdfium_third_party_config", |
146 | 150 |
147 # Must be after no_chromium_code for warning flags to be ordered correctly. | 151 # Must be after no_chromium_code for warning flags to be ordered correctly. |
148 ":fx_lcms2_warnings", | 152 ":fx_lcms2_warnings", |
149 ] | 153 ] |
150 sources = [ | 154 sources = [ |
151 "lcms2-2.6/include/lcms2.h", | 155 "lcms2-2.6/include/lcms2.h", |
152 "lcms2-2.6/include/lcms2_plugin.h", | 156 "lcms2-2.6/include/lcms2_plugin.h", |
153 "lcms2-2.6/src/cmscam02.c", | 157 "lcms2-2.6/src/cmscam02.c", |
154 "lcms2-2.6/src/cmscgats.c", | 158 "lcms2-2.6/src/cmscgats.c", |
155 "lcms2-2.6/src/cmscnvrt.c", | 159 "lcms2-2.6/src/cmscnvrt.c", |
(...skipping 27 matching lines...) Expand all Loading... |
183 visibility = [ ":*" ] | 187 visibility = [ ":*" ] |
184 if (is_clang) { | 188 if (is_clang) { |
185 cflags = [ "-Wno-shift-negative-value" ] | 189 cflags = [ "-Wno-shift-negative-value" ] |
186 } | 190 } |
187 } | 191 } |
188 | 192 |
189 source_set("jpeg") { | 193 source_set("jpeg") { |
190 configs -= [ "//build/config/compiler:chromium_code" ] | 194 configs -= [ "//build/config/compiler:chromium_code" ] |
191 configs += [ | 195 configs += [ |
192 "//build/config/compiler:no_chromium_code", | 196 "//build/config/compiler:no_chromium_code", |
193 "../:pdfium_config", | 197 ":pdfium_third_party_config", |
194 | 198 |
195 # Must be after no_chromium_code for warning flags to be ordered correctly. | 199 # Must be after no_chromium_code for warning flags to be ordered correctly. |
196 ":jpeg_warnings", | 200 ":jpeg_warnings", |
197 ] | 201 ] |
198 sources = [ | 202 sources = [ |
199 "libjpeg/cderror.h", | 203 "libjpeg/cderror.h", |
200 "libjpeg/cdjpeg.h", | 204 "libjpeg/cdjpeg.h", |
201 "libjpeg/fpdfapi_jcapimin.c", | 205 "libjpeg/fpdfapi_jcapimin.c", |
202 "libjpeg/fpdfapi_jcapistd.c", | 206 "libjpeg/fpdfapi_jcapistd.c", |
203 "libjpeg/fpdfapi_jccoefct.c", | 207 "libjpeg/fpdfapi_jccoefct.c", |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 # Signed/unsigned comparisons. | 265 # Signed/unsigned comparisons. |
262 "/wd4018", | 266 "/wd4018", |
263 ] | 267 ] |
264 } | 268 } |
265 } | 269 } |
266 | 270 |
267 source_set("fx_libopenjpeg") { | 271 source_set("fx_libopenjpeg") { |
268 configs -= [ "//build/config/compiler:chromium_code" ] | 272 configs -= [ "//build/config/compiler:chromium_code" ] |
269 configs += [ | 273 configs += [ |
270 "//build/config/compiler:no_chromium_code", | 274 "//build/config/compiler:no_chromium_code", |
271 "../:pdfium_config", | 275 ":pdfium_third_party_config", |
272 | 276 |
273 # Must be after no_chromium_code for warning flags to be ordered correctly. | 277 # Must be after no_chromium_code for warning flags to be ordered correctly. |
274 ":fx_libopenjpeg_warnings", | 278 ":fx_libopenjpeg_warnings", |
275 ] | 279 ] |
276 sources = [ | 280 sources = [ |
277 "libopenjpeg20/bio.c", | 281 "libopenjpeg20/bio.c", |
278 "libopenjpeg20/cio.c", | 282 "libopenjpeg20/cio.c", |
279 "libopenjpeg20/dwt.c", | 283 "libopenjpeg20/dwt.c", |
280 "libopenjpeg20/event.c", | 284 "libopenjpeg20/event.c", |
281 "libopenjpeg20/function_list.c", | 285 "libopenjpeg20/function_list.c", |
(...skipping 11 matching lines...) Expand all Loading... |
293 "libopenjpeg20/t2.c", | 297 "libopenjpeg20/t2.c", |
294 "libopenjpeg20/tcd.c", | 298 "libopenjpeg20/tcd.c", |
295 "libopenjpeg20/tgt.c", | 299 "libopenjpeg20/tgt.c", |
296 ] | 300 ] |
297 } | 301 } |
298 | 302 |
299 source_set("fx_lpng") { | 303 source_set("fx_lpng") { |
300 configs -= [ "//build/config/compiler:chromium_code" ] | 304 configs -= [ "//build/config/compiler:chromium_code" ] |
301 configs += [ | 305 configs += [ |
302 "//build/config/compiler:no_chromium_code", | 306 "//build/config/compiler:no_chromium_code", |
303 "../:pdfium_config", | 307 ":pdfium_third_party_config", |
304 ] | 308 ] |
305 sources = [ | 309 sources = [ |
306 "libpng16/png.c", | 310 "libpng16/png.c", |
307 "libpng16/png.h", | 311 "libpng16/png.h", |
308 "libpng16/pngconf.h", | 312 "libpng16/pngconf.h", |
309 "libpng16/pngdebug.h", | 313 "libpng16/pngdebug.h", |
310 "libpng16/pngerror.c", | 314 "libpng16/pngerror.c", |
311 "libpng16/pngget.c", | 315 "libpng16/pngget.c", |
312 "libpng16/pnginfo.h", | 316 "libpng16/pnginfo.h", |
313 "libpng16/pnglibconf.h", | 317 "libpng16/pnglibconf.h", |
(...skipping 13 matching lines...) Expand all Loading... |
327 "libpng16/pngwtran.c", | 331 "libpng16/pngwtran.c", |
328 "libpng16/pngwutil.c", | 332 "libpng16/pngwutil.c", |
329 ] | 333 ] |
330 } | 334 } |
331 | 335 |
332 if (pdf_enable_xfa) { | 336 if (pdf_enable_xfa) { |
333 source_set("fx_tiff") { | 337 source_set("fx_tiff") { |
334 configs -= [ "//build/config/compiler:chromium_code" ] | 338 configs -= [ "//build/config/compiler:chromium_code" ] |
335 configs += [ | 339 configs += [ |
336 "//build/config/compiler:no_chromium_code", | 340 "//build/config/compiler:no_chromium_code", |
337 "../:pdfium_config", | 341 ":pdfium_third_party_config", |
338 ] | 342 ] |
339 if (is_win) { | 343 if (is_win) { |
340 # Need to undefine the macro since it is redefined in | 344 # Need to undefine the macro since it is redefined in |
341 # tif_ojpeg.c and tif_jpeg.c. | 345 # tif_ojpeg.c and tif_jpeg.c. |
342 configs -= [ "//build/config/win:lean_and_mean" ] | 346 configs -= [ "//build/config/win:lean_and_mean" ] |
343 } | 347 } |
344 deps = [ | 348 deps = [ |
345 "//third_party:jpeg", | 349 "//third_party:jpeg", |
346 ] | 350 ] |
347 sources = [ | 351 sources = [ |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 visibility = [ ":*" ] | 395 visibility = [ ":*" ] |
392 if (is_clang) { | 396 if (is_clang) { |
393 cflags = [ "-Wno-shift-negative-value" ] | 397 cflags = [ "-Wno-shift-negative-value" ] |
394 } | 398 } |
395 } | 399 } |
396 | 400 |
397 source_set("fx_zlib") { | 401 source_set("fx_zlib") { |
398 configs -= [ "//build/config/compiler:chromium_code" ] | 402 configs -= [ "//build/config/compiler:chromium_code" ] |
399 configs += [ | 403 configs += [ |
400 "//build/config/compiler:no_chromium_code", | 404 "//build/config/compiler:no_chromium_code", |
401 "../:pdfium_config", | 405 ":pdfium_third_party_config", |
402 | 406 |
403 # Must be after no_chromium_code for warning flags to be ordered correctly. | 407 # Must be after no_chromium_code for warning flags to be ordered correctly. |
404 ":fx_zlib_warnings", | 408 ":fx_zlib_warnings", |
405 ] | 409 ] |
406 sources = [ | 410 sources = [ |
407 "zlib_v128/adler32.c", | 411 "zlib_v128/adler32.c", |
408 "zlib_v128/compress.c", | 412 "zlib_v128/compress.c", |
409 "zlib_v128/crc32.c", | 413 "zlib_v128/crc32.c", |
410 "zlib_v128/deflate.c", | 414 "zlib_v128/deflate.c", |
411 "zlib_v128/gzclose.c", | 415 "zlib_v128/gzclose.c", |
412 "zlib_v128/gzlib.c", | 416 "zlib_v128/gzlib.c", |
413 "zlib_v128/gzread.c", | 417 "zlib_v128/gzread.c", |
414 "zlib_v128/gzwrite.c", | 418 "zlib_v128/gzwrite.c", |
415 "zlib_v128/infback.c", | 419 "zlib_v128/infback.c", |
416 "zlib_v128/inffast.c", | 420 "zlib_v128/inffast.c", |
417 "zlib_v128/inflate.c", | 421 "zlib_v128/inflate.c", |
418 "zlib_v128/inftrees.c", | 422 "zlib_v128/inftrees.c", |
419 "zlib_v128/trees.c", | 423 "zlib_v128/trees.c", |
420 "zlib_v128/uncompr.c", | 424 "zlib_v128/uncompr.c", |
421 "zlib_v128/zutil.c", | 425 "zlib_v128/zutil.c", |
422 ] | 426 ] |
423 } | 427 } |
424 | 428 |
425 source_set("pdfium_base") { | 429 source_set("pdfium_base") { |
426 configs -= [ "//build/config/compiler:chromium_code" ] | 430 configs -= [ "//build/config/compiler:chromium_code" ] |
427 configs += [ | 431 configs += [ |
428 "//build/config/compiler:no_chromium_code", | 432 "//build/config/compiler:no_chromium_code", |
429 "../:pdfium_config", | 433 ":pdfium_third_party_config", |
430 ] | 434 ] |
431 sources = [ | 435 sources = [ |
432 "base/logging.h", | 436 "base/logging.h", |
433 "base/macros.h", | 437 "base/macros.h", |
434 "base/numerics/safe_conversions.h", | 438 "base/numerics/safe_conversions.h", |
435 "base/numerics/safe_conversions_impl.h", | 439 "base/numerics/safe_conversions_impl.h", |
436 "base/numerics/safe_math.h", | 440 "base/numerics/safe_math.h", |
437 "base/numerics/safe_math_impl.h", | 441 "base/numerics/safe_math_impl.h", |
438 "base/stl_util.h", | 442 "base/stl_util.h", |
439 ] | 443 ] |
440 } | 444 } |
OLD | NEW |