Simplify PDFium by removing code that's not used in the open source repo.
[pdfium.git] / pdfium.gyp
index a78d104..6b4b8bc 100644 (file)
@@ -1,53 +1,32 @@
 {
   'variables': {
-    'win_third_party_warn_as_error': 'false',
     'pdf_use_skia%': 0,
   },
   'target_defaults': {
     'defines' : [
-      'FOXIT_CHROME_BUILD',
       '_FXFT_VERSION_=2501',
       '_FPDFSDK_LIB',
       '_NO_GDIPLUS_',  # workaround text rendering issues on Windows
+      'OPJ_STATIC',
     ],
     'conditions': [
       ['pdf_use_skia==1', {
         'defines': ['_SKIA_SUPPORT_'],
       }],
       ['OS=="linux"', {
-        'cflags!': [
-          '-fno-exceptions',
-        ],
         'conditions': [
           ['target_arch=="x64"', {
-            'defines' : [
-              '_FX_CPU_=_FX_X64_',
-            ],
-            'cflags': [
-              '-fPIC',
-            ],
+            'defines' : [ '_FX_CPU_=_FX_X64_', ],
+            'cflags': [ '-fPIC', ],
           }],
           ['target_arch=="ia32"', {
-            'defines' : [
-              '_FX_CPU_=_FX_X86_',
-            ],
+            'defines' : [ '_FX_CPU_=_FX_X86_', ],
           }],
         ],
       }],
-      ['OS=="mac"', {
-        'xcode_settings': {
-          'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
-          'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',    # -Werror
-        },
-      }],
-      ['clang==1', {
-         'cflags!': [
-           '-Werror',
-         ],
-      }],
     ],
     'msvs_disabled_warnings': [
-      4005, 4018, 4146, 4333, 4345
+      4005, 4018, 4146, 4333, 4345, 4267
     ],
   },
   'targets': [
@@ -56,6 +35,7 @@
       'type': 'static_library',
       'dependencies': [
         'safemath',
+        'bigint',
         'fdrm',
         'fpdfdoc',
         'fpdfapi',
@@ -74,7 +54,6 @@
         'fpdfsdk/include/fpdfdoc.h',
         'fpdfsdk/include/fpdfedit.h',
         'fpdfsdk/include/fpdfformfill.h',
-        'fpdfsdk/include/fpdfoom.h',
         'fpdfsdk/include/fpdftext.h',
         'fpdfsdk/include/fpdfview.h',
         'fpdfsdk/include/fpdf_dataavail.h',
@@ -92,7 +71,6 @@
         'fpdfsdk/src/fpdfeditimg.cpp',
         'fpdfsdk/src/fpdfeditpage.cpp',
         'fpdfsdk/src/fpdfformfill.cpp',
-        'fpdfsdk/src/fpdfoom.cpp',
         'fpdfsdk/src/fpdfppo.cpp',
         'fpdfsdk/src/fpdfsave.cpp',
         'fpdfsdk/src/fpdftext.cpp',
       ],
     },
     {
+      'target_name': 'bigint',
+      'type': 'static_library',
+      'sources': [
+        'third_party/bigint/BigInteger.hh',
+        'third_party/bigint/BigIntegerLibrary.hh',
+        'third_party/bigint/BigIntegerUtils.hh',
+        'third_party/bigint/BigUnsigned.hh',
+        'third_party/bigint/NumberlikeArray.hh',
+        'third_party/bigint/BigUnsignedInABase.hh',
+        'third_party/bigint/BigInteger.cc',
+        'third_party/bigint/BigIntegerUtils.cc',
+        'third_party/bigint/BigUnsigned.cc',
+        'third_party/bigint/BigUnsignedInABase.cc',
+      ],
+    },
+    {
       'target_name': 'fdrm',
       'type': 'static_library',
       'ldflags': [ '-L<(PRODUCT_DIR)',],
         'core/src/fpdfapi/fpdf_page/fpdf_page_graph_state.cpp',
         'core/src/fpdfapi/fpdf_page/fpdf_page_image.cpp',
         'core/src/fpdfapi/fpdf_page/fpdf_page_parser.cpp',
-        'core/src/fpdfapi/fpdf_page/fpdf_page_parser_new.cpp',
         'core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp',
         'core/src/fpdfapi/fpdf_page/fpdf_page_path.cpp',
         'core/src/fpdfapi/fpdf_page/fpdf_page_pattern.cpp',
         'core/src/fxge/ge/fx_ge_device.cpp',
         'core/src/fxge/ge/fx_ge_font.cpp',
         'core/src/fxge/ge/fx_ge_fontmap.cpp',
-        'core/src/fxge/ge/fx_ge_linux.cpp',
         'core/src/fxge/ge/fx_ge_path.cpp',
         'core/src/fxge/ge/fx_ge_ps.cpp',
         'core/src/fxge/ge/fx_ge_text.cpp',
         }],
         ['OS=="win"', {
           'defines!': [
-            'NOMINMAX',
             'WIN32_LEAN_AND_MEAN'
           ],
           'sources': [
       'target_name': 'javascript',
       'type': 'static_library',
         'include_dirs': [
+          '<(DEPTH)/v8',
           '<(DEPTH)/v8/include',
         ],
       'dependencies': [
         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
+        '<(DEPTH)/v8/tools/gyp/v8.gyp:v8_libplatform',
       ],
       'export_dependent_settings': [
         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
         '<(DEPTH)/v8/tools/gyp/v8.gyp:v8',
       ],
       'include_dirs': [
+        '<(DEPTH)/v8',
         '<(DEPTH)/v8/include',
       ],
       'ldflags': [ '-L<(PRODUCT_DIR)',],