Fix pdfium_test build inside Chromium.
authorJohn Abd-El-Malek <jam@chromium.org>
Tue, 17 Feb 2015 21:26:45 +0000 (13:26 -0800)
committerJohn Abd-El-Malek <jam@chromium.org>
Tue, 17 Feb 2015 21:26:45 +0000 (13:26 -0800)
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/925763003

samples/BUILD.gn
samples/samples.gyp

index 6bd2a81..ca7cafa 100644 (file)
@@ -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" ]
 }
index c972142..97497ee 100644 (file)
       '<(DEPTH)/v8',
       '<(DEPTH)/v8/include',
     ],
+    'defines' : [
+      'PNG_PREFIX',
+      'PNGPREFIX_H',
+      'PNG_USE_READ_MACROS',
+    ],
   },
   'targets': [
     {