From 2df760fea931b546d290e797b8c216530c4e13c1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Sat, 6 May 2017 01:54:54 +0200 Subject: core: allow building against system zlib In a way similar to the existing USE_SYSTEM_LIBJPEG. The default is of course still the DEPS-based zlib checkout. Changes in v2: 1) Since Chromium doesn't have //third_party:zlib (AKA a "zlib" target in //third_party/BUILD.GN) all the targets that depended on //third_party:zlib now depend on third_party:zlib, which always points to PDFium's third_party/BUILD.GN. The targets that depended on //third_party:zlib in third_party/BUILD.GN just depend on :zlib instead. 2) Move the zlib bits out of !build_with_chromium block. Change-Id: Id73eb07591418ff2ae71b83b87c18af71b49a22a Reviewed-on: https://pdfium-review.googlesource.com/5030 Reviewed-by: Lei Zhang Commit-Queue: Lei Zhang --- core/fxcodec/codec/fx_codec_flate.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/fxcodec') diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index 4d1e034a23..5af3e99c2e 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -15,7 +15,12 @@ #include "core/fxcrt/fx_extension.h" #include "third_party/base/numerics/safe_conversions.h" #include "third_party/base/ptr_util.h" + +#if defined(USE_SYSTEM_ZLIB) +#include +#else #include "third_party/zlib/zlib.h" +#endif extern "C" { -- cgit v1.2.3