diff options
Diffstat (limited to 'BUILD.gn')
-rw-r--r-- | BUILD.gn | 113 |
1 files changed, 84 insertions, 29 deletions
@@ -97,7 +97,10 @@ static_library("pdfium") { libs = [] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] deps = [ "third_party:bigint", @@ -121,11 +124,18 @@ static_library("pdfium") { } if (is_win) { - libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ] + libs += [ + "advapi32.lib", + "gdi32.lib", + "user32.lib", + ] } if (is_mac) { - libs += [ "AppKit.framework", "CoreFoundation.framework" ] + libs += [ + "AppKit.framework", + "CoreFoundation.framework", + ] } if (pdfium_bundle_freetype) { @@ -183,7 +193,10 @@ static_library("fdrm") { "core/src/fdrm/crypto/fx_crypt_sha.cpp", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("fpdfdoc") { @@ -213,13 +226,14 @@ static_library("fpdfdoc") { "core/src/fpdfdoc/tagged_int.h", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } - static_library("fpdfapi") { sources = [ - "core/include/fpdfapi/fpdfapi.h", "core/include/fpdfapi/fpdf_module.h", "core/include/fpdfapi/fpdf_objects.h", "core/include/fpdfapi/fpdf_page.h", @@ -228,12 +242,11 @@ static_library("fpdfapi") { "core/include/fpdfapi/fpdf_render.h", "core/include/fpdfapi/fpdf_resource.h", "core/include/fpdfapi/fpdf_serial.h", + "core/include/fpdfapi/fpdfapi.h", "core/src/fpdfapi/fpdf_basic_module.cpp", - "core/src/fpdfapi/fpdf_cmaps/cmap_int.h", "core/src/fpdfapi/fpdf_cmaps/CNS1/Adobe-CNS1-UCS2_5.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-H_0.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/B5pc-V_0.cpp", - "core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-H_0.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/CNS-EUC-V_0.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/ETen-B5-H_0.cpp", @@ -245,9 +258,8 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-H_3.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UCS2-V_3.cpp", "core/src/fpdfapi/fpdf_cmaps/CNS1/UniCNS-UTF16-H_0.cpp", - "core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp", + "core/src/fpdfapi/fpdf_cmaps/CNS1/cmaps_cns1.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/Adobe-GB1-UCS2_5.cpp", - "core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-H_0.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/GB-EUC-V_0.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/GBK-EUC-H_2.cpp", @@ -260,6 +272,7 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_cmaps/GB1/GBpc-EUC-V_0.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-H_4.cpp", "core/src/fpdfapi/fpdf_cmaps/GB1/UniGB-UCS2-V_4.cpp", + "core/src/fpdfapi/fpdf_cmaps/GB1/cmaps_gb1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/83pv-RKSJ-H_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-H_2.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/90ms-RKSJ-V_2.cpp", @@ -269,7 +282,6 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-H_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/Add-RKSJ-V_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/Adobe-Japan1-UCS2_4.cpp", - "core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-H_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/EUC-V_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/Ext-RKSJ-H_2.cpp", @@ -280,8 +292,8 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-H_4.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/UniJIS-UCS2-V_4.cpp", "core/src/fpdfapi/fpdf_cmaps/Japan1/V_1.cpp", + "core/src/fpdfapi/fpdf_cmaps/Japan1/cmaps_japan1.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/Adobe-Korea1-UCS2_2.cpp", - "core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-H_0.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/KSC-EUC-V_0.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/KSCms-UHC-HW-H_1.cpp", @@ -292,6 +304,9 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-H_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UCS2-V_1.cpp", "core/src/fpdfapi/fpdf_cmaps/Korea1/UniKS-UTF16-H_0.cpp", + "core/src/fpdfapi/fpdf_cmaps/Korea1/cmaps_korea1.cpp", + "core/src/fpdfapi/fpdf_cmaps/cmap_int.h", + "core/src/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp", "core/src/fpdfapi/fpdf_edit/editint.h", "core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp", "core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp", @@ -333,7 +348,10 @@ static_library("fpdfapi") { "core/src/fpdfapi/fpdf_render/render_int.h", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("fpdftext") { @@ -349,7 +367,10 @@ static_library("fpdftext") { "core/src/fpdftext/unicodenormalizationdata.h", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("fxcodec") { @@ -431,7 +452,19 @@ static_library("fxcodec") { # conversion to check that an address is 16-bit aligned (benign). cflags_c = [ "-Wno-pointer-to-int-cast" ] } - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] +} + +config("fxge_warnings") { + if (is_clang) { + cflags = [ + # http://code.google.com/p/pdfium/issues/detail?id=188 + "-Wno-switch", + ] + } } static_library("fxcrt") { @@ -448,12 +481,6 @@ static_library("fxcrt") { "core/include/fxcrt/fx_ucd.h", "core/include/fxcrt/fx_xml.h", "core/src/fxcrt/extension.h", - "core/src/fxcrt/fxcrt_platforms.cpp", - "core/src/fxcrt/fxcrt_platforms.h", - "core/src/fxcrt/fxcrt_posix.cpp", - "core/src/fxcrt/fxcrt_posix.h", - "core/src/fxcrt/fxcrt_windows.cpp", - "core/src/fxcrt/fxcrt_windows.h", "core/src/fxcrt/fx_arabic.cpp", "core/src/fxcrt/fx_arabic.h", "core/src/fxcrt/fx_basic_array.cpp", @@ -473,11 +500,20 @@ static_library("fxcrt") { "core/src/fxcrt/fx_unicode.cpp", "core/src/fxcrt/fx_xml_composer.cpp", "core/src/fxcrt/fx_xml_parser.cpp", + "core/src/fxcrt/fxcrt_platforms.cpp", + "core/src/fxcrt/fxcrt_platforms.h", + "core/src/fxcrt/fxcrt_posix.cpp", + "core/src/fxcrt/fxcrt_posix.h", + "core/src/fxcrt/fxcrt_windows.cpp", + "core/src/fxcrt/fxcrt_windows.h", "core/src/fxcrt/plex.h", "core/src/fxcrt/xml_int.h", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("fxge") { @@ -544,7 +580,11 @@ static_library("fxge") { ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":fxge_warnings", + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] if (pdf_use_skia) { sources = [ @@ -594,7 +634,10 @@ static_library("fxedit") { "fpdfsdk/src/fxedit/fxet_pageobjs.cpp", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("pdfwindow") { @@ -637,7 +680,10 @@ static_library("pdfwindow") { "fpdfsdk/src/pdfwindow/PWL_Wnd.cpp", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("javascript") { @@ -728,7 +774,10 @@ static_library("formfiller") { "fpdfsdk/src/formfiller/FFL_TextField.cpp", ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } static_library("fpdfxfa") { @@ -1443,7 +1492,10 @@ test("pdfium_unittests") { ] include_dirs = [ "." ] configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } test("pdfium_embeddertests") { @@ -1485,5 +1537,8 @@ test("pdfium_embeddertests") { ] } configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] + configs += [ + ":pdfium_config", + "//build/config/compiler:no_chromium_code", + ] } |