blob: 00a3886e7df5b480fdd3c9f29a50e89cd4fd7f55 [file] [log] [blame]
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -08001# Copyright 2015 PDFium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -07005import("//build_overrides/pdfium.gni")
6
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -08007# This file contains PDFium-related build flags.
8
9declare_args() {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070010 # 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
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080017
Haibo Huang49cc9302020-04-27 16:14:24 -070018 # Generate logging messages for click events that reach PDFium
19 pdf_enable_click_logging = false
20
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080021 # Build PDFium either with or without v8 support.
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070022 pdf_enable_v8 = pdf_enable_v8_override
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080023
24 # Build PDFium either with or without XFA Forms support.
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070025 pdf_enable_xfa = pdf_enable_xfa_override
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080026
Philip P. Moltmann33357ca2017-05-11 09:25:13 -070027 # 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 png codec. Ignored if not XFA.
37 pdf_enable_xfa_tiff = true
38
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070039 # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw
40 # everything.
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070041 pdf_use_skia = pdf_use_skia_override
42
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070043 # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw
44 # paths.
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070045 pdf_use_skia_paths = pdf_use_skia_paths_override
46
47 # Build PDFium with or without experimental win32 GDI APIs.
48 pdf_use_win32_gdi = pdf_use_win32_gdi_override
49
50 # Build PDFium standalone
51 pdf_is_standalone = false
52
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070053 # Build a complete static library
54 pdf_is_complete_lib = false
55
56 # Enable callgrind for performance profiling
57 enable_callgrind = false
58
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070059 # Don't build against bundled zlib.
60 use_system_zlib = false
61
62 # Don't build against bundled lcms2.
63 use_system_lcms2 = false
64
Haibo Huang49cc9302020-04-27 16:14:24 -070065 # Don't build against bundled libopenjpeg2.
66 use_system_libopenjpeg2 = false
67
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070068 # Don't build against bundled libpng.
69 use_system_libpng = false
70}
71
72if (pdf_use_skia && pdf_use_skia_paths) {
73 assert(false, "Enable at most ONE of pdf_use_skia and pdf_use_skia_paths")
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080074}
Haibo Huang49cc9302020-04-27 16:14:24 -070075
76assert(!pdf_is_complete_lib || !is_component_build,
77 "pdf_is_complete_lib=true requires is_component_build=false")