From 98b56332e9b5c04cde680301a8b0685590c3b922 Mon Sep 17 00:00:00 2001 From: Andrew Weintraub Date: Wed, 29 Nov 2017 23:27:10 +0000 Subject: Allow building pdfium against the system version of libpng. Bug: Change-Id: I0c930ca30637f58af3b60ed8f1383bd9234a1723 Reviewed-on: https://pdfium-review.googlesource.com/19850 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- third_party/BUILD.gn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'third_party') diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index a188f56194..3861f6aed7 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -398,6 +398,21 @@ static_library("fx_libopenjpeg") { ] } +config("system_libpng_config") { + libs = [ "png" ] + defines = [ "USE_SYSTEM_LIBPNG" ] +} + +group("png") { + if (use_system_libpng) { + public_configs = [ ":system_libpng_config" ] + } else { + public_deps = [ + ":fx_lpng", + ] + } +} + static_library("fx_lpng") { configs -= [ "//build/config/compiler:chromium_code" ] configs += [ -- cgit v1.2.3