summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-03 06:14:34 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-03 06:14:34 -0700
commitfd670fdef8984fd7f8824b17d8fcf52fdec9aacc (patch)
tree70dfa01e04ad718dc23c11a31d6f8a48ee52671d
parent6020e45b406e7a130024de87101b4493543f9deb (diff)
downloadpdfium-fd670fdef8984fd7f8824b17d8fcf52fdec9aacc.tar.xz
Reland of Allow overriding GN build flagschromium/2724
This reverts commit 038bf0b129e56212a6de0989dca1ae023bb17c5d. In order to enable XFA from GN builds we need to be able to override pdf_enable_xfa. To do this a build_overrides/pdfium.gni file needs to be created in Chrome. To use that, //pdfium.gni reads the override values and sets them into the defined arguments. We have to create a build_overrides/pdfium.gni file in PDFium that sets the default overrides for PDFium builds. BUG=chromium:62400 Review-Url: https://codereview.chromium.org/1936313002
-rw-r--r--build_overrides/pdfium.gni14
-rw-r--r--pdfium.gni8
2 files changed, 19 insertions, 3 deletions
diff --git a/build_overrides/pdfium.gni b/build_overrides/pdfium.gni
new file mode 100644
index 0000000000..246671bb62
--- /dev/null
+++ b/build_overrides/pdfium.gni
@@ -0,0 +1,14 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This file contains PDFium-related build overrides.
+
+# Build PDFium either with or without v8 support.
+pdf_enable_v8_override = true
+
+# Build PDFium either with or without XFA Forms support.
+pdf_enable_xfa_override = false
+
+# Build PDFium against skia (experimental) rather than agg.
+pdf_use_skia_override = false
diff --git a/pdfium.gni b/pdfium.gni
index b85ac74d0f..9e20f96bf7 100644
--- a/pdfium.gni
+++ b/pdfium.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build_overrides/pdfium.gni")
+
# This file contains PDFium-related build flags.
declare_args() {
@@ -10,13 +12,13 @@ declare_args() {
pdfium_bundle_freetype = !is_linux
# Build PDFium either with or without v8 support.
- pdf_enable_v8 = true
+ pdf_enable_v8 = pdf_enable_v8_override
# Build PDFium either with or without XFA Forms support.
- pdf_enable_xfa = false
+ pdf_enable_xfa = pdf_enable_xfa_override
# Build PDFium against skia (experimental) rather than agg.
- pdf_use_skia = false
+ pdf_use_skia = pdf_use_skia_override
# Build PDFium standalone
pdf_is_standalone = false