• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 with PartitionAlloc as the memory allocator.
45  pdf_use_partition_alloc = pdf_use_partition_alloc_override
46
47  # Build PDFium to use Skia (experimental) for all PDFium graphics.
48  # If enabled, coexists in build with AGG graphics and the default
49  # renderer is selectable at runtime.
50  pdf_use_skia = pdf_use_skia_override
51
52  # Build PDFium standalone
53  pdf_is_standalone = false
54
55  # Build a complete static library
56  pdf_is_complete_lib = false
57
58  # Enable callgrind for performance profiling
59  enable_callgrind = false
60
61  # Don't build against bundled lcms2.
62  use_system_lcms2 = false
63
64  # Don't build against bundled libopenjpeg2.
65  use_system_libopenjpeg2 = false
66
67  # Don't build against bundled libpng.
68  use_system_libpng = false
69
70  # Don't build against bundled libtiff.
71  use_system_libtiff = false
72
73  # Don't build against bundled zlib.
74  use_system_zlib = false
75
76  # Enable SSE2 for MSVC builds. Ignored if it's not a MSVC build.
77  msvc_use_sse2 = true
78}
79
80assert(!pdf_is_complete_lib || !is_component_build,
81       "pdf_is_complete_lib=true requires is_component_build=false")
82