From ca6c0d3262d994fbb008ee1ae5ff19c1612bc982 Mon Sep 17 00:00:00 2001 From: John Abd-El-Malek Date: Tue, 17 Feb 2015 13:26:45 -0800 Subject: Fix pdfium_test build inside Chromium. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/925763003 --- samples/BUILD.gn | 10 ++++++++++ samples/samples.gyp | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/samples/BUILD.gn b/samples/BUILD.gn index 6bd2a81359..ca7cafa685 100644 --- a/samples/BUILD.gn +++ b/samples/BUILD.gn @@ -8,6 +8,14 @@ group("samples") { ] } +config("pdfium_samples_config") { + defines = [ + "PNG_PREFIX", + "PNGPREFIX_H", + "PNG_USE_READ_MACROS", + ] +} + executable("pdfium_test") { sources = [ "image_diff_png.cc", @@ -21,6 +29,7 @@ executable("pdfium_test") { "//v8", "//v8/include", ] + configs += [ ":pdfium_samples_config" ] } executable("pdfium_diff") { @@ -32,4 +41,5 @@ executable("pdfium_diff") { deps = [ "//third_party/pdfium", ] + configs += [ ":pdfium_samples_config" ] } diff --git a/samples/samples.gyp b/samples/samples.gyp index c972142ed2..97497ee2d9 100644 --- a/samples/samples.gyp +++ b/samples/samples.gyp @@ -14,6 +14,11 @@ '<(DEPTH)/v8', '<(DEPTH)/v8/include', ], + 'defines' : [ + 'PNG_PREFIX', + 'PNGPREFIX_H', + 'PNG_USE_READ_MACROS', + ], }, 'targets': [ { -- cgit v1.2.3