|  | # 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/freetype/freetype.gni") | 
|  | import("//build/config/jumbo.gni") | 
|  | import("../../pdfium.gni") | 
|  | import("../../testing/test.gni") | 
|  |  | 
|  | config("fxge_warnings") { | 
|  | visibility = [ ":*" ] | 
|  | if (is_clang) { | 
|  | cflags = [ | 
|  | # http://code.google.com/p/pdfium/issues/detail?id=188 | 
|  | "-Wno-switch", | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | jumbo_source_set("fxge") { | 
|  | sources = [ | 
|  | "cfx_cliprgn.cpp", | 
|  | "cfx_cliprgn.h", | 
|  | "cfx_color.cpp", | 
|  | "cfx_color.h", | 
|  | "cfx_defaultrenderdevice.h", | 
|  | "cfx_facecache.cpp", | 
|  | "cfx_facecache.h", | 
|  | "cfx_folderfontinfo.cpp", | 
|  | "cfx_folderfontinfo.h", | 
|  | "cfx_font.cpp", | 
|  | "cfx_fontcache.cpp", | 
|  | "cfx_fontcache.h", | 
|  | "cfx_fontmapper.cpp", | 
|  | "cfx_fontmapper.h", | 
|  | "cfx_fontmgr.cpp", | 
|  | "cfx_fontmgr.h", | 
|  | "cfx_gemodule.cpp", | 
|  | "cfx_gemodule.h", | 
|  | "cfx_graphstate.cpp", | 
|  | "cfx_graphstate.h", | 
|  | "cfx_graphstatedata.cpp", | 
|  | "cfx_graphstatedata.h", | 
|  | "cfx_pathdata.cpp", | 
|  | "cfx_pathdata.h", | 
|  | "cfx_renderdevice.cpp", | 
|  | "cfx_renderdevice.h", | 
|  | "cfx_substfont.cpp", | 
|  | "cfx_substfont.h", | 
|  | "cfx_unicodeencoding.cpp", | 
|  | "cfx_unicodeencoding.h", | 
|  | "cttfontdesc.cpp", | 
|  | "cttfontdesc.h", | 
|  | "dib/cfx_bitmapcomposer.cpp", | 
|  | "dib/cfx_bitmapcomposer.h", | 
|  | "dib/cfx_bitmapstorer.cpp", | 
|  | "dib/cfx_bitmapstorer.h", | 
|  | "dib/cfx_dibbase.cpp", | 
|  | "dib/cfx_dibbase.h", | 
|  | "dib/cfx_dibitmap.cpp", | 
|  | "dib/cfx_dibitmap.h", | 
|  | "dib/cfx_filtereddib.cpp", | 
|  | "dib/cfx_filtereddib.h", | 
|  | "dib/cfx_imagerenderer.cpp", | 
|  | "dib/cfx_imagerenderer.h", | 
|  | "dib/cfx_imagestretcher.cpp", | 
|  | "dib/cfx_imagestretcher.h", | 
|  | "dib/cfx_imagetransformer.cpp", | 
|  | "dib/cfx_imagetransformer.h", | 
|  | "dib/cfx_scanlinecompositor.cpp", | 
|  | "dib/cfx_scanlinecompositor.h", | 
|  | "dib/cstretchengine.cpp", | 
|  | "dib/cstretchengine.h", | 
|  | "dib/fx_dib_main.cpp", | 
|  | "dib/scanlinecomposer_iface.h", | 
|  | "fontdata/chromefontdata/FoxitDingbats.cpp", | 
|  | "fontdata/chromefontdata/FoxitFixed.cpp", | 
|  | "fontdata/chromefontdata/FoxitFixedBold.cpp", | 
|  | "fontdata/chromefontdata/FoxitFixedBoldItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitFixedItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitSans.cpp", | 
|  | "fontdata/chromefontdata/FoxitSansBold.cpp", | 
|  | "fontdata/chromefontdata/FoxitSansBoldItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitSansItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitSansMM.cpp", | 
|  | "fontdata/chromefontdata/FoxitSerif.cpp", | 
|  | "fontdata/chromefontdata/FoxitSerifBold.cpp", | 
|  | "fontdata/chromefontdata/FoxitSerifBoldItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitSerifItalic.cpp", | 
|  | "fontdata/chromefontdata/FoxitSerifMM.cpp", | 
|  | "fontdata/chromefontdata/FoxitSymbol.cpp", | 
|  | "fontdata/chromefontdata/chromefontdata.h", | 
|  | "freetype/fx_freetype.cpp", | 
|  | "fx_dib.h", | 
|  | "fx_font.cpp", | 
|  | "fx_font.h", | 
|  | "fx_freetype.h", | 
|  | "fx_ge_fontmap.cpp", | 
|  | "fx_ge_text.cpp", | 
|  | "renderdevicedriver_iface.cpp", | 
|  | "renderdevicedriver_iface.h", | 
|  | "systemfontinfo_iface.h", | 
|  | ] | 
|  |  | 
|  | configs += [ | 
|  | ":fxge_warnings", | 
|  | "../../:pdfium_core_config", | 
|  | ] | 
|  |  | 
|  | deps = [ | 
|  | "../fxcrt", | 
|  | ] | 
|  |  | 
|  | if (is_component_build || use_system_freetype) { | 
|  | # ft_adobe_glyph_list is not exported from the Freetype shared library so we | 
|  | # need it defined in component builds and builds using system freetype. | 
|  | defines = [ "DEFINE_PS_TABLES_DATA" ] | 
|  | } | 
|  |  | 
|  | if (pdf_enable_xfa) { | 
|  | sources += [ | 
|  | "cfx_unicodeencodingex.cpp", | 
|  | "cfx_unicodeencodingex.h", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (pdf_use_skia || pdf_use_skia_paths) { | 
|  | sources += [ "skia/fx_skia_device.cpp" ] | 
|  | deps += [ "//skia" ] | 
|  | } else { | 
|  | sources += [ | 
|  | "agg/fx_agg_driver.cpp", | 
|  | "agg/fx_agg_driver.h", | 
|  | ] | 
|  | deps += [ "../../third_party:fx_agg" ] | 
|  | } | 
|  |  | 
|  | if (is_android) { | 
|  | sources += [ | 
|  | "android/cfpf_skiadevicemodule.cpp", | 
|  | "android/cfpf_skiadevicemodule.h", | 
|  | "android/cfpf_skiafont.cpp", | 
|  | "android/cfpf_skiafont.h", | 
|  | "android/cfpf_skiafontmgr.cpp", | 
|  | "android/cfpf_skiafontmgr.h", | 
|  | "android/cfpf_skiapathfont.cpp", | 
|  | "android/cfpf_skiapathfont.h", | 
|  | "android/cfx_androidfontinfo.cpp", | 
|  | "android/cfx_androidfontinfo.h", | 
|  | "android/fx_android_imp.cpp", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (is_linux) { | 
|  | sources += [ "fx_ge_linux.cpp" ] | 
|  | } | 
|  |  | 
|  | if (is_mac) { | 
|  | sources += [ | 
|  | "apple/apple_int.h", | 
|  | "apple/fx_apple_platform.cpp", | 
|  | "apple/fx_mac_imp.cpp", | 
|  | "apple/fx_quartz_device.cpp", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (is_win) { | 
|  | sources += [ | 
|  | "cfx_windowsrenderdevice.h", | 
|  | "dib/cfx_dibextractor.cpp", | 
|  | "dib/cfx_dibextractor.h", | 
|  | "win32/cfx_psrenderer.cpp", | 
|  | "win32/cfx_psrenderer.h", | 
|  | "win32/cfx_windowsdib.h", | 
|  | "win32/cpsoutput.cpp", | 
|  | "win32/cpsoutput.h", | 
|  | "win32/fx_win32_device.cpp", | 
|  | "win32/fx_win32_dib.cpp", | 
|  | "win32/fx_win32_gdipext.cpp", | 
|  | "win32/fx_win32_print.cpp", | 
|  | "win32/win32_int.h", | 
|  | ] | 
|  | configs -= [ "//build/config/win:lean_and_mean" ] | 
|  | } | 
|  |  | 
|  | visibility = [ "../../*" ] | 
|  | } | 
|  |  | 
|  | pdfium_unittest_source_set("unittests") { | 
|  | sources = [ | 
|  | "dib/cfx_dibitmap_unittest.cpp", | 
|  | "dib/cstretchengine_unittest.cpp", | 
|  | ] | 
|  | deps = [ | 
|  | ":fxge", | 
|  | "../fpdfapi/parser", | 
|  | "../fpdfapi/render", | 
|  | ] | 
|  | pdfium_root_dir = "../../" | 
|  | } | 
|  |  | 
|  | pdfium_embeddertest_source_set("embeddertests") { | 
|  | sources = [ | 
|  | "fx_ge_text_embeddertest.cpp", | 
|  | ] | 
|  | deps = [] | 
|  | pdfium_root_dir = "../../" | 
|  |  | 
|  | if (pdf_use_skia || pdf_use_skia_paths) { | 
|  | sources += [ "skia/fx_skia_device_embeddertest.cpp" ] | 
|  | deps += [ | 
|  | ":fxge", | 
|  | "../../fpdfsdk", | 
|  | "//skia", | 
|  | ] | 
|  | } | 
|  | } |