dsinclair | 038bf0b | 2016-04-30 06:00:05 -0700 | [diff] [blame] | 1 | # Copyright 2015 PDFium Authors. All rights reserved. |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
dsinclair | fd670fd | 2016-05-03 06:14:34 -0700 | [diff] [blame] | 5 | import("//build_overrides/pdfium.gni") |
| 6 | |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 7 | # This file contains PDFium-related build flags. |
| 8 | |
| 9 | declare_args() { |
Lei Zhang | 984f1d8 | 2017-03-31 16:11:55 -0700 | [diff] [blame] | 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. |
Lei Zhang | 7b70189 | 2017-03-28 13:56:29 -0700 | [diff] [blame] | 16 | pdf_bundle_freetype = pdf_bundle_freetype_override |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 17 | |
Ryan Harrison | 9ce75b8 | 2018-06-06 19:45:14 +0000 | [diff] [blame] | 18 | # Generate logging messages for click events that reach PDFium |
| 19 | pdf_enable_click_logging = false |
| 20 | |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 21 | # Build PDFium either with or without v8 support. |
dsinclair | fd670fd | 2016-05-03 06:14:34 -0700 | [diff] [blame] | 22 | pdf_enable_v8 = pdf_enable_v8_override |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 23 | |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 24 | # Build PDFium either with or without XFA Forms support. |
dsinclair | fd670fd | 2016-05-03 06:14:34 -0700 | [diff] [blame] | 25 | pdf_enable_xfa = pdf_enable_xfa_override |
Tom Sepez | a8a39e2 | 2015-10-12 15:47:07 -0700 | [diff] [blame] | 26 | |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 27 | # If XFA, also support bmp codec. Ignored if not XFA. |
Dan Sinclair | b3b6e92 | 2017-02-28 11:33:33 -0500 | [diff] [blame] | 28 | pdf_enable_xfa_bmp = true |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 29 | |
| 30 | # If XFA, also support gif codec. Ignored if not XFA. |
Dan Sinclair | b3b6e92 | 2017-02-28 11:33:33 -0500 | [diff] [blame] | 31 | pdf_enable_xfa_gif = true |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 32 | |
| 33 | # If XFA, also support png codec. Ignored if not XFA. |
Dan Sinclair | b3b6e92 | 2017-02-28 11:33:33 -0500 | [diff] [blame] | 34 | pdf_enable_xfa_png = true |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 35 | |
| 36 | # If XFA, also support png codec. Ignored if not XFA. |
Dan Sinclair | b3b6e92 | 2017-02-28 11:33:33 -0500 | [diff] [blame] | 37 | pdf_enable_xfa_tiff = true |
Tom Sepez | 73c9f3b | 2017-02-27 10:12:59 -0800 | [diff] [blame] | 38 | |
Lei Zhang | 360edeb | 2017-12-19 18:06:35 +0000 | [diff] [blame] | 39 | # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw |
Lei Zhang | 7b70189 | 2017-03-28 13:56:29 -0700 | [diff] [blame] | 40 | # everything. |
dsinclair | fd670fd | 2016-05-03 06:14:34 -0700 | [diff] [blame] | 41 | pdf_use_skia = pdf_use_skia_override |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 42 | |
Lei Zhang | 360edeb | 2017-12-19 18:06:35 +0000 | [diff] [blame] | 43 | # Build PDFium against Skia (experimental) rather than AGG. Use Skia to draw |
Lei Zhang | 7b70189 | 2017-03-28 13:56:29 -0700 | [diff] [blame] | 44 | # paths. |
caryclark | af177fe | 2016-11-16 10:10:03 -0800 | [diff] [blame] | 45 | pdf_use_skia_paths = pdf_use_skia_paths_override |
| 46 | |
thestig | 3e454bf | 2016-07-29 16:29:04 -0700 | [diff] [blame] | 47 | # Build PDFium with or without experimental win32 GDI APIs. |
| 48 | pdf_use_win32_gdi = pdf_use_win32_gdi_override |
| 49 | |
dsinclair | 685bb88 | 2016-04-20 07:32:39 -0700 | [diff] [blame] | 50 | # Build PDFium standalone |
| 51 | pdf_is_standalone = false |
Dan Sinclair | da48997 | 2017-01-17 10:12:55 -0500 | [diff] [blame] | 52 | |
dan sinclair | fa171d2 | 2017-03-26 22:38:17 -0400 | [diff] [blame] | 53 | # Build a complete static library |
| 54 | pdf_is_complete_lib = false |
| 55 | |
Henrique Nakashima | 95ea778 | 2017-07-11 16:42:43 -0400 | [diff] [blame] | 56 | # Enable callgrind for performance profiling |
| 57 | enable_callgrind = false |
| 58 | |
Miklos Vajna | 2df760f | 2017-05-06 01:54:54 +0200 | [diff] [blame] | 59 | # Don't build against bundled zlib. |
| 60 | use_system_zlib = false |
Miklos Vajna | 0fafb4f | 2017-05-24 08:40:49 +0200 | [diff] [blame] | 61 | |
| 62 | # Don't build against bundled lcms2. |
| 63 | use_system_lcms2 = false |
Andrew Weintraub | 98b5633 | 2017-11-29 23:27:10 +0000 | [diff] [blame] | 64 | |
| 65 | # Don't build against bundled libpng. |
| 66 | use_system_libpng = false |
Tom Sepez | 452b4f3 | 2015-10-13 09:27:27 -0700 | [diff] [blame] | 67 | } |
Nicolas Pena | f567690 | 2017-05-15 13:51:40 -0400 | [diff] [blame] | 68 | |
| 69 | if (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 Harrison | b93178e | 2018-04-10 19:54:16 +0000 | [diff] [blame] | 72 | |
| 73 | assert(!pdf_is_complete_lib || !is_component_build, |
| 74 | "pdf_is_complete_lib=true requires is_component_build=false") |