diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-09 12:45:15 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-09 12:45:15 -0700 |
commit | f1c713663192368d26031a4caed1f9705f4510af (patch) | |
tree | d7078da243fe29c2ac9160ab21725bee3a349a7b /samples/samples.gyp | |
parent | c9952e66c588aad6a5996796fb0c96b202e6de0a (diff) | |
download | pdfium-f1c713663192368d26031a4caed1f9705f4510af.tar.xz |
Allow compiling PDFium without V8.
Original patch from issue 1391843004 at patchset 1
(http://crrev.com/1391843004#ps1)
Introduce a pdf_enable_v8 GYP variable, which controls a
corresponding PDF_ENABLE_V8 #define, and bring in the real
JS library when set. Otherwise, link against a stub JS
runtime.
BUG=pdfium:211
R=dml@google.com, jochen@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1395733006 .
Diffstat (limited to 'samples/samples.gyp')
-rw-r--r-- | samples/samples.gyp | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/samples/samples.gyp b/samples/samples.gyp index 4b6c16bf2e..496a274da7 100644 --- a/samples/samples.gyp +++ b/samples/samples.gyp @@ -3,6 +3,9 @@ # found in the LICENSE file. { + 'variables': { + 'pdf_enable_v8%': 1, + }, 'target_defaults': { 'defines' : [ 'PNG_PREFIX', @@ -11,8 +14,17 @@ ], 'include_dirs': [ '<(DEPTH)', - '<(DEPTH)/v8', - '<(DEPTH)/v8/include', + ], + 'conditions': [ + ['pdf_enable_v8==1', { + 'defines': [ + 'PDF_ENABLE_V8', + ], + 'include_dirs': [ + '<(DEPTH)/v8', + '<(DEPTH)/v8/include', + ], + }], ], }, 'targets': [ @@ -26,7 +38,6 @@ # always link this binary against the bundled one for consistency # of results across platforms. '../third_party/third_party.gyp:fx_freetype', - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform', ], 'sources': [ 'pdfium_test.cc', @@ -37,6 +48,13 @@ '-lfreetype', ], }, + 'conditions': [ + ['pdf_enable_v8==1', { + 'dependencies': [ + '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform', + ], + }], + ], }, { 'target_name': 'pdfium_diff', |