1# Copyright 2015 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("//build_overrides/pdfium.gni") 6 7# This file contains PDFium-related build flags. 8 9declare_args() { 10 # Build PDFium either: 11 # 1) When set to true, with a bundled FreeType, built from FreeType source 12 # code in //third_party/freetype and PDFium's FreeType configs in 13 # third_party/freetype/include. 14 # 2) When set to false, use whatever FreeType target is defined in 15 # //build/config/freetype. 16 pdf_bundle_freetype = pdf_bundle_freetype_override 17 18 # Generate logging messages for click events that reach PDFium 19 pdf_enable_click_logging = false 20 21 # Build PDFium either with or without v8 support. 22 pdf_enable_v8 = pdf_enable_v8_override 23 24 # Build PDFium either with or without XFA Forms support. 25 pdf_enable_xfa = pdf_enable_xfa_override 26 27 # If XFA, also support bmp codec. Ignored if not XFA. 28 pdf_enable_xfa_bmp = true 29 30 # If XFA, also support gif codec. Ignored if not XFA. 31 pdf_enable_xfa_gif = true 32 33 # If XFA, also support png codec. Ignored if not XFA. 34 pdf_enable_xfa_png = true 35 36 # If XFA, also support tiff codec. Ignored if not XFA. 37 pdf_enable_xfa_tiff = true 38 39 # Build PDFium using C++20 if set to true. Otherwise builds with C++17. 40 # There is no "pdf_use_cxx20_override" variable because this is only used in 41 # standalone PDFium, and not when PDFium is embedded in our projects. 42 pdf_use_cxx20 = (is_win && is_component_build) || is_fuchsia 43 44 # Build PDFium against PartitionAlloc. When false, PDFium must build without 45 # requiring any PartitionAlloc headers or code to be present. When true, 46 # PDFium will use PartitionAlloc partitions to separate strings, scalars, 47 # etc. from other allocations. However, the use of PartitionAlloc for new or 48 # malloc is controlled by args in build_overrides/partition_alloc.gni. 49 pdf_use_partition_alloc = pdf_use_partition_alloc_override 50 51 # Build PDFium to use Skia (experimental) for all PDFium graphics. 52 # If enabled, coexists in build with AGG graphics and the default 53 # renderer is selectable at runtime. 54 pdf_use_skia = pdf_use_skia_override 55 56 # Build PDFium standalone. Now only controls whether the test binaries 57 # are built. Most logic is conditioned by build_with_chromium. 58 pdf_is_standalone = false 59 60 # Build a complete static library 61 pdf_is_complete_lib = false 62 63 # Enable callgrind for performance profiling 64 enable_callgrind = false 65 66 # Don't build against bundled lcms2. 67 use_system_lcms2 = false 68 69 # Don't build against bundled libopenjpeg2. 70 use_system_libopenjpeg2 = false 71 72 # Don't build against bundled libpng. 73 use_system_libpng = false 74 75 # Don't build against bundled libtiff. 76 use_system_libtiff = false 77 78 # Don't build against bundled zlib. 79 use_system_zlib = false 80 81 # Enable SSE2 for MSVC builds. Ignored if it's not a MSVC build. 82 msvc_use_sse2 = true 83} 84 85assert(!pdf_is_complete_lib || !is_component_build, 86 "pdf_is_complete_lib=true requires is_component_build=false") 87