summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn56
-rw-r--r--build/standalone.gypi1
-rw-r--r--pdfium.gni2
-rw-r--r--pdfium.gyp2
-rw-r--r--samples/BUILD.gn9
-rw-r--r--samples/samples.gyp2
6 files changed, 47 insertions, 25 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 2aef63a1fb..d3006aea86 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -123,7 +123,6 @@ static_library("pdfium") {
":fpdfapi",
":fpdfdoc",
":fpdftext",
- ":fpdfxfa",
":fxcodec",
":fxcrt",
":fxedit",
@@ -133,7 +132,9 @@ static_library("pdfium") {
]
if (pdf_enable_xfa) {
- deps += [ ":xfa" ]
+ deps += [
+ ":fpdfxfa",
+ ]
}
if (is_win) {
@@ -367,8 +368,6 @@ static_library("fxcodec") {
deps = [
"third_party:fx_lcms2",
"third_party:fx_libopenjpeg",
- "third_party:fx_lpng",
- "third_party:fx_tiff",
"third_party:fx_zlib",
# This is a generic JPEG library dependency.
@@ -380,18 +379,12 @@ static_library("fxcodec") {
"core/include/fxcodec/fx_codec_flate.h",
"core/src/fxcodec/codec/codec_int.h",
"core/src/fxcodec/codec/fx_codec.cpp",
- "core/src/fxcodec/codec/fx_codec_bmp.cpp",
"core/src/fxcodec/codec/fx_codec_fax.cpp",
"core/src/fxcodec/codec/fx_codec_flate.cpp",
- "core/src/fxcodec/codec/fx_codec_gif.cpp",
"core/src/fxcodec/codec/fx_codec_icc.cpp",
"core/src/fxcodec/codec/fx_codec_jbig.cpp",
"core/src/fxcodec/codec/fx_codec_jpeg.cpp",
"core/src/fxcodec/codec/fx_codec_jpx_opj.cpp",
- "core/src/fxcodec/codec/fx_codec_png.cpp",
- "core/src/fxcodec/codec/fx_codec_progress.cpp",
- "core/src/fxcodec/codec/fx_codec_progress.h",
- "core/src/fxcodec/codec/fx_codec_tiff.cpp",
"core/src/fxcodec/jbig2/JBig2_ArithDecoder.cpp",
"core/src/fxcodec/jbig2/JBig2_ArithDecoder.h",
"core/src/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp",
@@ -430,13 +423,26 @@ static_library("fxcodec") {
"core/src/fxcodec/jbig2/JBig2_SymbolDict.h",
"core/src/fxcodec/jbig2/JBig2_TrdProc.cpp",
"core/src/fxcodec/jbig2/JBig2_TrdProc.h",
- "core/src/fxcodec/lbmp/fx_bmp.cpp",
- "core/src/fxcodec/lbmp/fx_bmp.h",
- "core/src/fxcodec/lgif/fx_gif.cpp",
- "core/src/fxcodec/lgif/fx_gif.h",
]
include_dirs = []
-
+ if (pdf_enable_xfa) {
+ sources += [
+ "core/src/fxcodec/codec/fx_codec_bmp.cpp",
+ "core/src/fxcodec/codec/fx_codec_gif.cpp",
+ "core/src/fxcodec/codec/fx_codec_png.cpp",
+ "core/src/fxcodec/codec/fx_codec_progress.cpp",
+ "core/src/fxcodec/codec/fx_codec_progress.h",
+ "core/src/fxcodec/codec/fx_codec_tiff.cpp",
+ "core/src/fxcodec/lbmp/fx_bmp.cpp",
+ "core/src/fxcodec/lbmp/fx_bmp.h",
+ "core/src/fxcodec/lgif/fx_gif.cpp",
+ "core/src/fxcodec/lgif/fx_gif.h",
+ ]
+ deps += [
+ "third_party:fx_lpng",
+ "third_party:fx_tiff",
+ ]
+ }
if (is_posix) {
# core/src/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int
# conversion to check that an address is 16-bit aligned (benign).
@@ -456,7 +462,6 @@ config("fxge_warnings") {
static_library("fxcrt") {
sources = [
- "core/include/fxcrt/fx_arb.h",
"core/include/fxcrt/fx_basic.h",
"core/include/fxcrt/fx_bidi.h",
"core/include/fxcrt/fx_coordinates.h",
@@ -469,8 +474,6 @@ static_library("fxcrt") {
"core/include/fxcrt/fx_ucd.h",
"core/include/fxcrt/fx_xml.h",
"core/src/fxcrt/extension.h",
- "core/src/fxcrt/fx_arabic.cpp",
- "core/src/fxcrt/fx_arabic.h",
"core/src/fxcrt/fx_basic_array.cpp",
"core/src/fxcrt/fx_basic_bstring.cpp",
"core/src/fxcrt/fx_basic_buffer.cpp",
@@ -498,6 +501,13 @@ static_library("fxcrt") {
"core/src/fxcrt/plex.h",
"core/src/fxcrt/xml_int.h",
]
+ if (pdf_enable_xfa) {
+ sources += [
+ "core/include/fxcrt/fx_arb.h",
+ "core/src/fxcrt/fx_arabic.cpp",
+ "core/src/fxcrt/fx_arabic.h",
+ ]
+ }
configs += [ ":pdfium_config" ]
}
@@ -1427,7 +1437,7 @@ static_library("xfa") {
"xfa/src/fxjse/src/value.cpp",
"xfa/src/fxjse/src/value.h"
]
- include_dirs = [
+ include_dirs += [
"//v8",
"//v8/include",
]
@@ -1460,8 +1470,6 @@ test("pdfium_unittests") {
"core/src/fxcrt/fx_extension_unittest.cpp",
"core/src/fxcrt/fx_system_unittest.cpp",
"third_party/base/nonstd_unique_ptr_unittest.cpp",
- "xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp",
- "xfa/src/fxfa/src/parser/xfa_utils_imp_unittest.cpp",
]
deps = [
"//testing/gtest",
@@ -1469,6 +1477,12 @@ test("pdfium_unittests") {
":pdfium",
":test_support",
]
+ if (pdf_enable_xfa) {
+ sources += [
+ "xfa/src/fxbarcode/pdf417/BC_PDF417HighLevelEncoder_unittest.cpp",
+ "xfa/src/fxfa/src/parser/xfa_utils_imp_unittest.cpp",
+ ]
+ }
configs += [ ":pdfium_config" ]
}
diff --git a/build/standalone.gypi b/build/standalone.gypi
index 402c726372..2eac19882c 100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -13,6 +13,7 @@
'use_goma%': 0,
'gomadir%': '',
'msvs_multi_core_compile%': '1',
+ 'pdf_enable_xfa%': 1,
'variables': {
'variables': {
'variables': {
diff --git a/pdfium.gni b/pdfium.gni
index 7f08c71086..ec71db9e2b 100644
--- a/pdfium.gni
+++ b/pdfium.gni
@@ -13,7 +13,7 @@ declare_args() {
pdf_enable_v8 = true
# Build PDFium either with or without XFA Forms support.
- pdf_enable_xfa = true
+ pdf_enable_xfa = false
# Build PDFium against skia (experimental) rather than agg.
pdf_use_skia = false
diff --git a/pdfium.gyp b/pdfium.gyp
index aa18478824..82a170dbe2 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -8,7 +8,7 @@
#'chromium_code': 1,
'pdf_use_skia%': 0,
'pdf_enable_v8%': 1,
- 'pdf_enable_xfa%': 1,
+ 'pdf_enable_xfa%': 0, # Set to 1 by standalone.gypi in a standalone build.
'conditions': [
['OS=="linux"', {
'bundle_freetype%': 0,
diff --git a/samples/BUILD.gn b/samples/BUILD.gn
index 6a9a516e25..e1192c4a43 100644
--- a/samples/BUILD.gn
+++ b/samples/BUILD.gn
@@ -31,8 +31,9 @@ config("pdfium_samples_config") {
executable("pdfium_test") {
testonly = true
sources = [
- "image_diff_png.cc",
"pdfium_test.cc",
+ "image_diff_png.cc",
+ "image_diff_png.h",
]
deps = [
"//build/config/sanitizers:deps",
@@ -44,6 +45,9 @@ executable("pdfium_test") {
# of results across platforms.
"//third_party/pdfium/third_party:fx_freetype",
]
+ if (!pdf_enable_xfa) {
+ deps += [ "../third_party:fx_lpng" ]
+ }
if (pdf_enable_v8) {
deps += [ "//v8:v8_libplatform" ]
include_dirs = [
@@ -65,6 +69,9 @@ executable("pdfium_diff") {
"//build/config/sanitizers:deps",
"//third_party/pdfium",
]
+ if (!pdf_enable_xfa) {
+ deps += [ "../third_party:fx_lpng" ]
+ }
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
":pdfium_samples_config",
diff --git a/samples/samples.gyp b/samples/samples.gyp
index 31fcbf7c72..da9ce74b0a 100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -5,7 +5,7 @@
{
'variables': {
'pdf_enable_v8%': 1,
- 'pdf_enable_xfa%': 1,
+ 'pdf_enable_xfa%': 0, # Set to 1 in standalone builds by standalone.gypi.
},
'target_defaults': {
'defines' : [