Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: BUILD.gn

Issue 1395733006: Allow compiling PDFium without V8. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: PDFium Authors Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/IJavaScript.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6 import("pdfium.gni")
7 pdf_use_skia = false
8
9 declare_args() {
10 # On Android there's no system FreeType. On Windows and Mac, only a few
11 # methods are used from it.
12 pdfium_bundle_freetype = !is_linux
13 }
14 7
15 config("pdfium_config") { 8 config("pdfium_config") {
16 cflags = [] 9 cflags = []
17 include_dirs = [ "third_party/freetype/include" ] 10 include_dirs = [ "third_party/freetype/include" ]
18 defines = [ 11 defines = [
19 "OPJ_STATIC", 12 "OPJ_STATIC",
20 "V8_DEPRECATION_WARNINGS", 13 "V8_DEPRECATION_WARNINGS",
21 "_CRT_SECURE_NO_WARNINGS", 14 "_CRT_SECURE_NO_WARNINGS",
22 ] 15 ]
23 16
24 if (pdf_use_skia) { 17 if (pdf_use_skia) {
25 defines += [ "_SKIA_SUPPORT_" ] 18 defines += [ "_SKIA_SUPPORT_" ]
26 } 19 }
27 20
21 if (pdf_enable_v8) {
22 defines += [ "PDF_ENABLE_V8" ]
23 }
24
28 if (is_linux) { 25 if (is_linux) {
29 if (current_cpu == "x64") { 26 if (current_cpu == "x64") {
30 defines += [ "_FX_CPU_=_FX_X64_" ] 27 defines += [ "_FX_CPU_=_FX_X64_" ]
31 cflags += [ "-fPIC" ] 28 cflags += [ "-fPIC" ]
32 } else if (current_cpu == "x86") { 29 } else if (current_cpu == "x86") {
33 defines += [ "_FX_CPU_=_FX_X86_" ] 30 defines += [ "_FX_CPU_=_FX_X86_" ]
34 } 31 }
35 } 32 }
36 33
37 if (is_win) { 34 if (is_win) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 ":fdrm", 101 ":fdrm",
105 ":formfiller", 102 ":formfiller",
106 ":fpdfapi", 103 ":fpdfapi",
107 ":fpdfdoc", 104 ":fpdfdoc",
108 ":fpdftext", 105 ":fpdftext",
109 ":fxcodec", 106 ":fxcodec",
110 ":fxcrt", 107 ":fxcrt",
111 ":fxedit", 108 ":fxedit",
112 ":fxge", 109 ":fxge",
113 ":javascript", 110 ":javascript",
114 ":jsapi",
115 ":pdfwindow", 111 ":pdfwindow",
116 ] 112 ]
117 113
118 if (is_win) { 114 if (is_win) {
119 libs += [ 115 libs += [
120 "advapi32.lib", 116 "advapi32.lib",
121 "gdi32.lib", 117 "gdi32.lib",
122 "user32.lib", 118 "user32.lib",
123 ] 119 ]
124 } 120 }
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 configs -= [ "//build/config/compiler:chromium_code" ] 621 configs -= [ "//build/config/compiler:chromium_code" ]
626 configs += [ 622 configs += [
627 ":pdfium_config", 623 ":pdfium_config",
628 "//build/config/compiler:no_chromium_code", 624 "//build/config/compiler:no_chromium_code",
629 ] 625 ]
630 } 626 }
631 627
632 static_library("javascript") { 628 static_library("javascript") {
633 sources = [ 629 sources = [
634 "fpdfsdk/include/javascript/IJavaScript.h", 630 "fpdfsdk/include/javascript/IJavaScript.h",
635 "fpdfsdk/src/javascript/Consts.cpp",
636 "fpdfsdk/src/javascript/Consts.h",
637 "fpdfsdk/src/javascript/Document.cpp",
638 "fpdfsdk/src/javascript/Document.h",
639 "fpdfsdk/src/javascript/Field.cpp",
640 "fpdfsdk/src/javascript/Field.h",
641 "fpdfsdk/src/javascript/Icon.cpp",
642 "fpdfsdk/src/javascript/Icon.h",
643 "fpdfsdk/src/javascript/JS_Context.cpp",
644 "fpdfsdk/src/javascript/JS_Context.h",
645 "fpdfsdk/src/javascript/JS_Define.h",
646 "fpdfsdk/src/javascript/JS_EventHandler.cpp",
647 "fpdfsdk/src/javascript/JS_EventHandler.h",
648 "fpdfsdk/src/javascript/JS_GlobalData.cpp",
649 "fpdfsdk/src/javascript/JS_GlobalData.h",
650 "fpdfsdk/src/javascript/JS_Object.cpp",
651 "fpdfsdk/src/javascript/JS_Object.h",
652 "fpdfsdk/src/javascript/JS_Runtime.cpp",
653 "fpdfsdk/src/javascript/JS_Runtime.h",
654 "fpdfsdk/src/javascript/JS_Value.cpp",
655 "fpdfsdk/src/javascript/JS_Value.h",
656 "fpdfsdk/src/javascript/PublicMethods.cpp",
657 "fpdfsdk/src/javascript/PublicMethods.h",
658 "fpdfsdk/src/javascript/app.cpp",
659 "fpdfsdk/src/javascript/app.h",
660 "fpdfsdk/src/javascript/color.cpp",
661 "fpdfsdk/src/javascript/color.h",
662 "fpdfsdk/src/javascript/console.cpp",
663 "fpdfsdk/src/javascript/console.h",
664 "fpdfsdk/src/javascript/event.cpp",
665 "fpdfsdk/src/javascript/event.h",
666 "fpdfsdk/src/javascript/global.cpp",
667 "fpdfsdk/src/javascript/global.h",
668 "fpdfsdk/src/javascript/report.cpp",
669 "fpdfsdk/src/javascript/report.h",
670 "fpdfsdk/src/javascript/resource.cpp",
671 "fpdfsdk/src/javascript/resource.h",
672 "fpdfsdk/src/javascript/util.cpp",
673 "fpdfsdk/src/javascript/util.h",
674 ] 631 ]
675 632 if (pdf_enable_v8) {
633 sources += [
634 "fpdfsdk/src/javascript/Consts.cpp",
635 "fpdfsdk/src/javascript/Consts.h",
636 "fpdfsdk/src/javascript/Document.cpp",
637 "fpdfsdk/src/javascript/Document.h",
638 "fpdfsdk/src/javascript/Field.cpp",
639 "fpdfsdk/src/javascript/Field.h",
640 "fpdfsdk/src/javascript/Icon.cpp",
641 "fpdfsdk/src/javascript/Icon.h",
642 "fpdfsdk/src/javascript/JS_Context.cpp",
643 "fpdfsdk/src/javascript/JS_Context.h",
644 "fpdfsdk/src/javascript/JS_Define.h",
645 "fpdfsdk/src/javascript/JS_EventHandler.cpp",
646 "fpdfsdk/src/javascript/JS_EventHandler.h",
647 "fpdfsdk/src/javascript/JS_GlobalData.cpp",
648 "fpdfsdk/src/javascript/JS_GlobalData.h",
649 "fpdfsdk/src/javascript/JS_Object.cpp",
650 "fpdfsdk/src/javascript/JS_Object.h",
651 "fpdfsdk/src/javascript/JS_Runtime.cpp",
652 "fpdfsdk/src/javascript/JS_Runtime.h",
653 "fpdfsdk/src/javascript/JS_Value.cpp",
654 "fpdfsdk/src/javascript/JS_Value.h",
655 "fpdfsdk/src/javascript/PublicMethods.cpp",
656 "fpdfsdk/src/javascript/PublicMethods.h",
657 "fpdfsdk/src/javascript/app.cpp",
658 "fpdfsdk/src/javascript/app.h",
659 "fpdfsdk/src/javascript/color.cpp",
660 "fpdfsdk/src/javascript/color.h",
661 "fpdfsdk/src/javascript/console.cpp",
662 "fpdfsdk/src/javascript/console.h",
663 "fpdfsdk/src/javascript/event.cpp",
664 "fpdfsdk/src/javascript/event.h",
665 "fpdfsdk/src/javascript/global.cpp",
666 "fpdfsdk/src/javascript/global.h",
667 "fpdfsdk/src/javascript/report.cpp",
668 "fpdfsdk/src/javascript/report.h",
669 "fpdfsdk/src/javascript/resource.cpp",
670 "fpdfsdk/src/javascript/resource.h",
671 "fpdfsdk/src/javascript/util.cpp",
672 "fpdfsdk/src/javascript/util.h",
673 "fpdfsdk/include/jsapi/fxjs_v8.h",
674 "fpdfsdk/src/jsapi/fxjs_v8.cpp",
675 ]
676 include_dirs = [
677 "//v8",
678 "//v8/include",
679 ]
680 public_deps = [
681 "//v8",
682 ]
683 } else {
684 sources += [ "fpdfsdk/src/javascript/JS_Runtime_Stub.cpp" ]
685 }
676 configs -= [ "//build/config/compiler:chromium_code" ] 686 configs -= [ "//build/config/compiler:chromium_code" ]
677 configs += [ 687 configs += [
678 ":pdfium_config", 688 ":pdfium_config",
679 "//build/config/compiler:no_chromium_code", 689 "//build/config/compiler:no_chromium_code",
680 ] 690 ]
681 include_dirs = [
682 "//v8",
683 "//v8/include",
684 ]
685
686 public_deps = [
687 "//v8",
688 ]
689 }
690
691 static_library("jsapi") {
692 sources = [
693 "fpdfsdk/include/jsapi/fxjs_v8.h",
694 "fpdfsdk/src/jsapi/fxjs_v8.cpp",
695 ]
696
697 configs -= [ "//build/config/compiler:chromium_code" ]
698 configs += [
699 ":pdfium_config",
700 "//build/config/compiler:no_chromium_code",
701 ]
702 include_dirs = [
703 "//v8",
704 "//v8/include",
705 ]
706
707 public_deps = [
708 "//v8",
709 ]
710 } 691 }
711 692
712 static_library("formfiller") { 693 static_library("formfiller") {
713 sources = [ 694 sources = [
714 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h", 695 "fpdfsdk/include/formfiller/FFL_CBA_Fontmap.h",
715 "fpdfsdk/include/formfiller/FFL_CheckBox.h", 696 "fpdfsdk/include/formfiller/FFL_CheckBox.h",
716 "fpdfsdk/include/formfiller/FFL_ComboBox.h", 697 "fpdfsdk/include/formfiller/FFL_ComboBox.h",
717 "fpdfsdk/include/formfiller/FFL_FormFiller.h", 698 "fpdfsdk/include/formfiller/FFL_FormFiller.h",
718 "fpdfsdk/include/formfiller/FFL_IFormFiller.h", 699 "fpdfsdk/include/formfiller/FFL_IFormFiller.h",
719 "fpdfsdk/include/formfiller/FFL_ListBox.h", 700 "fpdfsdk/include/formfiller/FFL_ListBox.h",
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 sources = [ 752 sources = [
772 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp", 753 "core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp",
773 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp", 754 "core/src/fpdfapi/fpdf_parser/fpdf_parser_parser_embeddertest.cpp",
774 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp", 755 "fpdfsdk/src/fpdf_dataavail_embeddertest.cpp",
775 "fpdfsdk/src/fpdfdoc_embeddertest.cpp", 756 "fpdfsdk/src/fpdfdoc_embeddertest.cpp",
776 "fpdfsdk/src/fpdfformfill_embeddertest.cpp", 757 "fpdfsdk/src/fpdfformfill_embeddertest.cpp",
777 "fpdfsdk/src/fpdftext_embeddertest.cpp", 758 "fpdfsdk/src/fpdftext_embeddertest.cpp",
778 "fpdfsdk/src/fpdfview_c_api_test.c", 759 "fpdfsdk/src/fpdfview_c_api_test.c",
779 "fpdfsdk/src/fpdfview_c_api_test.h", 760 "fpdfsdk/src/fpdfview_c_api_test.h",
780 "fpdfsdk/src/fpdfview_embeddertest.cpp", 761 "fpdfsdk/src/fpdfview_embeddertest.cpp",
781 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp",
782 "testing/embedder_test.cpp", 762 "testing/embedder_test.cpp",
783 "testing/embedder_test.h", 763 "testing/embedder_test.h",
784 "testing/embedder_test_mock_delegate.h", 764 "testing/embedder_test_mock_delegate.h",
785 "testing/embedder_test_timer_handling_delegate.h", 765 "testing/embedder_test_timer_handling_delegate.h",
786 "testing/fx_string_testhelpers.cpp", 766 "testing/fx_string_testhelpers.cpp",
787 "testing/fx_string_testhelpers.h", 767 "testing/fx_string_testhelpers.h",
788 ] 768 ]
789 deps = [ 769 deps = [
790 "//testing/gmock", 770 "//testing/gmock",
791 "//testing/gtest", 771 "//testing/gtest",
792 "//v8",
793 "//v8:v8_libplatform",
794 ":pdfium", 772 ":pdfium",
795 ] 773 ]
796 include_dirs = [ 774 include_dirs = [
797 "//v8",
798 "//v8/include",
799 "." 775 "."
800 ] 776 ]
777 if (pdf_enable_v8) {
778 sources += [
779 "fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp"
780 ]
781 deps += [
782 "//v8",
783 "//v8:v8_libplatform",
784 ]
785 include_dirs += [
786 "//v8",
787 "//v8/include",
788 ]
789 }
801 configs -= [ "//build/config/compiler:chromium_code" ] 790 configs -= [ "//build/config/compiler:chromium_code" ]
802 configs += [ 791 configs += [
803 ":pdfium_config", 792 ":pdfium_config",
804 "//build/config/compiler:no_chromium_code", 793 "//build/config/compiler:no_chromium_code",
805 ] 794 ]
806 } 795 }
OLDNEW
« no previous file with comments | « no previous file | fpdfsdk/include/javascript/IJavaScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698