1# Copyright 2015 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 # TODO(thakis): Enable this, pdfium:29 8 #'chromium_code': 1, 9 'pdf_use_skia%': 0, 10 'pdf_enable_v8%': 1, 11 'pdf_enable_xfa%': 0, # Set to 1 by standalone.gypi in a standalone build. 12 'conditions': [ 13 ['OS=="linux"', { 14 'bundle_freetype%': 0, 15 }, { # On Android there's no system FreeType. On Windows and Mac, only a 16 # few methods are used from it. 17 'bundle_freetype%': 1, 18 }], 19 ], 20 }, 21 'target_defaults': { 22 'defines' : [ 23 'OPJ_STATIC', 24 'PNG_PREFIX', 25 'PNGPREFIX_H', 26 'PNG_USE_READ_MACROS', 27 'V8_DEPRECATION_WARNINGS', 28 '_CRT_SECURE_NO_WARNINGS', 29 ], 30 'include_dirs': [ 31 # This is implicit in GN. 32 '<(DEPTH)', 33 '.', 34 'third_party/freetype/include', 35 'third_party/freetype/include/freetype', 36 ], 37 'conditions': [ 38 ['pdf_use_skia==1', { 39 'defines': ['_SKIA_SUPPORT_'], 40 }], 41 ['pdf_enable_v8==1', { 42 'defines': ['PDF_ENABLE_V8'], 43 }], 44 ['pdf_enable_xfa==1', { 45 'defines': ['PDF_ENABLE_XFA'], 46 }], 47 ['OS=="linux"', { 48 'conditions': [ 49 ['target_arch=="x64"', { 50 'defines' : [ '_FX_CPU_=_FX_X64_', ], 51 'cflags': [ '-fPIC', ], 52 }], 53 ['target_arch=="ia32"', { 54 'defines' : [ '_FX_CPU_=_FX_X86_', ], 55 }], 56 ], 57 }], 58 ], 59 'msvs_disabled_warnings': [ 60 4005, 4018, 4146, 4333, 4345, 4267, 61 # TODO(thestig): Fix all instances, remove this, pdfium:29 62 4245, 4310, 4389, 4701, 4702, 4706, 4800, 63 ], 64 'variables': { 65 'clang_warning_flags': [ 66 # TODO(thestig): Fix all instances, remove this, pdfium:29 67 '-Wno-sign-compare', 68 ], 69 # Make sure Chromium's build/common.gypi doesn't re-add the flag on linux. 70 'cflags_cc!': [ '-Wsign-compare' ], 71 }, 72 }, 73 'targets': [ 74 { 75 'target_name': 'pdfium', 76 'type': 'static_library', 77 'dependencies': [ 78 'third_party/third_party.gyp:bigint', 79 'third_party/third_party.gyp:pdfium_base', 80 'fdrm', 81 'fpdfdoc', 82 'fpdfapi', 83 'fpdftext', 84 'formfiller', 85 'fxcodec', 86 'fxcrt', 87 'fxedit', 88 'fxge', 89 'javascript', 90 'pdfwindow', 91 ], 92 'sources': [ 93 'fpdfsdk/include/fsdk_actionhandler.h', 94 'fpdfsdk/include/fsdk_annothandler.h', 95 'fpdfsdk/include/fsdk_baseannot.h', 96 'fpdfsdk/include/fsdk_baseform.h', 97 'fpdfsdk/src/fpdfdoc.cpp', 98 'fpdfsdk/src/fpdfeditimg.cpp', 99 'fpdfsdk/src/fpdfeditpage.cpp', 100 'fpdfsdk/src/fpdfformfill.cpp', 101 'fpdfsdk/src/fpdfppo.cpp', 102 'fpdfsdk/src/fpdfsave.cpp', 103 'fpdfsdk/src/fpdftext.cpp', 104 'fpdfsdk/src/fpdfview.cpp', 105 'fpdfsdk/src/fpdf_dataavail.cpp', 106 'fpdfsdk/src/fpdf_ext.cpp', 107 'fpdfsdk/src/fpdf_flatten.cpp', 108 'fpdfsdk/src/fpdf_progressive.cpp', 109 'fpdfsdk/src/fpdf_searchex.cpp', 110 'fpdfsdk/src/fpdf_sysfontinfo.cpp', 111 'fpdfsdk/src/fpdf_transformpage.cpp', 112 'fpdfsdk/src/fsdk_actionhandler.cpp', 113 'fpdfsdk/src/fsdk_annothandler.cpp', 114 'fpdfsdk/src/fsdk_baseannot.cpp', 115 'fpdfsdk/src/fsdk_baseform.cpp', 116 'fpdfsdk/src/fsdk_mgr.cpp', 117 'fpdfsdk/src/fsdk_rendercontext.cpp', 118 'public/fpdf_dataavail.h', 119 'public/fpdf_doc.h', 120 'public/fpdf_edit.h', 121 'public/fpdf_ext.h', 122 'public/fpdf_flatten.h', 123 'public/fpdf_formfill.h', 124 'public/fpdf_fwlevent.h', 125 'public/fpdf_ppo.h', 126 'public/fpdf_progressive.h', 127 'public/fpdf_save.h', 128 'public/fpdf_searchex.h', 129 'public/fpdf_sysfontinfo.h', 130 'public/fpdf_text.h', 131 'public/fpdf_transformpage.h', 132 'public/fpdfview.h', 133 ], 134 'conditions': [ 135 ['pdf_enable_xfa==1', { 136 'dependencies': [ 137 'fpdfxfa', 138 ], 139 }], 140 ['bundle_freetype==1', { 141 'dependencies': [ 142 'third_party/third_party.gyp:fx_freetype', 143 ], 144 }, { 145 'link_settings': { 146 'libraries': [ 147 '-lfreetype', 148 ], 149 }, 150 }], 151 ], 152 'all_dependent_settings': { 153 'msvs_settings': { 154 'VCLinkerTool': { 155 'AdditionalDependencies': [ 156 'advapi32.lib', 157 'gdi32.lib', 158 'user32.lib', 159 ], 160 }, 161 }, 162 'conditions': [ 163 ['OS=="mac"', { 164 'link_settings': { 165 'libraries': [ 166 '$(SDKROOT)/System/Library/Frameworks/AppKit.framework', 167 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', 168 ], 169 }, 170 }], 171 ], 172 }, 173 }, 174 { 175 'target_name': 'fdrm', 176 'type': 'static_library', 177 'sources': [ 178 'core/include/fdrm/fx_crypt.h', 179 'core/src/fdrm/crypto/fx_crypt.cpp', 180 'core/src/fdrm/crypto/fx_crypt_aes.cpp', 181 'core/src/fdrm/crypto/fx_crypt_sha.cpp', 182 ], 183 }, 184 { 185 'target_name': 'fpdfdoc', 186 'type': 'static_library', 187 'sources': [ 188 'core/include/fpdfdoc/fpdf_ap.h', 189 'core/include/fpdfdoc/fpdf_doc.h', 190 'core/include/fpdfdoc/fpdf_tagged.h', 191 'core/include/fpdfdoc/fpdf_vt.h', 192 'core/src/fpdfdoc/doc_action.cpp', 193 'core/src/fpdfdoc/doc_annot.cpp', 194 'core/src/fpdfdoc/doc_ap.cpp', 195 'core/src/fpdfdoc/doc_basic.cpp', 196 'core/src/fpdfdoc/doc_bookmark.cpp', 197 'core/src/fpdfdoc/doc_form.cpp', 198 'core/src/fpdfdoc/doc_formcontrol.cpp', 199 'core/src/fpdfdoc/doc_formfield.cpp', 200 'core/src/fpdfdoc/doc_link.cpp', 201 'core/src/fpdfdoc/doc_metadata.cpp', 202 'core/src/fpdfdoc/doc_ocg.cpp', 203 'core/src/fpdfdoc/doc_tagged.cpp', 204 'core/src/fpdfdoc/doc_utils.cpp', 205 'core/src/fpdfdoc/doc_utils.h', 206 'core/src/fpdfdoc/doc_viewerPreferences.cpp', 207 'core/src/fpdfdoc/doc_vt.cpp', 208 'core/src/fpdfdoc/doc_vtmodule.cpp', 209 'core/src/fpdfdoc/pdf_vt.h', 210 'core/src/fpdfdoc/tagged_int.h', 211 ], 212 }, 213 { 214 'target_name': 'fpdfapi', 215 'type': 'static_library', 216 'sources': [ 217 'core/include/fpdfapi/fpdf_module.h', 218 'core/include/fpdfapi/fpdf_objects.h', 219 'core/include/fpdfapi/fpdf_page.h', 220 'core/include/fpdfapi/fpdf_pageobj.h', 221 'core/include/fpdfapi/fpdf_parser.h', 222 'core/include/fpdfapi/fpdf_render.h', 223 'core/include/fpdfapi/fpdf_resource.h', 224 'core/include/fpdfapi/fpdf_serial.h', 225 'core/src/fpdfapi/fpdf_basic_module.cpp', 226 'core/src/fpdfapi/fpdf_cmaps/cmap_int.h', 227 'core/src/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp', 228 'core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp', 229 'core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp', 230 'core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp', 231 'core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp', 232 'core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp', 233 'core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp', 234 'core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-V_0.cpp', 235 'core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-H_0.cpp', 236 'core/src/fpdfapi/fpdf_cmaps/CNS1/ETenms-B5-V_0.cpp', 237 'core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-H_5.cpp', 238 'core/src/fpdfapi/fpdf_cmaps/CNS1/HKscs-B5-V_5.cpp', 239 'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp', 240 'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp', 241 'core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp', 242 'core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp', 243 'core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp', 244 'core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp', 245 'core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp', 246 'core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp', 247 'core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp', 248 'core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-V_2.cpp', 249 'core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-H_5.cpp', 250 'core/src/fpdfapi/fpdf_cmaps/GB1/GBK2K-V_5.cpp', 251 'core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-H_2.cpp', 252 'core/src/fpdfapi/fpdf_cmaps/GB1/GBKp-EUC-V_2.cpp', 253 'core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-H_0.cpp', 254 'core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp', 255 'core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp', 256 'core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp', 257 'core/src/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp', 258 'core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp', 259 'core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp', 260 'core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-H_2.cpp', 261 'core/src/fpdfapi/fpdf_cmaps/Japan1/90msp-RKSJ-V_2.cpp', 262 'core/src/fpdfapi/fpdf_cmaps/Japan1/90pv-RKSJ-H_1.cpp', 263 'core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp', 264 'core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp', 265 'core/src/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp', 266 'core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp', 267 'core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp', 268 'core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp', 269 'core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp', 270 'core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-V_2.cpp', 271 'core/src/fpdfapi/fpdf_cmaps/Japan1/H_1.cpp', 272 'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-H_4.cpp', 273 'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-HW-V_4.cpp', 274 'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp', 275 'core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp', 276 'core/src/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp', 277 'core/src/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp', 278 'core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp', 279 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp', 280 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp', 281 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp', 282 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-V_1.cpp', 283 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-H_1.cpp', 284 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-V_1.cpp', 285 'core/src/fpdfapi/fpdf_cmaps/Korea1/KSCpc-EUC-H_0.cpp', 286 'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp', 287 'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp', 288 'core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp', 289 'core/src/fpdfapi/fpdf_edit/editint.h', 290 'core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp', 291 'core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp', 292 'core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp', 293 'core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp', 294 'core/src/fpdfapi/fpdf_font/font_int.h', 295 'core/src/fpdfapi/fpdf_font/fpdf_font.cpp', 296 'core/src/fpdfapi/fpdf_font/fpdf_font_charset.cpp', 297 'core/src/fpdfapi/fpdf_font/fpdf_font_cid.cpp', 298 'core/src/fpdfapi/fpdf_font/ttgsubtable.cpp', 299 'core/src/fpdfapi/fpdf_font/ttgsubtable.h', 300 'core/src/fpdfapi/fpdf_page/fpdf_page.cpp', 301 'core/src/fpdfapi/fpdf_page/fpdf_page_colors.cpp', 302 'core/src/fpdfapi/fpdf_page/fpdf_page_doc.cpp', 303 'core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp', 304 'core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp', 305 'core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp', 306 'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp', 307 'core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp', 308 'core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp', 309 'core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp', 310 'core/src/fpdfapi/fpdf_page/pageint.h', 311 'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp', 312 'core/src/fpdfapi/fpdf_parser/fpdf_parser_document.cpp', 313 'core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp', 314 'core/src/fpdfapi/fpdf_parser/fpdf_parser_fdf.cpp', 315 'core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp', 316 'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp', 317 'core/src/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp', 318 'core/src/fpdfapi/fpdf_parser/parser_int.h', 319 'core/src/fpdfapi/fpdf_render/fpdf_render.cpp', 320 'core/src/fpdfapi/fpdf_render/fpdf_render_cache.cpp', 321 'core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp', 322 'core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp', 323 'core/src/fpdfapi/fpdf_render/fpdf_render_pattern.cpp', 324 'core/src/fpdfapi/fpdf_render/fpdf_render_text.cpp', 325 'core/src/fpdfapi/fpdf_render/render_int.h', 326 ], 327 }, 328 { 329 'target_name': 'fpdftext', 330 'type': 'static_library', 331 'sources': [ 332 'core/include/fpdftext/fpdf_text.h', 333 'core/src/fpdftext/fpdf_text.cpp', 334 'core/src/fpdftext/fpdf_text_int.cpp', 335 'core/src/fpdftext/fpdf_text_search.cpp', 336 'core/src/fpdftext/text_int.h', 337 'core/src/fpdftext/txtproc.h', 338 'core/src/fpdftext/unicodenormalization.cpp', 339 'core/src/fpdftext/unicodenormalizationdata.cpp', 340 'core/src/fpdftext/unicodenormalizationdata.h', 341 ], 342 }, 343 { 344 'target_name': 'fxcodec', 345 'type': 'static_library', 346 'dependencies': [ 347 '<(libjpeg_gyp_path):libjpeg', 348 'third_party/third_party.gyp:fx_lcms2', 349 'third_party/third_party.gyp:fx_libopenjpeg', 350 'third_party/third_party.gyp:fx_zlib', 351 ], 352 'sources': [ 353 'core/include/fxcodec/fx_codec.h', 354 'core/include/fxcodec/fx_codec_def.h', 355 'core/include/fxcodec/fx_codec_flate.h', 356 'core/src/fxcodec/codec/codec_int.h', 357 'core/src/fxcodec/codec/fx_codec.cpp', 358 'core/src/fxcodec/codec/fx_codec_fax.cpp', 359 'core/src/fxcodec/codec/fx_codec_flate.cpp', 360 'core/src/fxcodec/codec/fx_codec_icc.cpp', 361 'core/src/fxcodec/codec/fx_codec_jbig.cpp', 362 'core/src/fxcodec/codec/fx_codec_jpeg.cpp', 363 'core/src/fxcodec/codec/fx_codec_jpx_opj.cpp', 364 'core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp', 365 'core/src/fxcodec/jbig2/JBig2_ArithDecoder.h', 366 'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp', 367 'core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.h', 368 'core/src/fxcodec/jbig2/JBig2_BitStream.cpp', 369 'core/src/fxcodec/jbig2/JBig2_BitStream.h', 370 'core/src/fxcodec/jbig2/JBig2_Context.cpp', 371 'core/src/fxcodec/jbig2/JBig2_Context.h', 372 'core/src/fxcodec/jbig2/JBig2_Define.h', 373 'core/src/fxcodec/jbig2/JBig2_GrdProc.cpp', 374 'core/src/fxcodec/jbig2/JBig2_GrdProc.h', 375 'core/src/fxcodec/jbig2/JBig2_GrrdProc.cpp', 376 'core/src/fxcodec/jbig2/JBig2_GrrdProc.h', 377 'core/src/fxcodec/jbig2/JBig2_GsidProc.cpp', 378 'core/src/fxcodec/jbig2/JBig2_GsidProc.h', 379 'core/src/fxcodec/jbig2/JBig2_HtrdProc.cpp', 380 'core/src/fxcodec/jbig2/JBig2_HtrdProc.h', 381 'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.cpp', 382 'core/src/fxcodec/jbig2/JBig2_HuffmanDecoder.h', 383 'core/src/fxcodec/jbig2/JBig2_HuffmanTable.cpp', 384 'core/src/fxcodec/jbig2/JBig2_HuffmanTable.h', 385 'core/src/fxcodec/jbig2/JBig2_HuffmanTable_Standard.h', 386 'core/src/fxcodec/jbig2/JBig2_Image.cpp', 387 'core/src/fxcodec/jbig2/JBig2_Image.h', 388 'core/src/fxcodec/jbig2/JBig2_List.h', 389 'core/src/fxcodec/jbig2/JBig2_Page.h', 390 'core/src/fxcodec/jbig2/JBig2_PatternDict.cpp', 391 'core/src/fxcodec/jbig2/JBig2_PatternDict.h', 392 'core/src/fxcodec/jbig2/JBig2_PddProc.cpp', 393 'core/src/fxcodec/jbig2/JBig2_PddProc.h', 394 'core/src/fxcodec/jbig2/JBig2_SddProc.cpp', 395 'core/src/fxcodec/jbig2/JBig2_SddProc.h', 396 'core/src/fxcodec/jbig2/JBig2_Segment.cpp', 397 'core/src/fxcodec/jbig2/JBig2_Segment.h', 398 'core/src/fxcodec/jbig2/JBig2_SymbolDict.cpp', 399 'core/src/fxcodec/jbig2/JBig2_SymbolDict.h', 400 'core/src/fxcodec/jbig2/JBig2_TrdProc.cpp', 401 'core/src/fxcodec/jbig2/JBig2_TrdProc.h', 402 ], 403 'msvs_settings': { 404 'VCCLCompilerTool': { 405 # Unresolved warnings in fx_codec_jpx_opj.cpp 406 # https://code.google.com/p/pdfium/issues/detail?id=100 407 'WarnAsError': 'false', 408 }, 409 }, 410 'conditions': [ 411 ['pdf_enable_xfa==1', { 412 'dependencies': [ 413 'third_party/third_party.gyp:fx_lpng', 414 'third_party/third_party.gyp:fx_tiff', 415 ], 416 'sources': [ 417 'core/src/fxcodec/codec/fx_codec_bmp.cpp', 418 'core/src/fxcodec/codec/fx_codec_gif.cpp', 419 'core/src/fxcodec/codec/fx_codec_png.cpp', 420 'core/src/fxcodec/codec/fx_codec_progress.cpp', 421 'core/src/fxcodec/codec/fx_codec_progress.h', 422 'core/src/fxcodec/codec/fx_codec_tiff.cpp', 423 'core/src/fxcodec/lbmp/fx_bmp.cpp', 424 'core/src/fxcodec/lbmp/fx_bmp.h', 425 'core/src/fxcodec/lgif/fx_gif.cpp', 426 'core/src/fxcodec/lgif/fx_gif.h', 427 ], 428 }], 429 ['os_posix==1', { 430 # core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int 431 # conversion to check that an address is 16-bit aligned (benign). 432 'cflags_c': [ '-Wno-pointer-to-int-cast' ], 433 }], 434 ], 435 }, 436 { 437 'target_name': 'fxcrt', 438 'type': 'static_library', 439 'sources': [ 440 'core/include/fxcrt/fx_basic.h', 441 'core/include/fxcrt/fx_bidi.h', 442 'core/include/fxcrt/fx_coordinates.h', 443 'core/include/fxcrt/fx_ext.h', 444 'core/include/fxcrt/fx_memory.h', 445 'core/include/fxcrt/fx_safe_types.h', 446 'core/include/fxcrt/fx_stream.h', 447 'core/include/fxcrt/fx_string.h', 448 'core/include/fxcrt/fx_system.h', 449 'core/include/fxcrt/fx_ucd.h', 450 'core/include/fxcrt/fx_xml.h', 451 'core/src/fxcrt/extension.h', 452 'core/src/fxcrt/fxcrt_platforms.cpp', 453 'core/src/fxcrt/fxcrt_platforms.h', 454 'core/src/fxcrt/fxcrt_posix.cpp', 455 'core/src/fxcrt/fxcrt_posix.h', 456 'core/src/fxcrt/fxcrt_windows.cpp', 457 'core/src/fxcrt/fxcrt_windows.h', 458 'core/src/fxcrt/fx_basic_array.cpp', 459 'core/src/fxcrt/fx_basic_bstring.cpp', 460 'core/src/fxcrt/fx_basic_buffer.cpp', 461 'core/src/fxcrt/fx_basic_coords.cpp', 462 'core/src/fxcrt/fx_basic_gcc.cpp', 463 'core/src/fxcrt/fx_basic_list.cpp', 464 'core/src/fxcrt/fx_basic_maps.cpp', 465 'core/src/fxcrt/fx_basic_memmgr.cpp', 466 'core/src/fxcrt/fx_basic_plex.cpp', 467 'core/src/fxcrt/fx_basic_utf.cpp', 468 'core/src/fxcrt/fx_basic_util.cpp', 469 'core/src/fxcrt/fx_basic_wstring.cpp', 470 'core/src/fxcrt/fx_bidi.cpp', 471 'core/src/fxcrt/fx_extension.cpp', 472 'core/src/fxcrt/fx_ucddata.cpp', 473 'core/src/fxcrt/fx_unicode.cpp', 474 'core/src/fxcrt/fx_xml_composer.cpp', 475 'core/src/fxcrt/fx_xml_parser.cpp', 476 'core/src/fxcrt/plex.h', 477 'core/src/fxcrt/xml_int.h', 478 ], 479 'conditions': [ 480 ['pdf_enable_xfa==1', { 481 'sources': [ 482 'core/include/fxcrt/fx_arb.h', 483 'core/src/fxcrt/fx_arabic.cpp', 484 'core/src/fxcrt/fx_arabic.h', 485 ], 486 }], 487 ], 488 }, 489 { 490 'target_name': 'fxge', 491 'type': 'static_library', 492 'dependencies': [ 493 'third_party/third_party.gyp:fx_agg', 494 ], 495 'sources': [ 496 'core/include/fxge/fpf.h', 497 'core/include/fxge/fx_dib.h', 498 'core/include/fxge/fx_font.h', 499 'core/include/fxge/fx_freetype.h', 500 'core/include/fxge/fx_ge.h', 501 'core/include/fxge/fx_ge_apple.h', 502 'core/include/fxge/fx_ge_win32.h', 503 'core/src/fxge/agg/include/fx_agg_driver.h', 504 'core/src/fxge/agg/src/fx_agg_driver.cpp', 505 'core/src/fxge/android/fpf_skiafont.cpp', 506 'core/src/fxge/android/fpf_skiafont.h', 507 'core/src/fxge/android/fpf_skiafontmgr.cpp', 508 'core/src/fxge/android/fpf_skiafontmgr.h', 509 'core/src/fxge/android/fpf_skiamodule.cpp', 510 'core/src/fxge/android/fpf_skiamodule.h', 511 'core/src/fxge/android/fx_android_font.cpp', 512 'core/src/fxge/android/fx_android_font.h', 513 'core/src/fxge/android/fx_android_imp.cpp', 514 'core/src/fxge/android/fx_fpf.h', 515 'core/src/fxge/apple/apple_int.h', 516 'core/src/fxge/apple/fx_apple_platform.cpp', 517 'core/src/fxge/apple/fx_mac_imp.cpp', 518 'core/src/fxge/apple/fx_quartz_device.cpp', 519 'core/src/fxge/dib/dib_int.h', 520 'core/src/fxge/dib/fx_dib_composite.cpp', 521 'core/src/fxge/dib/fx_dib_convert.cpp', 522 'core/src/fxge/dib/fx_dib_engine.cpp', 523 'core/src/fxge/dib/fx_dib_main.cpp', 524 'core/src/fxge/dib/fx_dib_transform.cpp', 525 'core/src/fxge/fontdata/chromefontdata/chromefontdata.h', 526 'core/src/fxge/fontdata/chromefontdata/FoxitDingbats.c', 527 'core/src/fxge/fontdata/chromefontdata/FoxitFixed.c', 528 'core/src/fxge/fontdata/chromefontdata/FoxitFixedBold.c', 529 'core/src/fxge/fontdata/chromefontdata/FoxitFixedBoldItalic.c', 530 'core/src/fxge/fontdata/chromefontdata/FoxitFixedItalic.c', 531 'core/src/fxge/fontdata/chromefontdata/FoxitSans.c', 532 'core/src/fxge/fontdata/chromefontdata/FoxitSansBold.c', 533 'core/src/fxge/fontdata/chromefontdata/FoxitSansBoldItalic.c', 534 'core/src/fxge/fontdata/chromefontdata/FoxitSansItalic.c', 535 'core/src/fxge/fontdata/chromefontdata/FoxitSansMM.c', 536 'core/src/fxge/fontdata/chromefontdata/FoxitSerif.c', 537 'core/src/fxge/fontdata/chromefontdata/FoxitSerifBold.c', 538 'core/src/fxge/fontdata/chromefontdata/FoxitSerifBoldItalic.c', 539 'core/src/fxge/fontdata/chromefontdata/FoxitSerifItalic.c', 540 'core/src/fxge/fontdata/chromefontdata/FoxitSerifMM.c', 541 'core/src/fxge/fontdata/chromefontdata/FoxitSymbol.c', 542 'core/src/fxge/freetype/fx_freetype.c', 543 'core/src/fxge/ge/fx_ge.cpp', 544 'core/src/fxge/ge/fx_ge_device.cpp', 545 'core/src/fxge/ge/fx_ge_font.cpp', 546 'core/src/fxge/ge/fx_ge_fontmap.cpp', 547 'core/src/fxge/ge/fx_ge_linux.cpp', 548 'core/src/fxge/ge/fx_ge_path.cpp', 549 'core/src/fxge/ge/fx_ge_ps.cpp', 550 'core/src/fxge/ge/fx_ge_text.cpp', 551 'core/src/fxge/ge/text_int.h', 552 ], 553 'variables': { 554 'clang_warning_flags': [ 555 # http://code.google.com/p/pdfium/issues/detail?id=188 556 '-Wno-switch', 557 ], 558 }, 559 'conditions': [ 560 ['pdf_use_skia==1', { 561 'sources': [ 562 'core/src/fxge/skia/fx_skia_blitter_new.cpp', 563 'core/src/fxge/skia/fx_skia_device.cpp', 564 ], 565 'dependencies': [ 566 '<(DEPTH)/skia/skia.gyp:skia', 567 ], 568 'include_dirs': [ 569 '<(DEPTH)/third_party/skia/include/config', 570 '<(DEPTH)/third_party/skia/include/core', 571 '<(DEPTH)/third_party/skia/include/effects', 572 '<(DEPTH)/third_party/skia/include/images', 573 '<(DEPTH)/third_party/skia/include/lazy', 574 '<(DEPTH)/third_party/skia/include/pathops', 575 '<(DEPTH)/third_party/skia/include/utils', 576 '<(DEPTH)/third_party/skia/src/core', 577 ], 578 }], 579 ['OS=="win"', { 580 'defines!': [ 581 'WIN32_LEAN_AND_MEAN' 582 ], 583 'sources': [ 584 'core/src/fxge/win32/dwrite_int.h', 585 'core/src/fxge/win32/fx_win32_device.cpp', 586 'core/src/fxge/win32/fx_win32_dib.cpp', 587 'core/src/fxge/win32/fx_win32_dwrite.cpp', 588 'core/src/fxge/win32/fx_win32_gdipext.cpp', 589 'core/src/fxge/win32/fx_win32_print.cpp', 590 'core/src/fxge/win32/win32_int.h', 591 ], 592 }], 593 ], 594 }, 595 { 596 'target_name': 'fxedit', 597 'type': 'static_library', 598 'sources': [ 599 'fpdfsdk/include/fxedit/fx_edit.h', 600 'fpdfsdk/include/fxedit/fxet_edit.h', 601 'fpdfsdk/include/fxedit/fxet_list.h', 602 'fpdfsdk/src/fxedit/fxet_ap.cpp', 603 'fpdfsdk/src/fxedit/fxet_edit.cpp', 604 'fpdfsdk/src/fxedit/fxet_list.cpp', 605 'fpdfsdk/src/fxedit/fxet_module.cpp', 606 'fpdfsdk/src/fxedit/fxet_pageobjs.cpp', 607 ], 608 }, 609 { 610 'target_name': 'pdfwindow', 611 'type': 'static_library', 612 'sources': [ 613 'fpdfsdk/include/pdfwindow/PWL_Button.h', 614 'fpdfsdk/include/pdfwindow/PWL_Caret.h', 615 'fpdfsdk/include/pdfwindow/PWL_ComboBox.h', 616 'fpdfsdk/include/pdfwindow/PWL_Edit.h', 617 'fpdfsdk/include/pdfwindow/PWL_EditCtrl.h', 618 'fpdfsdk/include/pdfwindow/PWL_FontMap.h', 619 'fpdfsdk/include/pdfwindow/PWL_Icon.h', 620 'fpdfsdk/include/pdfwindow/PWL_IconList.h', 621 'fpdfsdk/include/pdfwindow/PWL_Label.h', 622 'fpdfsdk/include/pdfwindow/PWL_ListBox.h', 623 'fpdfsdk/include/pdfwindow/PWL_ListCtrl.h', 624 'fpdfsdk/include/pdfwindow/PWL_Note.h', 625 'fpdfsdk/include/pdfwindow/PWL_ScrollBar.h', 626 'fpdfsdk/include/pdfwindow/PWL_Signature.h', 627 'fpdfsdk/include/pdfwindow/PWL_SpecialButton.h', 628 'fpdfsdk/include/pdfwindow/PWL_Utils.h', 629 'fpdfsdk/include/pdfwindow/PWL_Wnd.h', 630 'fpdfsdk/src/pdfwindow/PWL_Button.cpp', 631 'fpdfsdk/src/pdfwindow/PWL_Caret.cpp', 632 'fpdfsdk/src/pdfwindow/PWL_ComboBox.cpp', 633 'fpdfsdk/src/pdfwindow/PWL_Edit.cpp', 634 'fpdfsdk/src/pdfwindow/PWL_EditCtrl.cpp', 635 'fpdfsdk/src/pdfwindow/PWL_FontMap.cpp', 636 'fpdfsdk/src/pdfwindow/PWL_Icon.cpp', 637 'fpdfsdk/src/pdfwindow/PWL_IconList.cpp', 638 'fpdfsdk/src/pdfwindow/PWL_Label.cpp', 639 'fpdfsdk/src/pdfwindow/PWL_ListBox.cpp', 640 'fpdfsdk/src/pdfwindow/PWL_ListCtrl.cpp', 641 'fpdfsdk/src/pdfwindow/PWL_Note.cpp', 642 'fpdfsdk/src/pdfwindow/PWL_ScrollBar.cpp', 643 'fpdfsdk/src/pdfwindow/PWL_Signature.cpp', 644 'fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp', 645 'fpdfsdk/src/pdfwindow/PWL_Utils.cpp', 646 'fpdfsdk/src/pdfwindow/PWL_Wnd.cpp', 647 ], 648 }, 649 { 650 'target_name': 'javascript', 651 'type': 'static_library', 652 'sources': [ 653 'fpdfsdk/include/javascript/IJavaScript.h', 654 'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp', 655 ], 656 'conditions': [ 657 ['pdf_enable_v8==1', { 658 'include_dirs': [ 659 '<(DEPTH)/v8', 660 '<(DEPTH)/v8/include', 661 ], 662 'dependencies': [ 663 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', 664 ], 665 'export_dependent_settings': [ 666 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', 667 ], 668 'sources!': [ 669 'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp', 670 ], 671 'sources': [ 672 'fpdfsdk/src/javascript/Consts.cpp', 673 'fpdfsdk/src/javascript/Consts.h', 674 'fpdfsdk/src/javascript/Document.cpp', 675 'fpdfsdk/src/javascript/Document.h', 676 'fpdfsdk/src/javascript/Field.cpp', 677 'fpdfsdk/src/javascript/Field.h', 678 'fpdfsdk/src/javascript/Icon.cpp', 679 'fpdfsdk/src/javascript/Icon.h', 680 'fpdfsdk/src/javascript/JS_Context.cpp', 681 'fpdfsdk/src/javascript/JS_Context.h', 682 'fpdfsdk/src/javascript/JS_Define.h', 683 'fpdfsdk/src/javascript/JS_EventHandler.cpp', 684 'fpdfsdk/src/javascript/JS_EventHandler.h', 685 'fpdfsdk/src/javascript/JS_GlobalData.cpp', 686 'fpdfsdk/src/javascript/JS_GlobalData.h', 687 'fpdfsdk/src/javascript/JS_Object.cpp', 688 'fpdfsdk/src/javascript/JS_Object.h', 689 'fpdfsdk/src/javascript/JS_Runtime.cpp', 690 'fpdfsdk/src/javascript/JS_Runtime.h', 691 'fpdfsdk/src/javascript/JS_Value.cpp', 692 'fpdfsdk/src/javascript/JS_Value.h', 693 'fpdfsdk/src/javascript/PublicMethods.cpp', 694 'fpdfsdk/src/javascript/PublicMethods.h', 695 'fpdfsdk/src/javascript/app.cpp', 696 'fpdfsdk/src/javascript/app.cpp', 697 'fpdfsdk/src/javascript/app.h', 698 'fpdfsdk/src/javascript/color.cpp', 699 'fpdfsdk/src/javascript/color.cpp', 700 'fpdfsdk/src/javascript/color.h', 701 'fpdfsdk/src/javascript/console.cpp', 702 'fpdfsdk/src/javascript/console.cpp', 703 'fpdfsdk/src/javascript/console.h', 704 'fpdfsdk/src/javascript/event.cpp', 705 'fpdfsdk/src/javascript/event.h', 706 'fpdfsdk/src/javascript/global.cpp', 707 'fpdfsdk/src/javascript/global.h', 708 'fpdfsdk/src/javascript/report.cpp', 709 'fpdfsdk/src/javascript/report.h', 710 'fpdfsdk/src/javascript/resource.cpp', 711 'fpdfsdk/src/javascript/resource.h', 712 'fpdfsdk/src/javascript/util.cpp', 713 'fpdfsdk/src/javascript/util.h', 714 'fpdfsdk/include/jsapi/fxjs_v8.h', 715 'fpdfsdk/src/jsapi/fxjs_v8.cpp', 716 ], 717 }], 718 ], 719 }, 720 { 721 'target_name': 'formfiller', 722 'type': 'static_library', 723 'sources': [ 724 'fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h', 725 'fpdfsdk/include/formfiller/FFL_CheckBox.h', 726 'fpdfsdk/include/formfiller/FFL_ComboBox.h', 727 'fpdfsdk/include/formfiller/FFL_FormFiller.h', 728 'fpdfsdk/include/formfiller/FFL_IFormFiller.h', 729 'fpdfsdk/include/formfiller/FFL_ListBox.h', 730 'fpdfsdk/include/formfiller/FFL_PushButton.h', 731 'fpdfsdk/include/formfiller/FFL_RadioButton.h', 732 'fpdfsdk/include/formfiller/FFL_TextField.h', 733 'fpdfsdk/src/formfiller/FFL_CBA_Fontmap.cpp', 734 'fpdfsdk/src/formfiller/FFL_CheckBox.cpp', 735 'fpdfsdk/src/formfiller/FFL_ComboBox.cpp', 736 'fpdfsdk/src/formfiller/FFL_FormFiller.cpp', 737 'fpdfsdk/src/formfiller/FFL_IFormFiller.cpp', 738 'fpdfsdk/src/formfiller/FFL_ListBox.cpp', 739 'fpdfsdk/src/formfiller/FFL_PushButton.cpp', 740 'fpdfsdk/src/formfiller/FFL_RadioButton.cpp', 741 'fpdfsdk/src/formfiller/FFL_TextField.cpp', 742 ], 743 }, 744 { 745 'target_name': 'pdfium_unittests', 746 'type': 'executable', 747 'dependencies': [ 748 '<(DEPTH)/testing/gtest.gyp:gtest_main', 749 '<(DEPTH)/testing/gtest.gyp:gtest', 750 'pdfium', 751 'test_support', 752 ], 753 'sources': [ 754 'core/src/fpdfapi/fpdf_font/fpdf_font_cid_unittest.cpp', 755 'core/src/fpdfapi/fpdf_font/fpdf_font_unittest.cpp', 756 'core/src/fpdfapi/fpdf_page/fpdf_page_parser_old_unittest.cpp', 757 'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp', 758 'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_unittest.cpp', 759 'core/src/fpdftext/fpdf_text_int_unittest.cpp', 760 'core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp', 761 'core/src/fxcrt/fx_basic_bstring_unittest.cpp', 762 'core/src/fxcrt/fx_basic_memmgr_unittest.cpp', 763 'core/src/fxcrt/fx_basic_wstring_unittest.cpp', 764 'core/src/fxcrt/fx_bidi_unittest.cpp', 765 'core/src/fxcrt/fx_extension_unittest.cpp', 766 'core/src/fxcrt/fx_system_unittest.cpp', 767 'testing/fx_string_testhelpers.h', 768 'testing/fx_string_testhelpers.cpp', 769 ], 770 'conditions': [ 771 ['pdf_enable_xfa==1', { 772 'sources': [ 773 'xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp', 774 'xfa/src/fxfa/src/parser/xfa_utils_imp_unittest.cpp', 775 ], 776 }], 777 ], 778 }, 779 { 780 'target_name': 'pdfium_embeddertests', 781 'type': 'executable', 782 'dependencies': [ 783 '<(DEPTH)/testing/gmock.gyp:gmock', 784 '<(DEPTH)/testing/gtest.gyp:gtest', 785 'pdfium', 786 'test_support', 787 ], 788 'sources': [ 789 'core/src/fpdfapi/fpdf_page/fpdf_page_func_embeddertest.cpp', 790 'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp', 791 'core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp', 792 'core/src/fpdfapi/fpdf_render/fpdf_render_loadimage_embeddertest.cpp', 793 'core/src/fpdfapi/fpdf_render/fpdf_render_pattern_embeddertest.cpp', 794 'fpdfsdk/src/fpdf_dataavail_embeddertest.cpp', 795 'fpdfsdk/src/fpdfdoc_embeddertest.cpp', 796 'fpdfsdk/src/fpdfedit_embeddertest.cpp', 797 'fpdfsdk/src/fpdfext_embeddertest.cpp', 798 'fpdfsdk/src/fpdfformfill_embeddertest.cpp', 799 'fpdfsdk/src/fpdfsave_embeddertest.cpp', 800 'fpdfsdk/src/fpdftext_embeddertest.cpp', 801 'fpdfsdk/src/fpdfview_c_api_test.c', 802 'fpdfsdk/src/fpdfview_c_api_test.h', 803 'fpdfsdk/src/fpdfview_embeddertest.cpp', 804 'testing/embedder_test.cpp', 805 'testing/embedder_test.h', 806 'testing/embedder_test_mock_delegate.h', 807 'testing/embedder_test_timer_handling_delegate.h', 808 ], 809 'conditions': [ 810 ['pdf_enable_xfa==1', { 811 'sources': [ 812 'xfa/src/fxfa/src/parser/xfa_parser_imp_embeddertest.cpp', 813 ], 814 }], 815 ['pdf_enable_v8==1', { 816 'include_dirs': [ 817 '<(DEPTH)/v8', 818 '<(DEPTH)/v8/include', 819 ], 820 'dependencies': [ 821 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', 822 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform', 823 ], 824 'sources': [ 825 'fpdfsdk/src/javascript/public_methods_embeddertest.cpp', 826 'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp', 827 'testing/js_embedder_test.cpp', 828 'testing/js_embedder_test.h', 829 ], 830 }], 831 ], 832 }, 833 { 834 'target_name': 'test_support', 835 'type': 'static_library', 836 'dependencies': [ 837 '<(DEPTH)/testing/gmock.gyp:gmock', 838 '<(DEPTH)/testing/gtest.gyp:gtest', 839 ], 840 'sources': [ 841 'testing/fx_string_testhelpers.cpp', 842 'testing/fx_string_testhelpers.h', 843 'testing/test_support.cpp', 844 'testing/test_support.h', 845 'testing/utils/path_service.cpp', 846 ], 847 'conditions': [ 848 ['pdf_enable_v8==1', { 849 'include_dirs': [ 850 '<(DEPTH)/v8', 851 '<(DEPTH)/v8/include', 852 ], 853 'dependencies': [ 854 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', 855 '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform', 856 ], 857 }], 858 ], 859 }, 860 ], 861 'conditions': [ 862 ['pdf_enable_xfa==1', { 863 'targets': [ 864 { 865 'target_name': 'fpdfxfa', 866 'type': 'static_library', 867 'dependencies': [ 868 'javascript', 869 'xfa.gyp:xfa', 870 ], 871 'sources': [ 872 'fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp', 873 'fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp', 874 'fpdfsdk/src/fpdfxfa/fpdfxfa_page.cpp', 875 'fpdfsdk/src/fpdfxfa/fpdfxfa_util.cpp', 876 'fpdfsdk/include/fpdfxfa/fpdfxfa_app.h', 877 'fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h', 878 'fpdfsdk/include/fpdfxfa/fpdfxfa_page.h', 879 'fpdfsdk/include/fpdfxfa/fpdfxfa_util.h', 880 ], 881 }, 882 ] 883 }], 884 ] 885} 886