1# Copyright 2018 The PDFium Authors 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5import("../../pdfium.gni") 6import("../../testing/test.gni") 7 8source_set("fxcodec") { 9 sources = [ 10 "basic/basicmodule.cpp", 11 "basic/basicmodule.h", 12 "cfx_codec_memory.cpp", 13 "cfx_codec_memory.h", 14 "fax/faxmodule.cpp", 15 "fax/faxmodule.h", 16 "flate/flatemodule.cpp", 17 "flate/flatemodule.h", 18 "fx_codec.cpp", 19 "fx_codec.h", 20 "fx_codec_def.h", 21 "icc/icc_transform.cpp", 22 "icc/icc_transform.h", 23 "jbig2/JBig2_ArithDecoder.cpp", 24 "jbig2/JBig2_ArithDecoder.h", 25 "jbig2/JBig2_ArithIntDecoder.cpp", 26 "jbig2/JBig2_ArithIntDecoder.h", 27 "jbig2/JBig2_BitStream.cpp", 28 "jbig2/JBig2_BitStream.h", 29 "jbig2/JBig2_Context.cpp", 30 "jbig2/JBig2_Context.h", 31 "jbig2/JBig2_Define.h", 32 "jbig2/JBig2_DocumentContext.cpp", 33 "jbig2/JBig2_DocumentContext.h", 34 "jbig2/JBig2_GrdProc.cpp", 35 "jbig2/JBig2_GrdProc.h", 36 "jbig2/JBig2_GrrdProc.cpp", 37 "jbig2/JBig2_GrrdProc.h", 38 "jbig2/JBig2_HtrdProc.cpp", 39 "jbig2/JBig2_HtrdProc.h", 40 "jbig2/JBig2_HuffmanDecoder.cpp", 41 "jbig2/JBig2_HuffmanDecoder.h", 42 "jbig2/JBig2_HuffmanTable.cpp", 43 "jbig2/JBig2_HuffmanTable.h", 44 "jbig2/JBig2_Image.cpp", 45 "jbig2/JBig2_Image.h", 46 "jbig2/JBig2_Page.h", 47 "jbig2/JBig2_PatternDict.cpp", 48 "jbig2/JBig2_PatternDict.h", 49 "jbig2/JBig2_PddProc.cpp", 50 "jbig2/JBig2_PddProc.h", 51 "jbig2/JBig2_SddProc.cpp", 52 "jbig2/JBig2_SddProc.h", 53 "jbig2/JBig2_Segment.cpp", 54 "jbig2/JBig2_Segment.h", 55 "jbig2/JBig2_SymbolDict.cpp", 56 "jbig2/JBig2_SymbolDict.h", 57 "jbig2/JBig2_TrdProc.cpp", 58 "jbig2/JBig2_TrdProc.h", 59 "jbig2/jbig2_decoder.cpp", 60 "jbig2/jbig2_decoder.h", 61 "jpeg/jpeg_common.cpp", 62 "jpeg/jpeg_common.h", 63 "jpeg/jpegmodule.cpp", 64 "jpeg/jpegmodule.h", 65 "jpx/cjpx_decoder.cpp", 66 "jpx/cjpx_decoder.h", 67 "jpx/jpx_decode_utils.cpp", 68 "jpx/jpx_decode_utils.h", 69 "scanlinedecoder.cpp", 70 "scanlinedecoder.h", 71 ] 72 configs += [ 73 "../../:pdfium_strict_config", 74 "../../:pdfium_noshorten_config", 75 ] 76 include_dirs = [] 77 deps = [ 78 "../../third_party:lcms2", 79 "../../third_party:libopenjpeg2", 80 "../../third_party:zlib", 81 "../fxcrt", 82 "../fxge", 83 "//third_party:jpeg", 84 ] 85 86 if (pdf_enable_xfa) { 87 sources += [ 88 "jpeg/jpeg_progressive_decoder.cpp", 89 "jpeg/jpeg_progressive_decoder.h", 90 "progressive_decoder.cpp", 91 "progressive_decoder.h", 92 "progressive_decoder_iface.h", 93 ] 94 if (pdf_enable_xfa_bmp) { 95 sources += [ 96 "bmp/bmp_decoder.cpp", 97 "bmp/bmp_decoder.h", 98 "bmp/bmp_progressive_decoder.cpp", 99 "bmp/bmp_progressive_decoder.h", 100 "bmp/cfx_bmpcontext.cpp", 101 "bmp/cfx_bmpcontext.h", 102 "bmp/cfx_bmpdecompressor.cpp", 103 "bmp/cfx_bmpdecompressor.h", 104 "bmp/fx_bmp.h", 105 ] 106 } 107 if (pdf_enable_xfa_gif) { 108 sources += [ 109 "gif/cfx_gif.cpp", 110 "gif/cfx_gif.h", 111 "gif/cfx_gifcontext.cpp", 112 "gif/cfx_gifcontext.h", 113 "gif/gif_decoder.cpp", 114 "gif/gif_decoder.h", 115 "gif/gif_progressive_decoder.cpp", 116 "gif/gif_progressive_decoder.h", 117 "gif/lzw_decompressor.cpp", 118 "gif/lzw_decompressor.h", 119 ] 120 } 121 if (pdf_enable_xfa_png) { 122 sources += [ 123 "png/png_decoder.cpp", 124 "png/png_decoder.h", 125 ] 126 deps += [ "../../third_party:png" ] 127 } 128 if (pdf_enable_xfa_tiff) { 129 sources += [ 130 "tiff/tiff_decoder.cpp", 131 "tiff/tiff_decoder.h", 132 ] 133 deps += [ "../../third_party:tiff" ] 134 } 135 } 136 137 visibility = [ "../../*" ] 138} 139 140pdfium_unittest_source_set("unittests") { 141 sources = [ 142 "basic/a85_unittest.cpp", 143 "basic/rle_unittest.cpp", 144 "jbig2/JBig2_BitStream_unittest.cpp", 145 "jbig2/JBig2_Image_unittest.cpp", 146 "jpx/jpx_unittest.cpp", 147 ] 148 deps = [ 149 ":fxcodec", 150 "../../third_party:libopenjpeg2", 151 "../fpdfapi/parser", 152 ] 153 pdfium_root_dir = "../../" 154 155 if (pdf_enable_xfa) { 156 sources += [ "progressive_decoder_unittest.cpp" ] 157 deps += [ "../fxge" ] 158 if (pdf_enable_xfa_gif) { 159 sources += [ 160 "gif/cfx_gifcontext_unittest.cpp", 161 "gif/lzw_decompressor_unittest.cpp", 162 ] 163 } 164 } 165} 166 167pdfium_embeddertest_source_set("embeddertests") { 168 sources = [ "jbig2/jbig2_embeddertest.cpp" ] 169 pdfium_root_dir = "../../" 170} 171