| OLD | NEW |
| (Empty) |
| 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 'pdf_use_skia%': 0, | |
| 9 }, | |
| 10 'target_defaults': { | |
| 11 'defines': [ | |
| 12 'OPJ_STATIC', | |
| 13 'PNG_PREFIX', | |
| 14 'PNG_USE_READ_MACROS', | |
| 15 ], | |
| 16 'include_dirs': [ | |
| 17 # This is implicit in GN. | |
| 18 '<(DEPTH)', | |
| 19 '..', | |
| 20 ], | |
| 21 }, | |
| 22 'targets': [ | |
| 23 { | |
| 24 'target_name': 'bigint', | |
| 25 'type': 'static_library', | |
| 26 'sources': [ | |
| 27 'bigint/BigInteger.hh', | |
| 28 'bigint/BigIntegerLibrary.hh', | |
| 29 'bigint/BigIntegerUtils.hh', | |
| 30 'bigint/BigUnsigned.hh', | |
| 31 'bigint/NumberlikeArray.hh', | |
| 32 'bigint/BigUnsignedInABase.hh', | |
| 33 'bigint/BigInteger.cc', | |
| 34 'bigint/BigIntegerUtils.cc', | |
| 35 'bigint/BigUnsigned.cc', | |
| 36 'bigint/BigUnsignedInABase.cc', | |
| 37 ], | |
| 38 }, | |
| 39 { | |
| 40 'target_name': 'fx_freetype', | |
| 41 'type': 'static_library', | |
| 42 'defines': [ | |
| 43 'FT2_BUILD_LIBRARY', | |
| 44 ], | |
| 45 'include_dirs': [ | |
| 46 'freetype/include', | |
| 47 'freetype/include/freetype', | |
| 48 ], | |
| 49 'sources': [ | |
| 50 'freetype/include/freetype/freetype.h', | |
| 51 'freetype/include/freetype/ftmm.h', | |
| 52 'freetype/include/freetype/ftotval.h', | |
| 53 'freetype/include/freetype/ftoutln.h', | |
| 54 'freetype/include/freetype/internal/ftobjs.h', | |
| 55 'freetype/include/freetype/internal/ftstream.h', | |
| 56 'freetype/include/freetype/internal/tttypes.h', | |
| 57 'freetype/include/freetype/tttables.h', | |
| 58 'freetype/include/ft2build.h', | |
| 59 'freetype/src/base/ftbase.c', | |
| 60 'freetype/src/base/ftbase.h', | |
| 61 'freetype/src/base/ftbitmap.c', | |
| 62 'freetype/src/base/ftglyph.c', | |
| 63 'freetype/src/base/ftinit.c', | |
| 64 'freetype/src/base/ftlcdfil.c', | |
| 65 'freetype/src/base/ftmm.c', | |
| 66 'freetype/src/base/ftsystem.c', | |
| 67 'freetype/src/cff/cff.c', | |
| 68 'freetype/src/cff/cffobjs.h', | |
| 69 'freetype/src/cff/cfftypes.h', | |
| 70 'freetype/src/cid/type1cid.c', | |
| 71 'freetype/src/psaux/psaux.c', | |
| 72 'freetype/src/pshinter/pshinter.c', | |
| 73 'freetype/src/psnames/psmodule.c', | |
| 74 'freetype/src/raster/raster.c', | |
| 75 'freetype/src/sfnt/sfnt.c', | |
| 76 'freetype/src/smooth/smooth.c', | |
| 77 'freetype/src/truetype/truetype.c', | |
| 78 'freetype/src/type1/type1.c', | |
| 79 ], | |
| 80 'conditions': [ | |
| 81 ['pdf_use_skia==1', { | |
| 82 'sources': [ | |
| 83 'freetype/src/base/ftfntfmt.c', | |
| 84 'freetype/src/base/ftfstype.c', | |
| 85 'freetype/src/base/fttype1.c', | |
| 86 ], | |
| 87 }], | |
| 88 ['os_posix==1 and clang==0', { | |
| 89 'cflags': [ | |
| 90 # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in | |
| 91 # ftbase.h are unused. GCC needs this flag too. | |
| 92 '-Wno-unused-function', | |
| 93 ], | |
| 94 }], | |
| 95 ], | |
| 96 'variables': { | |
| 97 'clang_warning_flags': [ | |
| 98 # open_face_PS_from_sfnt_stream() and open_face_from_buffer() in | |
| 99 # ftbase.h are unused. | |
| 100 '-Wno-unused-function', | |
| 101 ], | |
| 102 }, | |
| 103 'msvs_disabled_warnings': [ | |
| 104 # Warnings about conversion from 'size_t' to 'long', possible loss of | |
| 105 # data. | |
| 106 4267, | |
| 107 ], | |
| 108 }, | |
| 109 { | |
| 110 'target_name': 'fx_lcms2', | |
| 111 'type': 'static_library', | |
| 112 'sources': [ | |
| 113 'lcms2-2.6/include/lcms2.h', | |
| 114 'lcms2-2.6/include/lcms2_plugin.h', | |
| 115 'lcms2-2.6/src/cmscam02.c', | |
| 116 'lcms2-2.6/src/cmscgats.c', | |
| 117 'lcms2-2.6/src/cmscnvrt.c', | |
| 118 'lcms2-2.6/src/cmserr.c', | |
| 119 'lcms2-2.6/src/cmsgamma.c', | |
| 120 'lcms2-2.6/src/cmsgmt.c', | |
| 121 'lcms2-2.6/src/cmshalf.c', | |
| 122 'lcms2-2.6/src/cmsintrp.c', | |
| 123 'lcms2-2.6/src/cmsio0.c', | |
| 124 'lcms2-2.6/src/cmsio1.c', | |
| 125 'lcms2-2.6/src/cmslut.c', | |
| 126 'lcms2-2.6/src/cmsmd5.c', | |
| 127 'lcms2-2.6/src/cmsmtrx.c', | |
| 128 'lcms2-2.6/src/cmsnamed.c', | |
| 129 'lcms2-2.6/src/cmsopt.c', | |
| 130 'lcms2-2.6/src/cmspack.c', | |
| 131 'lcms2-2.6/src/cmspcs.c', | |
| 132 'lcms2-2.6/src/cmsplugin.c', | |
| 133 'lcms2-2.6/src/cmsps2.c', | |
| 134 'lcms2-2.6/src/cmssamp.c', | |
| 135 'lcms2-2.6/src/cmssm.c', | |
| 136 'lcms2-2.6/src/cmstypes.c', | |
| 137 'lcms2-2.6/src/cmsvirt.c', | |
| 138 'lcms2-2.6/src/cmswtpnt.c', | |
| 139 'lcms2-2.6/src/cmsxform.c', | |
| 140 ], | |
| 141 'conditions': [ | |
| 142 ['os_posix==1', { | |
| 143 'cflags': [ | |
| 144 '-Wno-main', | |
| 145 '-Wno-missing-braces', | |
| 146 '-Wno-unused', | |
| 147 ], | |
| 148 }], | |
| 149 ], | |
| 150 'variables': { | |
| 151 'clang_warning_flags': [ | |
| 152 '-Wno-missing-braces', | |
| 153 # FindPrev() in cmsplugin.c is unused. | |
| 154 '-Wno-unused-function', | |
| 155 ], | |
| 156 }, | |
| 157 }, | |
| 158 { | |
| 159 'target_name': 'libjpeg', | |
| 160 'type': 'static_library', | |
| 161 'sources': [ | |
| 162 'libjpeg/cderror.h', | |
| 163 'libjpeg/cdjpeg.h', | |
| 164 'libjpeg/fpdfapi_jcapimin.c', | |
| 165 'libjpeg/fpdfapi_jcapistd.c', | |
| 166 'libjpeg/fpdfapi_jccoefct.c', | |
| 167 'libjpeg/fpdfapi_jccolor.c', | |
| 168 'libjpeg/fpdfapi_jcdctmgr.c', | |
| 169 'libjpeg/fpdfapi_jchuff.c', | |
| 170 'libjpeg/fpdfapi_jcinit.c', | |
| 171 'libjpeg/fpdfapi_jcmainct.c', | |
| 172 'libjpeg/fpdfapi_jcmarker.c', | |
| 173 'libjpeg/fpdfapi_jcmaster.c', | |
| 174 'libjpeg/fpdfapi_jcomapi.c', | |
| 175 'libjpeg/fpdfapi_jcparam.c', | |
| 176 'libjpeg/fpdfapi_jcphuff.c', | |
| 177 'libjpeg/fpdfapi_jcprepct.c', | |
| 178 'libjpeg/fpdfapi_jcsample.c', | |
| 179 'libjpeg/fpdfapi_jctrans.c', | |
| 180 'libjpeg/fpdfapi_jdapimin.c', | |
| 181 'libjpeg/fpdfapi_jdapistd.c', | |
| 182 'libjpeg/fpdfapi_jdcoefct.c', | |
| 183 'libjpeg/fpdfapi_jdcolor.c', | |
| 184 'libjpeg/fpdfapi_jddctmgr.c', | |
| 185 'libjpeg/fpdfapi_jdhuff.c', | |
| 186 'libjpeg/fpdfapi_jdinput.c', | |
| 187 'libjpeg/fpdfapi_jdmainct.c', | |
| 188 'libjpeg/fpdfapi_jdmarker.c', | |
| 189 'libjpeg/fpdfapi_jdmaster.c', | |
| 190 'libjpeg/fpdfapi_jdmerge.c', | |
| 191 'libjpeg/fpdfapi_jdphuff.c', | |
| 192 'libjpeg/fpdfapi_jdpostct.c', | |
| 193 'libjpeg/fpdfapi_jdsample.c', | |
| 194 'libjpeg/fpdfapi_jdtrans.c', | |
| 195 'libjpeg/fpdfapi_jerror.c', | |
| 196 'libjpeg/fpdfapi_jfdctfst.c', | |
| 197 'libjpeg/fpdfapi_jfdctint.c', | |
| 198 'libjpeg/fpdfapi_jidctfst.c', | |
| 199 'libjpeg/fpdfapi_jidctint.c', | |
| 200 'libjpeg/fpdfapi_jidctred.c', | |
| 201 'libjpeg/fpdfapi_jmemmgr.c', | |
| 202 'libjpeg/fpdfapi_jmemnobs.c', | |
| 203 'libjpeg/fpdfapi_jutils.c', | |
| 204 'libjpeg/jchuff.h', | |
| 205 'libjpeg/jconfig.h', | |
| 206 'libjpeg/jdct.h', | |
| 207 'libjpeg/jdhuff.h', | |
| 208 'libjpeg/jerror.h', | |
| 209 'libjpeg/jinclude.h', | |
| 210 'libjpeg/jmemsys.h', | |
| 211 'libjpeg/jmorecfg.h', | |
| 212 'libjpeg/jpegint.h', | |
| 213 'libjpeg/jpeglib.h', | |
| 214 'libjpeg/jversion.h', | |
| 215 'libjpeg/transupp.h', | |
| 216 ], | |
| 217 'conditions': [ | |
| 218 ['os_posix==1', { | |
| 219 'cflags': [ | |
| 220 '-Wno-main', | |
| 221 '-Wno-missing-braces', | |
| 222 '-Wno-shift-negative-value', | |
| 223 '-Wno-unused', | |
| 224 ], | |
| 225 }], | |
| 226 ], | |
| 227 'variables': { | |
| 228 'clang_warning_flags': [ | |
| 229 # Avoid warning for undefined behaviour. | |
| 230 '-Wno-shift-negative-value', | |
| 231 ], | |
| 232 }, | |
| 233 'msvs_disabled_warnings': [ | |
| 234 # Warnings about conversion from 'size_t' to 'long', possible loss of | |
| 235 # data. | |
| 236 4267, | |
| 237 ], | |
| 238 }, | |
| 239 { | |
| 240 'target_name': 'fx_libopenjpeg', | |
| 241 'type': 'static_library', | |
| 242 'sources': [ | |
| 243 'libopenjpeg20/bio.c', | |
| 244 'libopenjpeg20/cio.c', | |
| 245 'libopenjpeg20/dwt.c', | |
| 246 'libopenjpeg20/event.c', | |
| 247 'libopenjpeg20/function_list.c', | |
| 248 'libopenjpeg20/image.c', | |
| 249 'libopenjpeg20/invert.c', | |
| 250 'libopenjpeg20/j2k.c', | |
| 251 'libopenjpeg20/jp2.c', | |
| 252 'libopenjpeg20/mct.c', | |
| 253 'libopenjpeg20/mqc.c', | |
| 254 'libopenjpeg20/openjpeg.c', | |
| 255 'libopenjpeg20/opj_clock.c', | |
| 256 'libopenjpeg20/pi.c', | |
| 257 'libopenjpeg20/raw.c', | |
| 258 'libopenjpeg20/t1.c', | |
| 259 'libopenjpeg20/t2.c', | |
| 260 'libopenjpeg20/tcd.c', | |
| 261 'libopenjpeg20/tgt.c', | |
| 262 ], | |
| 263 'msvs_disabled_warnings': [ | |
| 264 4018, | |
| 265 ], | |
| 266 }, | |
| 267 { | |
| 268 'target_name': 'fx_lpng', | |
| 269 'type': 'static_library', | |
| 270 'sources': [ | |
| 271 'libpng16/png.c', | |
| 272 'libpng16/png.h', | |
| 273 'libpng16/pngconf.h', | |
| 274 'libpng16/pngdebug.h', | |
| 275 'libpng16/pngerror.c', | |
| 276 'libpng16/pngget.c', | |
| 277 'libpng16/pnginfo.h', | |
| 278 'libpng16/pnglibconf.h', | |
| 279 'libpng16/pngmem.c', | |
| 280 'libpng16/pngpread.c', | |
| 281 'libpng16/pngprefix.h', | |
| 282 'libpng16/pngpriv.h', | |
| 283 'libpng16/pngread.c', | |
| 284 'libpng16/pngrio.c', | |
| 285 'libpng16/pngrtran.c', | |
| 286 'libpng16/pngrutil.c', | |
| 287 'libpng16/pngset.c', | |
| 288 'libpng16/pngstruct.h', | |
| 289 'libpng16/pngtrans.c', | |
| 290 'libpng16/pngwio.c', | |
| 291 'libpng16/pngwrite.c', | |
| 292 'libpng16/pngwtran.c', | |
| 293 'libpng16/pngwutil.c', | |
| 294 ], | |
| 295 'msvs_disabled_warnings': [ | |
| 296 4146, # Unary minus applied to unsigned type. | |
| 297 # Warnings about conversion from 'size_t' to 'long', possible loss of | |
| 298 # data. | |
| 299 4267, | |
| 300 ], | |
| 301 'conditions': [ | |
| 302 # SSE optimizations | |
| 303 [ 'target_arch=="ia32" or target_arch=="x64"', { | |
| 304 'defines': [ | |
| 305 'PNG_INTEL_SSE_OPT=1', | |
| 306 ], | |
| 307 'sources': [ | |
| 308 'libpng16/contrib/intel/intel_init.c', | |
| 309 'libpng16/contrib/intel/filter_sse2_intrinsics.c', | |
| 310 ], | |
| 311 }], | |
| 312 | |
| 313 # ARM optimizations | |
| 314 [ '(target_arch=="arm" or target_arch=="arm64") and OS!="ios" and arm_ne
on==1', { | |
| 315 'defines': [ | |
| 316 'PNG_ARM_NEON_OPT=2', | |
| 317 'PNG_ARM_NEON_IMPLEMENTATION=1', | |
| 318 ], | |
| 319 'sources': [ | |
| 320 'libpng16/arm/arm_init.c', | |
| 321 'libpng16/arm/filter_neon_intrinsics.c', | |
| 322 ], | |
| 323 }], | |
| 324 ], | |
| 325 }, | |
| 326 { | |
| 327 'target_name': 'fx_zlib', | |
| 328 'type': 'static_library', | |
| 329 'sources': [ | |
| 330 'zlib_v128/adler32.c', | |
| 331 'zlib_v128/compress.c', | |
| 332 'zlib_v128/crc32.c', | |
| 333 'zlib_v128/deflate.c', | |
| 334 'zlib_v128/gzclose.c', | |
| 335 'zlib_v128/gzlib.c', | |
| 336 'zlib_v128/gzread.c', | |
| 337 'zlib_v128/gzwrite.c', | |
| 338 'zlib_v128/infback.c', | |
| 339 'zlib_v128/inffast.c', | |
| 340 'zlib_v128/inflate.c', | |
| 341 'zlib_v128/inftrees.c', | |
| 342 'zlib_v128/trees.c', | |
| 343 'zlib_v128/uncompr.c', | |
| 344 'zlib_v128/zutil.c', | |
| 345 ], | |
| 346 'conditions': [ | |
| 347 ['os_posix==1', { | |
| 348 'cflags': [ | |
| 349 # TODO(dsinclair): Remove if fixed upstream. https://crbug.com/50771
2 | |
| 350 '-Wno-shift-negative-value', | |
| 351 ], | |
| 352 }], | |
| 353 ['OS == "win"', { | |
| 354 'direct_dependent_settings': { | |
| 355 'include_dirs': [ | |
| 356 'zlib_v128', | |
| 357 ], | |
| 358 } | |
| 359 }], | |
| 360 ], | |
| 361 'variables': { | |
| 362 'clang_warning_flags': [ | |
| 363 # Avoid warning for undefined behaviour. https://crbug.com/507712 | |
| 364 '-Wno-shift-negative-value', | |
| 365 ] | |
| 366 }, | |
| 367 }, | |
| 368 { | |
| 369 'target_name': 'pdfium_base', | |
| 370 'type': 'none', | |
| 371 'sources': [ | |
| 372 'base/logging.h', | |
| 373 'base/macros.h', | |
| 374 'base/numerics/safe_conversions.h', | |
| 375 'base/numerics/safe_conversions_impl.h', | |
| 376 'base/numerics/safe_math.h', | |
| 377 'base/numerics/safe_math_impl.h', | |
| 378 'base/stl_util.h', | |
| 379 ], | |
| 380 }, | |
| 381 ], | |
| 382 'conditions': [ | |
| 383 ['pdf_enable_xfa==1', { | |
| 384 'targets': [ | |
| 385 { | |
| 386 'target_name': 'fx_tiff', | |
| 387 'type': 'static_library', | |
| 388 'sources': [ | |
| 389 'libtiff/tiffiop.h', | |
| 390 'libtiff/tiffvers.h', | |
| 391 'libtiff/tif_aux.c', | |
| 392 'libtiff/tif_close.c', | |
| 393 'libtiff/tif_codec.c', | |
| 394 'libtiff/tif_color.c', | |
| 395 'libtiff/tif_compress.c', | |
| 396 'libtiff/tif_dir.c', | |
| 397 'libtiff/tif_dirinfo.c', | |
| 398 'libtiff/tif_dirread.c', | |
| 399 'libtiff/tif_dirwrite.c', | |
| 400 'libtiff/tif_dumpmode.c', | |
| 401 'libtiff/tif_error.c', | |
| 402 'libtiff/tif_extension.c', | |
| 403 'libtiff/tif_fax3.c', | |
| 404 'libtiff/tif_fax3sm.c', | |
| 405 'libtiff/tif_flush.c', | |
| 406 'libtiff/tif_getimage.c', | |
| 407 'libtiff/tif_jpeg.c', | |
| 408 'libtiff/tif_luv.c', | |
| 409 'libtiff/tif_lzw.c', | |
| 410 'libtiff/tif_next.c', | |
| 411 'libtiff/tif_ojpeg.c', | |
| 412 'libtiff/tif_open.c', | |
| 413 'libtiff/tif_packbits.c', | |
| 414 'libtiff/tif_pixarlog.c', | |
| 415 'libtiff/tif_predict.c', | |
| 416 'libtiff/tif_print.c', | |
| 417 'libtiff/tif_read.c', | |
| 418 'libtiff/tif_strip.c', | |
| 419 'libtiff/tif_swab.c', | |
| 420 'libtiff/tif_thunder.c', | |
| 421 'libtiff/tif_tile.c', | |
| 422 'libtiff/tif_version.c', | |
| 423 'libtiff/tif_warning.c', | |
| 424 'libtiff/tif_write.c', | |
| 425 'libtiff/tif_zip.c', | |
| 426 ], | |
| 427 'conditions': [ | |
| 428 ['OS=="win"', { | |
| 429 'defines!': [ | |
| 430 # Need to undefine the macro since it is redefined in | |
| 431 # tif_ojpeg.c and tif_jpeg.c. | |
| 432 'WIN32_LEAN_AND_MEAN', | |
| 433 ], | |
| 434 }], | |
| 435 ], | |
| 436 }, | |
| 437 ], | |
| 438 }], | |
| 439 ['pdf_use_skia!=1', { | |
| 440 'targets': [ | |
| 441 { | |
| 442 'target_name': 'fx_agg', | |
| 443 'type': 'static_library', | |
| 444 'sources': [ | |
| 445 'agg23/agg_basics.h', | |
| 446 'agg23/agg_clip_liang_barsky.h', | |
| 447 'agg23/agg_conv_dash.h', | |
| 448 'agg23/agg_conv_stroke.h', | |
| 449 'agg23/agg_curves.cpp', | |
| 450 'agg23/agg_curves.h', | |
| 451 'agg23/agg_path_storage.cpp', | |
| 452 'agg23/agg_path_storage.h', | |
| 453 'agg23/agg_rasterizer_scanline_aa.cpp', | |
| 454 'agg23/agg_rasterizer_scanline_aa.h', | |
| 455 'agg23/agg_renderer_scanline.h', | |
| 456 'agg23/agg_rendering_buffer.h', | |
| 457 'agg23/agg_scanline_u.h', | |
| 458 'agg23/agg_vcgen_dash.cpp', | |
| 459 'agg23/agg_vcgen_stroke.cpp', | |
| 460 ], | |
| 461 'conditions': [ | |
| 462 ['os_posix==1', { | |
| 463 # library contains several enum vs non-enum conditionals. | |
| 464 'cflags': [ '-Wno-extra', ], | |
| 465 }], | |
| 466 ], | |
| 467 'variables': { | |
| 468 'clang_warning_flags': [ | |
| 469 # calc_butt_cap() in agg_vcgen_stroke.cpp is unused. | |
| 470 '-Wno-unused-function', | |
| 471 ], | |
| 472 }, | |
| 473 }, | |
| 474 ], | |
| 475 }], | |
| 476 ], | |
| 477 } | |
| OLD | NEW |