# Copyright 2018 The PDFium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import("//build/config/jumbo.gni") import("../../pdfium.gni") import("../../testing/test.gni") jumbo_source_set("fxcodec") { sources = [ "JBig2_DocumentContext.h", "codec/ccodec_basicmodule.h", "codec/ccodec_faxmodule.cpp", "codec/ccodec_faxmodule.h", "codec/ccodec_flatemodule.cpp", "codec/ccodec_flatemodule.h", "codec/ccodec_iccmodule.cpp", "codec/ccodec_iccmodule.h", "codec/ccodec_jbig2module.cpp", "codec/ccodec_jbig2module.h", "codec/ccodec_jpegmodule.cpp", "codec/ccodec_jpegmodule.h", "codec/ccodec_jpxmodule.cpp", "codec/ccodec_jpxmodule.h", "codec/ccodec_scanlinedecoder.cpp", "codec/ccodec_scanlinedecoder.h", "codec/cfx_codec_memory.cpp", "codec/cfx_codec_memory.h", "codec/cjpx_decoder.h", "codec/codec_int.h", "codec/codec_module_iface.h", "codec/fx_codec.cpp", "fx_codec.h", "fx_codec_def.h", "jbig2/JBig2_ArithDecoder.cpp", "jbig2/JBig2_ArithDecoder.h", "jbig2/JBig2_ArithIntDecoder.cpp", "jbig2/JBig2_ArithIntDecoder.h", "jbig2/JBig2_BitStream.cpp", "jbig2/JBig2_BitStream.h", "jbig2/JBig2_Context.cpp", "jbig2/JBig2_Context.h", "jbig2/JBig2_Define.h", "jbig2/JBig2_GrdProc.cpp", "jbig2/JBig2_GrdProc.h", "jbig2/JBig2_GrrdProc.cpp", "jbig2/JBig2_GrrdProc.h", "jbig2/JBig2_HtrdProc.cpp", "jbig2/JBig2_HtrdProc.h", "jbig2/JBig2_HuffmanDecoder.cpp", "jbig2/JBig2_HuffmanDecoder.h", "jbig2/JBig2_HuffmanTable.cpp", "jbig2/JBig2_HuffmanTable.h", "jbig2/JBig2_Image.cpp", "jbig2/JBig2_Image.h", "jbig2/JBig2_Page.h", "jbig2/JBig2_PatternDict.cpp", "jbig2/JBig2_PatternDict.h", "jbig2/JBig2_PddProc.cpp", "jbig2/JBig2_PddProc.h", "jbig2/JBig2_SddProc.cpp", "jbig2/JBig2_SddProc.h", "jbig2/JBig2_Segment.cpp", "jbig2/JBig2_Segment.h", "jbig2/JBig2_SymbolDict.cpp", "jbig2/JBig2_SymbolDict.h", "jbig2/JBig2_TrdProc.cpp", "jbig2/JBig2_TrdProc.h", ] configs += [ "../../:pdfium_core_config" ] include_dirs = [] deps = [ "../../third_party:fx_libopenjpeg", "../../third_party:lcms2", "../../third_party:zlib", "../fxcrt", "../fxge", "//third_party:jpeg", ] allow_circular_includes_from = [ "../fxge" ] if (pdf_enable_xfa) { sources += [ "codec/ccodec_progressivedecoder.cpp", "codec/ccodec_progressivedecoder.h", ] if (pdf_enable_xfa_bmp) { sources += [ "bmp/cfx_bmpcontext.cpp", "bmp/cfx_bmpcontext.h", "bmp/cfx_bmpdecompressor.cpp", "bmp/cfx_bmpdecompressor.h", "bmp/fx_bmp.cpp", "bmp/fx_bmp.h", "codec/ccodec_bmpmodule.cpp", "codec/ccodec_bmpmodule.h", ] } if (pdf_enable_xfa_gif) { sources += [ "codec/ccodec_gifmodule.cpp", "codec/ccodec_gifmodule.h", "gif/cfx_gif.cpp", "gif/cfx_gif.h", "gif/cfx_gifcontext.cpp", "gif/cfx_gifcontext.h", "gif/cfx_lzwdecompressor.cpp", "gif/cfx_lzwdecompressor.h", ] } if (pdf_enable_xfa_png) { sources += [ "codec/ccodec_pngmodule.cpp", "codec/ccodec_pngmodule.h", ] deps += [ "../../third_party:png" ] } if (pdf_enable_xfa_tiff) { sources += [ "codec/ccodec_tiffmodule.cpp", "codec/ccodec_tiffmodule.h", ] deps += [ "../../third_party:fx_tiff" ] } } visibility = [ "../../*" ] } pdfium_unittest_source_set("unittests") { sources = [ "codec/fx_codec_a85_unittest.cpp", "codec/fx_codec_jpx_unittest.cpp", "codec/fx_codec_rle_unittest.cpp", "jbig2/JBig2_BitStream_unittest.cpp", "jbig2/JBig2_Image_unittest.cpp", ] deps = [ ":fxcodec", "../fpdfapi/parser", ] pdfium_root_dir = "../../" if (pdf_enable_xfa && pdf_enable_xfa_gif) { sources += [ "gif/cfx_gifcontext_unittest.cpp", "gif/cfx_lzwdecompressor_unittest.cpp", ] } } pdfium_embeddertest_source_set("embeddertests") { sources = [ "codec/fx_codec_embeddertest.cpp", ] pdfium_root_dir = "../../" }