blob: 688b5c141227a70f94f6cfedd4816917a01801cb [file] [log] [blame]
Lei Zhanga7dec322018-10-12 18:36:51 +00001# Copyright 2018 The PDFium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//build/config/jumbo.gni")
6import("../pdfium.gni")
Lei Zhangf03f7812018-10-15 23:48:29 +00007import("../testing/test.gni")
Lei Zhanga7dec322018-10-12 18:36:51 +00008
9jumbo_source_set("fxjs") {
10 sources = [
11 "cjs_event_context_stub.cpp",
12 "cjs_event_context_stub.h",
13 "cjs_runtimestub.cpp",
14 "cjs_runtimestub.h",
15 "ijs_event_context.h",
16 "ijs_runtime.cpp",
17 "ijs_runtime.h",
18 ]
19 configs += [ "../:pdfium_core_config" ]
20 deps = [
Lei Zhang995374a2018-10-12 19:52:04 +000021 "../core/fxcrt",
Lei Zhanga7dec322018-10-12 18:36:51 +000022 ]
23 visibility = [ "../*" ]
24
25 if (pdf_enable_v8) {
26 sources += [
Tom Sepez41d04e12018-10-30 22:07:36 +000027 "cfx_globalarray.cpp",
28 "cfx_globalarray.h",
29 "cfx_globaldata.cpp",
30 "cfx_globaldata.h",
31 "cfx_keyvalue.cpp",
32 "cfx_keyvalue.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000033 "cfx_v8.cpp",
34 "cfx_v8.h",
35 "cfxjs_engine.cpp",
36 "cfxjs_engine.h",
37 "cjs_annot.cpp",
38 "cjs_annot.h",
39 "cjs_app.cpp",
40 "cjs_app.h",
41 "cjs_border.cpp",
42 "cjs_border.h",
43 "cjs_color.cpp",
44 "cjs_color.h",
45 "cjs_console.cpp",
46 "cjs_console.h",
47 "cjs_delaydata.cpp",
48 "cjs_delaydata.h",
49 "cjs_display.cpp",
50 "cjs_display.h",
51 "cjs_document.cpp",
52 "cjs_document.h",
53 "cjs_event.cpp",
54 "cjs_event.h",
55 "cjs_event_context.cpp",
56 "cjs_event_context.h",
Tom Sepez7dbb85b2019-06-11 19:49:00 +000057 "cjs_eventrecorder.cpp",
58 "cjs_eventrecorder.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000059 "cjs_field.cpp",
60 "cjs_field.h",
61 "cjs_font.cpp",
62 "cjs_font.h",
63 "cjs_global.cpp",
64 "cjs_global.h",
65 "cjs_globalarrays.cpp",
66 "cjs_globalarrays.h",
67 "cjs_globalconsts.cpp",
68 "cjs_globalconsts.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000069 "cjs_highlight.cpp",
70 "cjs_highlight.h",
71 "cjs_icon.cpp",
72 "cjs_icon.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000073 "cjs_object.cpp",
74 "cjs_object.h",
75 "cjs_position.cpp",
76 "cjs_position.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000077 "cjs_publicmethods.cpp",
78 "cjs_publicmethods.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000079 "cjs_result.cpp",
80 "cjs_result.h",
81 "cjs_runtime.cpp",
82 "cjs_runtime.h",
83 "cjs_scalehow.cpp",
84 "cjs_scalehow.h",
85 "cjs_scalewhen.cpp",
86 "cjs_scalewhen.h",
87 "cjs_style.cpp",
88 "cjs_style.h",
89 "cjs_timerobj.cpp",
90 "cjs_timerobj.h",
91 "cjs_util.cpp",
92 "cjs_util.h",
93 "cjs_zoomtype.cpp",
94 "cjs_zoomtype.h",
Tom Sepez86e5fbf2018-11-01 21:21:52 +000095 "fx_date_helpers.cpp",
96 "fx_date_helpers.h",
Lei Zhanga7dec322018-10-12 18:36:51 +000097 "global_timer.cpp",
98 "global_timer.h",
99 "js_define.cpp",
100 "js_define.h",
101 "js_resources.cpp",
102 "js_resources.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000103 ]
104 deps += [
Lei Zhang85549b42019-02-02 00:40:19 +0000105 "../constants",
Lei Zhangbc75f622018-10-15 18:12:40 +0000106 "../core/fdrm",
Lei Zhangbc75f622018-10-15 18:12:40 +0000107 "../core/fpdfapi/page",
108 "../core/fpdfapi/parser",
Tom Sepez0208b0c2019-07-23 21:52:50 +0000109 "../core/fpdfapi/render",
Lei Zhangbc75f622018-10-15 18:12:40 +0000110 "../core/fpdfdoc",
111 "../core/fxge",
Lei Zhanga7dec322018-10-12 18:36:51 +0000112 "//v8",
113 "//v8:v8_libplatform",
114 ]
115 configs += [ "//v8:external_startup_data" ]
116 public_deps = [
117 "//v8",
118 ]
119
120 if (pdf_enable_xfa) {
121 sources += [
Tom Sepez70e52142018-12-13 20:07:50 +0000122 "xfa/cfxjse_arguments.cpp",
123 "xfa/cfxjse_arguments.h",
124 "xfa/cfxjse_class.cpp",
125 "xfa/cfxjse_class.h",
126 "xfa/cfxjse_context.cpp",
127 "xfa/cfxjse_context.h",
128 "xfa/cfxjse_engine.cpp",
129 "xfa/cfxjse_engine.h",
130 "xfa/cfxjse_formcalc_context.cpp",
131 "xfa/cfxjse_formcalc_context.h",
132 "xfa/cfxjse_isolatetracker.cpp",
133 "xfa/cfxjse_isolatetracker.h",
134 "xfa/cfxjse_resolveprocessor.cpp",
135 "xfa/cfxjse_resolveprocessor.h",
136 "xfa/cfxjse_runtimedata.cpp",
137 "xfa/cfxjse_runtimedata.h",
138 "xfa/cfxjse_value.cpp",
139 "xfa/cfxjse_value.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000140 "xfa/cjx_boolean.cpp",
141 "xfa/cjx_boolean.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000142 "xfa/cjx_container.cpp",
143 "xfa/cjx_container.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000144 "xfa/cjx_datawindow.cpp",
145 "xfa/cjx_datawindow.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000146 "xfa/cjx_delta.cpp",
147 "xfa/cjx_delta.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000148 "xfa/cjx_desc.cpp",
149 "xfa/cjx_desc.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000150 "xfa/cjx_draw.cpp",
151 "xfa/cjx_draw.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000152 "xfa/cjx_encrypt.cpp",
153 "xfa/cjx_encrypt.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000154 "xfa/cjx_eventpseudomodel.cpp",
155 "xfa/cjx_eventpseudomodel.h",
156 "xfa/cjx_exclgroup.cpp",
157 "xfa/cjx_exclgroup.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000158 "xfa/cjx_extras.cpp",
159 "xfa/cjx_extras.h",
160 "xfa/cjx_field.cpp",
161 "xfa/cjx_field.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000162 "xfa/cjx_form.cpp",
163 "xfa/cjx_form.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000164 "xfa/cjx_handler.cpp",
165 "xfa/cjx_handler.h",
166 "xfa/cjx_hostpseudomodel.cpp",
167 "xfa/cjx_hostpseudomodel.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000168 "xfa/cjx_instancemanager.cpp",
169 "xfa/cjx_instancemanager.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000170 "xfa/cjx_layoutpseudomodel.cpp",
171 "xfa/cjx_layoutpseudomodel.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000172 "xfa/cjx_list.cpp",
173 "xfa/cjx_list.h",
174 "xfa/cjx_logpseudomodel.cpp",
175 "xfa/cjx_logpseudomodel.h",
176 "xfa/cjx_manifest.cpp",
177 "xfa/cjx_manifest.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000178 "xfa/cjx_model.cpp",
179 "xfa/cjx_model.h",
180 "xfa/cjx_node.cpp",
181 "xfa/cjx_node.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000182 "xfa/cjx_object.cpp",
183 "xfa/cjx_object.h",
184 "xfa/cjx_occur.cpp",
185 "xfa/cjx_occur.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000186 "xfa/cjx_packet.cpp",
187 "xfa/cjx_packet.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000188 "xfa/cjx_script.cpp",
189 "xfa/cjx_script.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000190 "xfa/cjx_signaturepseudomodel.cpp",
191 "xfa/cjx_signaturepseudomodel.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000192 "xfa/cjx_source.cpp",
193 "xfa/cjx_source.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000194 "xfa/cjx_subform.cpp",
195 "xfa/cjx_subform.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000196 "xfa/cjx_template.cpp",
197 "xfa/cjx_template.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000198 "xfa/cjx_textnode.cpp",
199 "xfa/cjx_textnode.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000200 "xfa/cjx_tree.cpp",
201 "xfa/cjx_tree.h",
202 "xfa/cjx_treelist.cpp",
203 "xfa/cjx_treelist.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000204 "xfa/cjx_wsdlconnection.cpp",
205 "xfa/cjx_wsdlconnection.h",
206 "xfa/cjx_xfa.cpp",
207 "xfa/cjx_xfa.h",
Tom Sepez70e52142018-12-13 20:07:50 +0000208 "xfa/fxjse.cpp",
209 "xfa/fxjse.h",
Tom Sepez49dbb7f2018-12-19 17:56:55 +0000210 "xfa/jse_define.h",
Lei Zhanga7dec322018-10-12 18:36:51 +0000211 ]
Tom Sepez92cc7932019-01-15 17:39:45 +0000212 deps += [
213 "../xfa/fgas",
214 "../xfa/fgas/layout",
215 "../xfa/fxfa/fm2js",
216 ]
Lei Zhanga7dec322018-10-12 18:36:51 +0000217 }
218 }
219}
Lei Zhangf03f7812018-10-15 23:48:29 +0000220
221if (pdf_enable_v8) {
222 pdfium_unittest_source_set("unittests") {
223 sources = [
Tom Sepezeccfe0e2018-11-01 16:34:52 +0000224 "cfx_globaldata_unittest.cpp",
Lei Zhangf03f7812018-10-15 23:48:29 +0000225 "cfx_v8_unittest.cpp",
226 "cfx_v8_unittest.h",
227 "cfxjs_engine_unittest.cpp",
228 "cjs_publicmethods_unittest.cpp",
229 "cjs_util_unittest.cpp",
230 ]
231 configs = [ "//v8:external_startup_data" ]
232 deps = [
233 ":fxjs",
234 ]
235 pdfium_root_dir = "../"
236 }
Lei Zhang1929d6e2018-10-15 23:51:28 +0000237
238 pdfium_embeddertest_source_set("embeddertests") {
239 sources = [
240 "cfxjs_engine_embeddertest.cpp",
241 "cjs_publicmethods_embeddertest.cpp",
242 ]
243 configs = [ "//v8:external_startup_data" ]
244 deps = [
245 ":fxjs",
Lei Zhangb5365882019-06-12 01:38:17 +0000246 "../fpdfsdk",
Lei Zhang1929d6e2018-10-15 23:51:28 +0000247 ]
248 pdfium_root_dir = "../"
249
250 if (pdf_enable_xfa) {
Tom Sepez47617702019-01-23 21:55:41 +0000251 sources += [
Lei Zhang15c0b1e2019-03-05 19:54:16 +0000252 "xfa/cfxjse_app_embeddertest.cpp",
Tom Sepez47617702019-01-23 21:55:41 +0000253 "xfa/cfxjse_formcalc_context_embeddertest.cpp",
254 "xfa/cfxjse_value_embeddertest.cpp",
Lei Zhangef35a822019-03-12 21:38:19 +0000255 "xfa/cjx_hostpseudomodel_embeddertest.cpp",
Lei Zhang601809e2019-03-22 17:54:39 +0000256 "xfa/cjx_list_embeddertest.cpp",
Tom Sepez47617702019-01-23 21:55:41 +0000257 ]
Lei Zhangf0ef9d02019-03-14 19:41:30 +0000258 deps += [ "../xfa/fxfa" ]
Lei Zhang1929d6e2018-10-15 23:51:28 +0000259 }
260 }
Lei Zhangf03f7812018-10-15 23:48:29 +0000261}