Simplify PDFium by removing code that's not used in the open source repo.
[pdfium.git] / pdfium.gyp
index 02ab629..6b4b8bc 100644 (file)
@@ -4,27 +4,16 @@
   },
   '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_'],
       }],
-      # pdfium uses exceptions. Override the default exceptions-off setting
-      # from chromium.
-      # TODO: Instead, change pdfium to not use exceptions, and remove this.
-      ['OS=="mac"', {
-        'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', },
-      }],
-      ['OS=="win"', {
-        'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': '1', }, },
-        'defines!': [ '_HAS_EXCEPTIONS=0', ],
-      }],
       ['OS=="linux"', {
-        'cflags!': [ '-fno-exceptions', ],
         'conditions': [
           ['target_arch=="x64"', {
             'defines' : [ '_FX_CPU_=_FX_X64_', ],
@@ -46,6 +35,7 @@
       'type': 'static_library',
       'dependencies': [
         'safemath',
+        'bigint',
         'fdrm',
         'fpdfdoc',
         'fpdfapi',
@@ -64,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',
@@ -82,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': [