summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-06 10:32:28 -0800
committerLei Zhang <thestig@chromium.org>2015-11-06 10:32:28 -0800
commit461b634b8b45bf022412b364fac37f6ad3cafb69 (patch)
tree4fcfcc8c18ce375ebcadcaeeeeb0d7beb2c30336 /samples
parentb3a8c21f42a588f80a849566bed6bcb1a82a50c6 (diff)
downloadpdfium-461b634b8b45bf022412b364fac37f6ad3cafb69.tar.xz
XFA: Sync samples/ build files with master.
This makes pdfium_test always link with the bundled freetype, which will fix many failing corpus tests. This merges snippets of 34bb6c58fe60206a08dc0a1f37b7cfe83e8c762c R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1423063006 .
Diffstat (limited to 'samples')
-rw-r--r--samples/BUILD.gn17
-rw-r--r--samples/samples.gyp25
2 files changed, 27 insertions, 15 deletions
diff --git a/samples/BUILD.gn b/samples/BUILD.gn
index 2039d2f4dd..6cb76e9690 100644
--- a/samples/BUILD.gn
+++ b/samples/BUILD.gn
@@ -8,6 +8,7 @@ group("samples") {
testonly = true
deps = [
":pdfium_test",
+ ":pdfium_diff",
]
}
@@ -17,6 +18,7 @@ config("pdfium_samples_config") {
"PNGPREFIX_H",
"PNG_USE_READ_MACROS",
]
+ include_dirs = [ ".." ]
if (pdf_enable_v8) {
defines += [ "PDF_ENABLE_V8", ]
}
@@ -34,11 +36,14 @@ executable("pdfium_test") {
deps = [
"//third_party/pdfium:pdfium",
"//third_party/pdfium:test_support",
+
+ # Regardless of whether the library ships against system freetype,
+ # always link this binary against the bundled one for consistency
+ # of results across platforms.
+ "//third_party/pdfium/third_party:fx_freetype",
]
if (pdf_enable_v8) {
- deps += [
- "//v8:v8_libplatform",
- ]
+ deps += [ "//v8:v8_libplatform" ]
include_dirs = [
"//v8",
"//v8/include",
@@ -57,5 +62,9 @@ executable("pdfium_diff") {
deps = [
"//third_party/pdfium",
]
- configs += [ ":pdfium_samples_config" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":pdfium_samples_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
}
diff --git a/samples/samples.gyp b/samples/samples.gyp
index 0044c5c030..97181ba208 100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -7,18 +7,15 @@
'pdf_enable_v8%': 1,
},
'target_defaults': {
- 'type': 'executable',
- 'dependencies': [
- '../pdfium.gyp:pdfium',
- ],
- 'include_dirs': [
- '<(DEPTH)',
- ],
'defines' : [
'PNG_PREFIX',
'PNGPREFIX_H',
'PNG_USE_READ_MACROS',
],
+ 'include_dirs': [
+ # This is implicit in GN.
+ '<(DEPTH)',
+ ],
'conditions': [
['pdf_enable_v8==1', {
'defines': [
@@ -38,11 +35,20 @@
'dependencies': [
'../pdfium.gyp:pdfium',
'../pdfium.gyp:test_support',
+ # Regardless of whether the library ships against system freetype,
+ # always link this binary against the bundled one for consistency
+ # of results across platforms.
+ '../third_party/third_party.gyp:fx_freetype',
],
'sources': [
'pdfium_test.cc',
'image_diff_png.cc',
],
+ 'link_settings': {
+ 'libraries!': [
+ '-lfreetype',
+ ],
+ },
'conditions': [
['pdf_enable_v8==1', {
'dependencies': [
@@ -56,12 +62,9 @@
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
- '../pdfium.gyp:fxcodec',
+ '../pdfium.gyp:pdfium',
'../third_party/third_party.gyp:pdfium_base',
],
- 'include_dirs': [
- '../../',
- ],
'sources': [
'image_diff.cc',
'image_diff_png.h',