summaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-09 20:31:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 20:31:12 +0000
commitd5d48457dabbe71e7f6b0baf2eaea6aa0dc86736 (patch)
tree5694486d6c11a60a0ce602759c3c1e07c63b46fc /BUILD.gn
parent54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (diff)
downloadpdfium-d5d48457dabbe71e7f6b0baf2eaea6aa0dc86736.tar.xz
Do not build PNG when codec is disabled
Currently all of the PNG related code is being built when support for the codec is disabled, it just isn't being utilized. Depending on the settings being used, this unneeded code may or may not get stripped during linking. This CL explicitly turns off building the PNG codec code if support for PNG is turned off. BUG=pdfium:1080 Change-Id: I9c5247145fcadbcb1bd2243aa83350304ba421ff Reviewed-on: https://pdfium-review.googlesource.com/32270 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn15
1 files changed, 8 insertions, 7 deletions
diff --git a/BUILD.gn b/BUILD.gn
index c6663ec8f3..e6e6ea504e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -284,10 +284,7 @@ jumbo_static_library("image_diff") {
"testing/image_diff/image_diff_png.h",
]
configs += [ ":pdfium_core_config" ]
- deps = []
- if (!pdf_enable_xfa) {
- deps += [ "third_party:png" ]
- }
+ deps = [ "third_party:png" ]
}
# Targets below this are only visible within this file (and to the
@@ -791,8 +788,6 @@ jumbo_static_library("fxcodec") {
"core/fxcodec/codec/ccodec_bmpmodule.h",
"core/fxcodec/codec/ccodec_gifmodule.cpp",
"core/fxcodec/codec/ccodec_gifmodule.h",
- "core/fxcodec/codec/ccodec_pngmodule.cpp",
- "core/fxcodec/codec/ccodec_pngmodule.h",
"core/fxcodec/codec/ccodec_progressivedecoder.h",
"core/fxcodec/codec/fx_codec_progress.cpp",
"core/fxcodec/gif/cfx_gif.cpp",
@@ -802,7 +797,13 @@ jumbo_static_library("fxcodec") {
"core/fxcodec/gif/cfx_lzwdecompressor.cpp",
"core/fxcodec/gif/cfx_lzwdecompressor.h",
]
- deps += [ "third_party:png" ]
+ if (pdf_enable_xfa_png) {
+ sources += [
+ "core/fxcodec/codec/ccodec_pngmodule.cpp",
+ "core/fxcodec/codec/ccodec_pngmodule.h",
+ ]
+ deps += [ "third_party:png" ]
+ }
if (pdf_enable_xfa_tiff) {
sources += [
"core/fxcodec/codec/ccodec_tiffmodule.cpp",