OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//testing/test.gni") | 5 import("//testing/test.gni") |
6 import("pdfium.gni") | 6 import("pdfium.gni") |
7 | 7 |
8 config("pdfium_config") { | 8 config("pdfium_config") { |
9 cflags = [] | 9 cflags = [] |
10 include_dirs = [ "third_party/freetype/include" ] | 10 include_dirs = [ "third_party/freetype/include" ] |
11 defines = [ | 11 defines = [ |
12 "OPJ_STATIC", | 12 "OPJ_STATIC", |
13 "PNG_PREFIX", | 13 "PNG_PREFIX", |
14 "PNGPREFIX_H", | 14 "PNGPREFIX_H", |
15 "PNG_USE_READ_MACROS", | 15 "PNG_USE_READ_MACROS", |
16 "V8_DEPRECATION_WARNINGS", | 16 "V8_DEPRECATION_WARNINGS", |
17 "_CRT_SECURE_NO_WARNINGS", | 17 "_CRT_SECURE_NO_WARNINGS", |
18 ] | 18 ] |
19 | 19 |
20 if (pdf_use_skia) { | 20 if (pdf_use_skia) { |
21 defines += [ "_SKIA_SUPPORT_" ] | 21 defines += [ "_SKIA_SUPPORT_" ] |
22 } | 22 } |
23 | 23 |
| 24 if (pdf_enable_v8) { |
| 25 defines += [ "PDF_ENABLE_V8" ] |
| 26 } |
| 27 |
24 if (pdf_enable_xfa) { | 28 if (pdf_enable_xfa) { |
25 defines += [ "PDF_ENABLE_XFA" ] | 29 defines += [ "PDF_ENABLE_XFA" ] |
26 } | 30 } |
27 | 31 |
28 if (is_linux) { | 32 if (is_linux) { |
29 if (current_cpu == "x64") { | 33 if (current_cpu == "x64") { |
30 defines += [ "_FX_CPU_=_FX_X64_" ] | 34 defines += [ "_FX_CPU_=_FX_X64_" ] |
31 cflags += [ "-fPIC" ] | 35 cflags += [ "-fPIC" ] |
32 } else if (current_cpu == "x86") { | 36 } else if (current_cpu == "x86") { |
33 defines += [ "_FX_CPU_=_FX_X86_" ] | 37 defines += [ "_FX_CPU_=_FX_X86_" ] |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 ":formfiller", | 106 ":formfiller", |
103 ":fpdfapi", | 107 ":fpdfapi", |
104 ":fpdfdoc", | 108 ":fpdfdoc", |
105 ":fpdftext", | 109 ":fpdftext", |
106 ":fpdfxfa", | 110 ":fpdfxfa", |
107 ":fxcodec", | 111 ":fxcodec", |
108 ":fxcrt", | 112 ":fxcrt", |
109 ":fxedit", | 113 ":fxedit", |
110 ":fxge", | 114 ":fxge", |
111 ":javascript", | 115 ":javascript", |
112 ":jsapi", | |
113 ":pdfwindow", | 116 ":pdfwindow", |
114 ] | 117 ] |
115 | 118 |
116 if (pdf_enable_xfa) { | 119 if (pdf_enable_xfa) { |
117 deps += [ ":xfa" ] | 120 deps += [ ":xfa" ] |
118 } | 121 } |
119 | 122 |
120 if (is_win) { | 123 if (is_win) { |
121 libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ] | 124 libs += [ "advapi32.lib", "gdi32.lib", "user32.lib" ] |
122 } | 125 } |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 "fpdfsdk/src/pdfwindow/PWL_Utils.cpp", | 599 "fpdfsdk/src/pdfwindow/PWL_Utils.cpp", |
597 "fpdfsdk/src/pdfwindow/PWL_Wnd.cpp", | 600 "fpdfsdk/src/pdfwindow/PWL_Wnd.cpp", |
598 ] | 601 ] |
599 configs -= [ "//build/config/compiler:chromium_code" ] | 602 configs -= [ "//build/config/compiler:chromium_code" ] |
600 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 603 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
601 } | 604 } |
602 | 605 |
603 static_library("javascript") { | 606 static_library("javascript") { |
604 sources = [ | 607 sources = [ |
605 "fpdfsdk/include/javascript/IJavaScript.h", | 608 "fpdfsdk/include/javascript/IJavaScript.h", |
606 "fpdfsdk/src/javascript/Consts.cpp", | |
607 "fpdfsdk/src/javascript/Consts.h", | |
608 "fpdfsdk/src/javascript/Document.cpp", | |
609 "fpdfsdk/src/javascript/Document.h", | |
610 "fpdfsdk/src/javascript/Field.cpp", | |
611 "fpdfsdk/src/javascript/Field.h", | |
612 "fpdfsdk/src/javascript/Icon.cpp", | |
613 "fpdfsdk/src/javascript/Icon.h", | |
614 "fpdfsdk/src/javascript/JS_Context.cpp", | |
615 "fpdfsdk/src/javascript/JS_Context.h", | |
616 "fpdfsdk/src/javascript/JS_Define.h", | |
617 "fpdfsdk/src/javascript/JS_EventHandler.cpp", | |
618 "fpdfsdk/src/javascript/JS_EventHandler.h", | |
619 "fpdfsdk/src/javascript/JS_GlobalData.cpp", | |
620 "fpdfsdk/src/javascript/JS_GlobalData.h", | |
621 "fpdfsdk/src/javascript/JS_Object.cpp", | |
622 "fpdfsdk/src/javascript/JS_Object.h", | |
623 "fpdfsdk/src/javascript/JS_Runtime.cpp", | |
624 "fpdfsdk/src/javascript/JS_Runtime.h", | |
625 "fpdfsdk/src/javascript/JS_Value.cpp", | |
626 "fpdfsdk/src/javascript/JS_Value.h", | |
627 "fpdfsdk/src/javascript/PublicMethods.cpp", | |
628 "fpdfsdk/src/javascript/PublicMethods.h", | |
629 "fpdfsdk/src/javascript/app.cpp", | |
630 "fpdfsdk/src/javascript/app.h", | |
631 "fpdfsdk/src/javascript/color.cpp", | |
632 "fpdfsdk/src/javascript/color.h", | |
633 "fpdfsdk/src/javascript/console.cpp", | |
634 "fpdfsdk/src/javascript/console.h", | |
635 "fpdfsdk/src/javascript/event.cpp", | |
636 "fpdfsdk/src/javascript/event.h", | |
637 "fpdfsdk/src/javascript/global.cpp", | |
638 "fpdfsdk/src/javascript/global.h", | |
639 "fpdfsdk/src/javascript/report.cpp", | |
640 "fpdfsdk/src/javascript/report.h", | |
641 "fpdfsdk/src/javascript/resource.cpp", | |
642 "fpdfsdk/src/javascript/resource.h", | |
643 "fpdfsdk/src/javascript/util.cpp", | |
644 "fpdfsdk/src/javascript/util.h", | |
645 ] | 609 ] |
646 | 610 if (pdf_enable_v8) { |
| 611 sources += [ |
| 612 "fpdfsdk/src/javascript/Consts.cpp", |
| 613 "fpdfsdk/src/javascript/Consts.h", |
| 614 "fpdfsdk/src/javascript/Document.cpp", |
| 615 "fpdfsdk/src/javascript/Document.h", |
| 616 "fpdfsdk/src/javascript/Field.cpp", |
| 617 "fpdfsdk/src/javascript/Field.h", |
| 618 "fpdfsdk/src/javascript/Icon.cpp", |
| 619 "fpdfsdk/src/javascript/Icon.h", |
| 620 "fpdfsdk/src/javascript/JS_Context.cpp", |
| 621 "fpdfsdk/src/javascript/JS_Context.h", |
| 622 "fpdfsdk/src/javascript/JS_Define.h", |
| 623 "fpdfsdk/src/javascript/JS_EventHandler.cpp", |
| 624 "fpdfsdk/src/javascript/JS_EventHandler.h", |
| 625 "fpdfsdk/src/javascript/JS_GlobalData.cpp", |
| 626 "fpdfsdk/src/javascript/JS_GlobalData.h", |
| 627 "fpdfsdk/src/javascript/JS_Object.cpp", |
| 628 "fpdfsdk/src/javascript/JS_Object.h", |
| 629 "fpdfsdk/src/javascript/JS_Runtime.cpp", |
| 630 "fpdfsdk/src/javascript/JS_Runtime.h", |
| 631 "fpdfsdk/src/javascript/JS_Value.cpp", |
| 632 "fpdfsdk/src/javascript/JS_Value.h", |
| 633 "fpdfsdk/src/javascript/PublicMethods.cpp", |
| 634 "fpdfsdk/src/javascript/PublicMethods.h", |
| 635 "fpdfsdk/src/javascript/app.cpp", |
| 636 "fpdfsdk/src/javascript/app.h", |
| 637 "fpdfsdk/src/javascript/color.cpp", |
| 638 "fpdfsdk/src/javascript/color.h", |
| 639 "fpdfsdk/src/javascript/console.cpp", |
| 640 "fpdfsdk/src/javascript/console.h", |
| 641 "fpdfsdk/src/javascript/event.cpp", |
| 642 "fpdfsdk/src/javascript/event.h", |
| 643 "fpdfsdk/src/javascript/global.cpp", |
| 644 "fpdfsdk/src/javascript/global.h", |
| 645 "fpdfsdk/src/javascript/report.cpp", |
| 646 "fpdfsdk/src/javascript/report.h", |
| 647 "fpdfsdk/src/javascript/resource.cpp", |
| 648 "fpdfsdk/src/javascript/resource.h", |
| 649 "fpdfsdk/src/javascript/util.cpp", |
| 650 "fpdfsdk/src/javascript/util.h", |
| 651 "fpdfsdk/include/jsapi/fxjs_v8.h", |
| 652 "fpdfsdk/src/jsapi/fxjs_v8.cpp", |
| 653 ] |
| 654 include_dirs = [ |
| 655 "//v8", |
| 656 "//v8/include", |
| 657 ] |
| 658 public_deps = [ |
| 659 "//v8", |
| 660 ] |
| 661 } else { |
| 662 sources += [ "fpdfsdk/src/javascript/JS_Runtime_Stub.cpp" ] |
| 663 } |
647 configs -= [ "//build/config/compiler:chromium_code" ] | 664 configs -= [ "//build/config/compiler:chromium_code" ] |
648 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 665 configs += [ |
649 include_dirs = [ | 666 ":pdfium_config", |
650 "//v8", | 667 "//build/config/compiler:no_chromium_code", |
651 "//v8/include", | |
652 ] | |
653 | |
654 public_deps = [ | |
655 "//v8", | |
656 ] | 668 ] |
657 } | 669 } |
658 | 670 |
659 static_library("jsapi") { | |
660 sources = [ | |
661 "fpdfsdk/include/jsapi/fxjs_v8.h", | |
662 "fpdfsdk/src/jsapi/fxjs_v8.cpp", | |
663 ] | |
664 | |
665 configs -= [ "//build/config/compiler:chromium_code" ] | |
666 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | |
667 include_dirs = [ | |
668 "//v8", | |
669 "//v8/include", | |
670 ] | |
671 | |
672 public_deps = [ | |
673 "//v8", | |
674 ] | |
675 } | |
676 | |
677 static_library("formfiller") { | 671 static_library("formfiller") { |
678 sources = [ | 672 sources = [ |
679 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h", | 673 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h", |
680 "fpdfsdk/include/formfiller/FFL_CheckBox.h", | 674 "fpdfsdk/include/formfiller/FFL_CheckBox.h", |
681 "fpdfsdk/include/formfiller/FFL_ComboBox.h", | 675 "fpdfsdk/include/formfiller/FFL_ComboBox.h", |
682 "fpdfsdk/include/formfiller/FFL_FormFiller.h", | 676 "fpdfsdk/include/formfiller/FFL_FormFiller.h", |
683 "fpdfsdk/include/formfiller/FFL_IFormFiller.h", | 677 "fpdfsdk/include/formfiller/FFL_IFormFiller.h", |
684 "fpdfsdk/include/formfiller/FFL_ListBox.h", | 678 "fpdfsdk/include/formfiller/FFL_ListBox.h", |
685 "fpdfsdk/include/formfiller/FFL_Notify.h", | 679 "fpdfsdk/include/formfiller/FFL_Notify.h", |
686 "fpdfsdk/include/formfiller/FFL_PushButton.h", | 680 "fpdfsdk/include/formfiller/FFL_PushButton.h", |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 "xfa/src/fxfa/src/parser/xfa_script_nodehelper.h", | 1351 "xfa/src/fxfa/src/parser/xfa_script_nodehelper.h", |
1358 "xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp", | 1352 "xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.cpp", |
1359 "xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h", | 1353 "xfa/src/fxfa/src/parser/xfa_script_resolveprocessor.h", |
1360 "xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp", | 1354 "xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.cpp", |
1361 "xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.h", | 1355 "xfa/src/fxfa/src/parser/xfa_script_signaturepseudomodel.h", |
1362 "xfa/src/fxfa/src/parser/xfa_utils_imp.cpp", | 1356 "xfa/src/fxfa/src/parser/xfa_utils_imp.cpp", |
1363 "xfa/src/fxgraphics/src/fx_graphics.cpp", | 1357 "xfa/src/fxgraphics/src/fx_graphics.cpp", |
1364 "xfa/src/fxgraphics/src/fx_path_generator.cpp", | 1358 "xfa/src/fxgraphics/src/fx_path_generator.cpp", |
1365 "xfa/src/fxgraphics/src/fx_path_generator.h", | 1359 "xfa/src/fxgraphics/src/fx_path_generator.h", |
1366 "xfa/src/fxgraphics/src/pre.h", | 1360 "xfa/src/fxgraphics/src/pre.h", |
1367 "xfa/src/fxjse/src/class.cpp", | |
1368 "xfa/src/fxjse/src/class.h", | |
1369 "xfa/src/fxjse/src/context.cpp", | |
1370 "xfa/src/fxjse/src/context.h", | |
1371 "xfa/src/fxjse/src/dynprop.cpp", | |
1372 "xfa/src/fxjse/src/runtime.cpp", | |
1373 "xfa/src/fxjse/src/runtime.h", | |
1374 "xfa/src/fxjse/src/scope_inline.h", | |
1375 "xfa/src/fxjse/src/util_inline.h", | |
1376 "xfa/src/fxjse/src/value.cpp", | |
1377 "xfa/src/fxjse/src/value.h" | |
1378 ] | 1361 ] |
| 1362 if (pdf_enable_v8) { |
| 1363 sources += [ |
| 1364 "xfa/src/fxjse/src/class.cpp", |
| 1365 "xfa/src/fxjse/src/class.h", |
| 1366 "xfa/src/fxjse/src/context.cpp", |
| 1367 "xfa/src/fxjse/src/context.h", |
| 1368 "xfa/src/fxjse/src/dynprop.cpp", |
| 1369 "xfa/src/fxjse/src/runtime.cpp", |
| 1370 "xfa/src/fxjse/src/runtime.h", |
| 1371 "xfa/src/fxjse/src/scope_inline.h", |
| 1372 "xfa/src/fxjse/src/util_inline.h", |
| 1373 "xfa/src/fxjse/src/value.cpp", |
| 1374 "xfa/src/fxjse/src/value.h" |
| 1375 ], |
| 1376 include_dirs = [ |
| 1377 "//v8", |
| 1378 "//v8/include", |
| 1379 ] |
| 1380 public_deps = [ |
| 1381 "//v8", |
| 1382 ] |
| 1383 deps = [ |
| 1384 "//v8:v8_libplatform", |
| 1385 ] |
| 1386 } |
1379 configs -= [ "//build/config/compiler:chromium_code" ] | 1387 configs -= [ "//build/config/compiler:chromium_code" ] |
1380 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 1388 configs += [ |
1381 include_dirs = [ | 1389 ":pdfium_config", |
1382 "//v8", | 1390 "//build/config/compiler:no_chromium_code", |
1383 "//v8/include", | |
1384 ] | |
1385 public_deps = [ | |
1386 "//v8", | |
1387 ] | |
1388 deps = [ | |
1389 "//v8:v8_libplatform", | |
1390 ] | 1391 ] |
1391 } | 1392 } |
1392 | 1393 |
1393 test("pdfium_unittests") { | 1394 test("pdfium_unittests") { |
1394 sources = [ | 1395 sources = [ |
1395 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", | 1396 "core/src/fxcodec/codec/fx_codec_jpx_unittest.cpp", |
1396 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", | 1397 "core/src/fxcrt/fx_basic_bstring_unittest.cpp", |
1397 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", | 1398 "core/src/fxcrt/fx_basic_memmgr_unittest.cpp", |
1398 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", | 1399 "core/src/fxcrt/fx_basic_wstring_unittest.cpp", |
1399 "testing/fx_string_testhelpers.cpp", | 1400 "testing/fx_string_testhelpers.cpp", |
(...skipping 16 matching lines...) Expand all Loading... |
1416 sources = [ | 1417 sources = [ |
1417 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", | 1418 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", |
1418 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", | 1419 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", |
1419 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", | 1420 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", |
1420 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", | 1421 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", |
1421 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", | 1422 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", |
1422 "fpdfsdk/src/fpdftext_embeddertest.cpp", | 1423 "fpdfsdk/src/fpdftext_embeddertest.cpp", |
1423 "fpdfsdk/src/fpdfview_c_api_test.c", | 1424 "fpdfsdk/src/fpdfview_c_api_test.c", |
1424 "fpdfsdk/src/fpdfview_c_api_test.h", | 1425 "fpdfsdk/src/fpdfview_c_api_test.h", |
1425 "fpdfsdk/src/fpdfview_embeddertest.cpp", | 1426 "fpdfsdk/src/fpdfview_embeddertest.cpp", |
1426 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp", | |
1427 "testing/embedder_test.cpp", | 1427 "testing/embedder_test.cpp", |
1428 "testing/embedder_test.h", | 1428 "testing/embedder_test.h", |
1429 "testing/embedder_test_mock_delegate.h", | 1429 "testing/embedder_test_mock_delegate.h", |
1430 "testing/embedder_test_timer_handling_delegate.h", | 1430 "testing/embedder_test_timer_handling_delegate.h", |
1431 "testing/fx_string_testhelpers.cpp", | 1431 "testing/fx_string_testhelpers.cpp", |
1432 "testing/fx_string_testhelpers.h", | 1432 "testing/fx_string_testhelpers.h", |
1433 ] | 1433 ] |
1434 deps = [ | 1434 deps = [ |
1435 "//testing/gmock", | 1435 "//testing/gmock", |
1436 "//testing/gtest", | 1436 "//testing/gtest", |
1437 "//v8:v8_libplatform", | 1437 ":pdfium", |
1438 ":pdfium" | |
1439 ] | 1438 ] |
1440 include_dirs = [ | 1439 include_dirs = [ |
1441 ".", | 1440 "." |
1442 "//v8", | |
1443 "//v8/include", | |
1444 ] | 1441 ] |
| 1442 if (pdf_enable_v8) { |
| 1443 sources += [ |
| 1444 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp" |
| 1445 ] |
| 1446 deps += [ |
| 1447 "//v8", |
| 1448 "//v8:v8_libplatform", |
| 1449 ] |
| 1450 include_dirs += [ |
| 1451 "//v8", |
| 1452 "//v8/include", |
| 1453 ] |
| 1454 } |
1445 configs -= [ "//build/config/compiler:chromium_code" ] | 1455 configs -= [ "//build/config/compiler:chromium_code" ] |
1446 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] | 1456 configs += [ ":pdfium_config", "//build/config/compiler:no_chromium_code" ] |
1447 } | 1457 } |
OLD | NEW |