summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn2
-rw-r--r--build_overrides/pdfium.gni16
-rw-r--r--pdfium.gni12
-rw-r--r--samples/BUILD.gn5
4 files changed, 22 insertions, 13 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 6e5e7b2e82..562afffac7 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -212,7 +212,7 @@ static_library("pdfium") {
]
}
- if (pdfium_bundle_freetype) {
+ if (pdf_bundle_freetype) {
deps += [ "third_party:fx_freetype" ]
} else {
libs += [ "freetype" ]
diff --git a/build_overrides/pdfium.gni b/build_overrides/pdfium.gni
index 18e6a87399..d6bcc850cd 100644
--- a/build_overrides/pdfium.gni
+++ b/build_overrides/pdfium.gni
@@ -5,16 +5,28 @@
# This file contains PDFium-related build overrides.
# Build PDFium either with or without v8 support.
+# Default: With V8 support.
pdf_enable_v8_override = true
# Build PDFium either with or without XFA Forms support.
+# Default: Without XFA support.
pdf_enable_xfa_override = false
-# Build PDFium against skia (experimental) rather than agg, replacing all PDFium graphics.
+# Build PDFium either using the bundled FreeType, or using the system FreeType.
+# System FreeType only exists on Linux.
+# Default: Use the bundled FreeType.
+pdf_bundle_freetype_override = true
+
+# Build PDFium against skia (experimental) rather than agg, replacing all PDFium
+# graphics.
+# Default: Use agg.
pdf_use_skia_override = false
-# Build PDFium against skia (experimental) rather than agg, adding only path support.
+# Build PDFium against skia (experimental) rather than agg, adding only path
+# support.
+# Default: Use agg.
pdf_use_skia_paths_override = false
# Build PDFium either with or without experimental win32 GDI APIs.
+# Default: Without experimental win32 GDI APIs.
pdf_use_win32_gdi_override = false
diff --git a/pdfium.gni b/pdfium.gni
index 4548819711..3626824085 100644
--- a/pdfium.gni
+++ b/pdfium.gni
@@ -7,9 +7,9 @@ import("//build_overrides/pdfium.gni")
# This file contains PDFium-related build flags.
declare_args() {
- # On Android there's no system FreeType. On Windows and Mac, only a few
- # methods are used from it.
- pdfium_bundle_freetype = !is_linux
+ # Build PDFium either using the bundled FreeType, or using the system
+ # FreeType.
+ pdf_bundle_freetype = pdf_bundle_freetype_override
# Build PDFium either with or without v8 support.
pdf_enable_v8 = pdf_enable_v8_override
@@ -29,10 +29,12 @@ declare_args() {
# If XFA, also support png codec. Ignored if not XFA.
pdf_enable_xfa_tiff = true
- # Build PDFium against skia (experimental) rather than agg. Use Skia to draw everything.
+ # Build PDFium against skia (experimental) rather than agg. Use Skia to draw
+ # everything.
pdf_use_skia = pdf_use_skia_override
- # Build PDFium against skia (experimental) rather than agg. Use Skia to draw paths.
+ # Build PDFium against skia (experimental) rather than agg. Use Skia to draw
+ # paths.
pdf_use_skia_paths = pdf_use_skia_paths_override
# Build PDFium with or without experimental win32 GDI APIs.
diff --git a/samples/BUILD.gn b/samples/BUILD.gn
index 23f4d0ca56..d658a33cf8 100644
--- a/samples/BUILD.gn
+++ b/samples/BUILD.gn
@@ -55,11 +55,6 @@ executable("pdfium_test") {
"../:test_support",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
-
- # Regardless of whether the library ships against system freetype,
- # always link this binary against the bundled one for consistency
- # of results across platforms.
- "../third_party:fx_freetype",
]
if (!pdf_enable_xfa) {
deps += [ "../third_party:fx_lpng" ]