blob: f451c84829ba141d9daab440f283d8bdcb0fdb5b [file] [log] [blame]
dsinclair038bf0b2016-04-30 06:00:05 -07001# Copyright 2015 PDFium Authors. All rights reserved.
Tom Sepeza8a39e22015-10-12 15:47:07 -07002# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
dsinclairfd670fd2016-05-03 06:14:34 -07005import("//build_overrides/pdfium.gni")
6
Tom Sepeza8a39e22015-10-12 15:47:07 -07007# This file contains PDFium-related build flags.
8
9declare_args() {
Lei Zhang984f1d82017-03-31 16:11:55 -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.
Lei Zhang7b701892017-03-28 13:56:29 -070016 pdf_bundle_freetype = pdf_bundle_freetype_override
Tom Sepeza8a39e22015-10-12 15:47:07 -070017
Ryan Harrison9ce75b82018-06-06 19:45:14 +000018 # Generate logging messages for click events that reach PDFium
19 pdf_enable_click_logging = false
20
Tom Sepez452b4f32015-10-13 09:27:27 -070021 # Build PDFium either with or without v8 support.
dsinclairfd670fd2016-05-03 06:14:34 -070022 pdf_enable_v8 = pdf_enable_v8_override
Tom Sepez452b4f32015-10-13 09:27:27 -070023
Tom Sepeza8a39e22015-10-12 15:47:07 -070024 # Build PDFium either with or without XFA Forms support.
dsinclairfd670fd2016-05-03 06:14:34 -070025 pdf_enable_xfa = pdf_enable_xfa_override
Tom Sepeza8a39e22015-10-12 15:47:07 -070026
Tom Sepez73c9f3b2017-02-27 10:12:59 -080027 # If XFA, also support bmp codec. Ignored if not XFA.
Dan Sinclairb3b6e922017-02-28 11:33:33 -050028 pdf_enable_xfa_bmp = true
Tom Sepez73c9f3b2017-02-27 10:12:59 -080029
30 # If XFA, also support gif codec. Ignored if not XFA.
Dan Sinclairb3b6e922017-02-28 11:33:33 -050031 pdf_enable_xfa_gif = true
Tom Sepez73c9f3b2017-02-27 10:12:59 -080032
33 # If XFA, also support png codec. Ignored if not XFA.
Dan Sinclairb3b6e922017-02-28 11:33:33 -050034 pdf_enable_xfa_png = true
Tom Sepez73c9f3b2017-02-27 10:12:59 -080035
36 # If XFA, also support png codec. Ignored if not XFA.
Dan Sinclairb3b6e922017-02-28 11:33:33 -050037 pdf_enable_xfa_tiff = true
Tom Sepez73c9f3b2017-02-27 10:12:59 -080038
Lei Zhang360edeb2017-12-19 18:06:35 +000039 # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw
Lei Zhang7b701892017-03-28 13:56:29 -070040 # everything.
dsinclairfd670fd2016-05-03 06:14:34 -070041 pdf_use_skia = pdf_use_skia_override
dsinclair685bb882016-04-20 07:32:39 -070042
Lei Zhang360edeb2017-12-19 18:06:35 +000043 # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw
Lei Zhang7b701892017-03-28 13:56:29 -070044 # paths.
caryclarkaf177fe2016-11-16 10:10:03 -080045 pdf_use_skia_paths = pdf_use_skia_paths_override
46
thestig3e454bf2016-07-29 16:29:04 -070047 # Build PDFium with or without experimental win32 GDI APIs.
48 pdf_use_win32_gdi = pdf_use_win32_gdi_override
49
dsinclair685bb882016-04-20 07:32:39 -070050 # Build PDFium standalone
51 pdf_is_standalone = false
Dan Sinclairda489972017-01-17 10:12:55 -050052
dan sinclairfa171d22017-03-26 22:38:17 -040053 # Build a complete static library
54 pdf_is_complete_lib = false
55
Henrique Nakashima95ea7782017-07-11 16:42:43 -040056 # Enable callgrind for performance profiling
57 enable_callgrind = false
58
Miklos Vajna2df760f2017-05-06 01:54:54 +020059 # Don't build against bundled zlib.
60 use_system_zlib = false
Miklos Vajna0fafb4f2017-05-24 08:40:49 +020061
62 # Don't build against bundled lcms2.
63 use_system_lcms2 = false
Andrew Weintraub98b56332017-11-29 23:27:10 +000064
65 # Don't build against bundled libpng.
66 use_system_libpng = false
Tom Sepez452b4f32015-10-13 09:27:27 -070067}
Nicolas Penaf5676902017-05-15 13:51:40 -040068
69if (pdf_use_skia && pdf_use_skia_paths) {
70 assert(false, "Enable at most ONE of pdf_use_skia and pdf_use_skia_paths")
71}
Ryan Harrisonb93178e2018-04-10 19:54:16 +000072
73assert(!pdf_is_complete_lib || !is_component_build,
74 "pdf_is_complete_lib=true requires is_component_build=false")