summaryrefslogtreecommitdiff
path: root/pdfium.gyp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-13 09:27:27 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-13 09:27:27 -0700
commit452b4f3f0ce1411350d57373528ccde77e40727d (patch)
treedb9049209ff1f754026e680e6c18361ae4bc1a85 /pdfium.gyp
parente865ed12c4a476a4c74bf1ae97d3a6fa8ca06f0a (diff)
downloadpdfium-452b4f3f0ce1411350d57373528ccde77e40727d.tar.xz
Merge to XFA: Allow compiling PDFium without V8.
Original Review URL: https://codereview.chromium.org/1395733006 . (cherry picked from commit f1c713663192368d26031a4caed1f9705f4510af) Conflicts: BUILD.gn fpdfsdk/src/fpdfview.cpp fpdfsdk/src/javascript/JS_Runtime.cpp pdfium.gyp samples/BUILD.gn samples/samples.gyp BUG=pdfium:211 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1393833006 .
Diffstat (limited to 'pdfium.gyp')
-rw-r--r--pdfium.gyp157
1 files changed, 82 insertions, 75 deletions
diff --git a/pdfium.gyp b/pdfium.gyp
index 6ef54ab80d..3785d38a1b 100644
--- a/pdfium.gyp
+++ b/pdfium.gyp
@@ -1,6 +1,7 @@
{
'variables': {
'pdf_use_skia%': 0,
+ 'pdf_enable_v8%': 1,
'pdf_enable_xfa%': 1,
'conditions': [
['OS=="linux"', {
@@ -27,6 +28,9 @@
['pdf_use_skia==1', {
'defines': ['_SKIA_SUPPORT_'],
}],
+ ['pdf_enable_v8==1', {
+ 'defines': ['PDF_ENABLE_V8'],
+ }],
['pdf_enable_xfa==1', {
'defines': ['PDF_ENABLE_XFA'],
}],
@@ -63,7 +67,6 @@
'fxedit',
'fxge',
'javascript',
- 'jsapi',
'pdfwindow',
'fpdfxfa',
],
@@ -654,80 +657,73 @@
{
'target_name': 'javascript',
'type': 'static_library',
- 'include_dirs': [
- '<(DEPTH)/v8',
- '<(DEPTH)/v8/include',
- ],
- 'dependencies': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
'ldflags': [ '-L<(PRODUCT_DIR)',],
'sources': [
'fpdfsdk/include/javascript/IJavaScript.h',
- 'fpdfsdk/src/javascript/app.cpp',
- 'fpdfsdk/src/javascript/color.cpp',
- 'fpdfsdk/src/javascript/console.cpp',
- 'fpdfsdk/src/javascript/Consts.cpp',
- 'fpdfsdk/src/javascript/Consts.h',
- 'fpdfsdk/src/javascript/Document.cpp',
- 'fpdfsdk/src/javascript/Document.h',
- 'fpdfsdk/src/javascript/Field.cpp',
- 'fpdfsdk/src/javascript/Field.h',
- 'fpdfsdk/src/javascript/Icon.cpp',
- 'fpdfsdk/src/javascript/Icon.h',
- 'fpdfsdk/src/javascript/JS_Context.cpp',
- 'fpdfsdk/src/javascript/JS_Context.h',
- 'fpdfsdk/src/javascript/JS_Define.h',
- 'fpdfsdk/src/javascript/JS_EventHandler.cpp',
- 'fpdfsdk/src/javascript/JS_EventHandler.h',
- 'fpdfsdk/src/javascript/JS_GlobalData.cpp',
- 'fpdfsdk/src/javascript/JS_GlobalData.h',
- 'fpdfsdk/src/javascript/JS_Object.cpp',
- 'fpdfsdk/src/javascript/JS_Object.h',
- 'fpdfsdk/src/javascript/JS_Runtime.cpp',
- 'fpdfsdk/src/javascript/JS_Runtime.h',
- 'fpdfsdk/src/javascript/JS_Value.cpp',
- 'fpdfsdk/src/javascript/JS_Value.h',
- 'fpdfsdk/src/javascript/PublicMethods.cpp',
- 'fpdfsdk/src/javascript/PublicMethods.h',
- 'fpdfsdk/src/javascript/app.cpp',
- 'fpdfsdk/src/javascript/app.h',
- 'fpdfsdk/src/javascript/color.cpp',
- 'fpdfsdk/src/javascript/color.h',
- 'fpdfsdk/src/javascript/console.cpp',
- 'fpdfsdk/src/javascript/console.h',
- 'fpdfsdk/src/javascript/event.cpp',
- 'fpdfsdk/src/javascript/event.h',
- 'fpdfsdk/src/javascript/global.cpp',
- 'fpdfsdk/src/javascript/global.h',
- 'fpdfsdk/src/javascript/report.cpp',
- 'fpdfsdk/src/javascript/report.h',
- 'fpdfsdk/src/javascript/resource.cpp',
- 'fpdfsdk/src/javascript/resource.h',
- 'fpdfsdk/src/javascript/util.cpp',
- 'fpdfsdk/src/javascript/util.h',
- ],
- },
- {
- 'target_name': 'jsapi',
- 'type': 'static_library',
- 'dependencies': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'export_dependent_settings': [
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
- ],
- 'include_dirs': [
- '<(DEPTH)/v8',
- '<(DEPTH)/v8/include',
+ 'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
],
- 'ldflags': [ '-L<(PRODUCT_DIR)',],
- 'sources': [
- 'fpdfsdk/include/jsapi/fxjs_v8.h',
- 'fpdfsdk/src/jsapi/fxjs_v8.cpp',
+ 'conditions': [
+ ['pdf_enable_v8==1', {
+ 'include_dirs': [
+ '<(DEPTH)/v8',
+ '<(DEPTH)/v8/include',
+ ],
+ 'dependencies': [
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'export_dependent_settings': [
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
+ ],
+ 'sources!': [
+ 'fpdfsdk/src/javascript/JS_Runtime_Stub.cpp',
+ ],
+ 'sources': [
+ 'fpdfsdk/src/javascript/Consts.cpp',
+ 'fpdfsdk/src/javascript/Consts.h',
+ 'fpdfsdk/src/javascript/Document.cpp',
+ 'fpdfsdk/src/javascript/Document.h',
+ 'fpdfsdk/src/javascript/Field.cpp',
+ 'fpdfsdk/src/javascript/Field.h',
+ 'fpdfsdk/src/javascript/Icon.cpp',
+ 'fpdfsdk/src/javascript/Icon.h',
+ 'fpdfsdk/src/javascript/JS_Context.cpp',
+ 'fpdfsdk/src/javascript/JS_Context.h',
+ 'fpdfsdk/src/javascript/JS_Define.h',
+ 'fpdfsdk/src/javascript/JS_EventHandler.cpp',
+ 'fpdfsdk/src/javascript/JS_EventHandler.h',
+ 'fpdfsdk/src/javascript/JS_GlobalData.cpp',
+ 'fpdfsdk/src/javascript/JS_GlobalData.h',
+ 'fpdfsdk/src/javascript/JS_Object.cpp',
+ 'fpdfsdk/src/javascript/JS_Object.h',
+ 'fpdfsdk/src/javascript/JS_Runtime.cpp',
+ 'fpdfsdk/src/javascript/JS_Runtime.h',
+ 'fpdfsdk/src/javascript/JS_Value.cpp',
+ 'fpdfsdk/src/javascript/JS_Value.h',
+ 'fpdfsdk/src/javascript/PublicMethods.cpp',
+ 'fpdfsdk/src/javascript/PublicMethods.h',
+ 'fpdfsdk/src/javascript/app.cpp',
+ 'fpdfsdk/src/javascript/app.cpp',
+ 'fpdfsdk/src/javascript/app.h',
+ 'fpdfsdk/src/javascript/color.cpp',
+ 'fpdfsdk/src/javascript/color.cpp',
+ 'fpdfsdk/src/javascript/color.h',
+ 'fpdfsdk/src/javascript/console.cpp',
+ 'fpdfsdk/src/javascript/console.cpp',
+ 'fpdfsdk/src/javascript/console.h',
+ 'fpdfsdk/src/javascript/event.cpp',
+ 'fpdfsdk/src/javascript/event.h',
+ 'fpdfsdk/src/javascript/global.cpp',
+ 'fpdfsdk/src/javascript/global.h',
+ 'fpdfsdk/src/javascript/report.cpp',
+ 'fpdfsdk/src/javascript/report.h',
+ 'fpdfsdk/src/javascript/resource.cpp',
+ 'fpdfsdk/src/javascript/resource.h',
+ 'fpdfsdk/src/javascript/util.cpp',
+ 'fpdfsdk/src/javascript/util.h',
+ 'fpdfsdk/include/jsapi/fxjs_v8.h',
+ 'fpdfsdk/src/jsapi/fxjs_v8.cpp',
+ ],
+ }],
],
},
{
@@ -795,13 +791,10 @@
'dependencies': [
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
- '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
'pdfium',
],
'include_dirs': [
'<(DEPTH)',
- '<(DEPTH)/v8',
- '<(DEPTH)/v8/include',
],
'sources': [
'core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp',
@@ -813,7 +806,6 @@
'fpdfsdk/src/fpdfview_c_api_test.c',
'fpdfsdk/src/fpdfview_c_api_test.h',
'fpdfsdk/src/fpdfview_embeddertest.cpp',
- 'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp',
'testing/embedder_test.cpp',
'testing/embedder_test.h',
'testing/embedder_test_mock_delegate.h',
@@ -821,6 +813,21 @@
'testing/fx_string_testhelpers.cpp',
'testing/fx_string_testhelpers.h',
],
+ 'conditions': [
+ ['pdf_enable_v8==1', {
+ 'include_dirs': [
+ '<(DEPTH)/v8',
+ '<(DEPTH)/v8/include',
+ ],
+ 'dependencies': [
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
+ '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
+ ],
+ 'sources': [
+ 'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp',
+ ],
+ }],
+ ],
},
],
}