Commit 443df85b authored by tsepez's avatar tsepez Committed by Commit bot

Keep pdf_engine in sync with PDF_ENABLE_XFA.

When the pdf_enable_xfa GYP_DEFINES flag is present, pass
-DPDF_ENABLE_XFA during the build of pdf engine. If the
XFA branch is present, the public XFA header will notice this
flag, and define PDF_USE_XFA in response, which the engine
tests to control its usage of XFA features.  When chrome is
built against master, PDF_USE_XFA is never defined, so this
still works regardless of the setting of the GYP define.

Review URL: https://codereview.chromium.org/1511443004

Cr-Commit-Position: refs/heads/master@{#364466}
parent be7410fa
......@@ -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("//third_party/pdfium/pdfium.gni")
pdf_engine = 0 # 0 PDFium
static_library("pdf") {
......@@ -46,6 +48,10 @@ static_library("pdf") {
]
}
if (pdf_enable_xfa) {
defines = [ "PDF_ENABLE_XFA" ]
}
deps = [
"//base",
"//components/ui/zoom",
......
{
'variables': {
'chromium_code': 1,
'pdf_enable_xfa%': 0,
'pdf_engine%': 0, # 0 PDFium
},
'targets': [
......@@ -55,6 +56,11 @@
'pdfium/pdfium_range.h',
],
}],
['pdf_enable_xfa==1', {
'defines': [
'PDF_ENABLE_XFA',
]
}],
['OS=="win"', {
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment