summaryrefslogtreecommitdiff
path: root/third_party/BUILD.gn
diff options
context:
space:
mode:
authorAndrew Weintraub <asweintraub@google.com>2017-11-29 23:27:10 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-29 23:27:10 +0000
commit98b56332e9b5c04cde680301a8b0685590c3b922 (patch)
tree97b1f6f67b60678f37844322ccb0a657f9b3266c /third_party/BUILD.gn
parent02f46ae70560c4bd70950faa1496e0c6b244ff8d (diff)
downloadpdfium-98b56332e9b5c04cde680301a8b0685590c3b922.tar.xz
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 <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'third_party/BUILD.gn')
-rw-r--r--third_party/BUILD.gn15
1 files changed, 15 insertions, 0 deletions
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 += [