Initialize Tizen 2.3
[framework/web/webkit-efl.git] / Source / WebCore / UseJSC.cmake
1 list(APPEND WebCore_INCLUDE_DIRECTORIES
2     "${WEBCORE_DIR}/bindings/js"
3     "${WEBCORE_DIR}/bridge/jsc"
4 )
5
6 list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
7     "${WEBCORE_DIR}/testing/js"
8 )
9
10 list(APPEND WebCore_IDL_INCLUDES
11     bindings/js
12 )
13
14 if (PORT MATCHES "BlackBerry")
15     list(APPEND WebCore_IDL_INCLUDES
16         testing/js
17     )
18     list(APPEND WebCore_IDL_FILES
19         testing/Internals.idl
20         testing/InternalSettings.idl
21     )
22 endif ()
23
24 list(APPEND WebCore_SOURCES
25     bindings/js/ArrayValue.cpp
26     bindings/js/BindingState.cpp
27     bindings/js/CallbackFunction.cpp
28     bindings/js/DOMObjectHashTableMap.cpp
29     bindings/js/DOMWrapperWorld.cpp
30     bindings/js/Dictionary.cpp
31     bindings/js/GCController.cpp
32     bindings/js/JSArrayBufferCustom.cpp
33     bindings/js/JSAudioBufferCustom.cpp
34     bindings/js/JSAttrCustom.cpp
35     bindings/js/JSBlobCustom.cpp
36     bindings/js/JSCDATASectionCustom.cpp
37     bindings/js/JSDataViewCustom.cpp
38     bindings/js/JSCSSFontFaceRuleCustom.cpp
39     bindings/js/JSCSSImportRuleCustom.cpp
40     bindings/js/JSCSSMediaRuleCustom.cpp
41     bindings/js/JSCSSPageRuleCustom.cpp
42     bindings/js/JSCSSRuleCustom.cpp
43     bindings/js/JSCSSRuleListCustom.cpp
44     bindings/js/JSCSSStyleDeclarationCustom.cpp
45     bindings/js/JSCSSStyleRuleCustom.cpp
46     bindings/js/JSCSSValueCustom.cpp
47     bindings/js/JSCallbackData.cpp
48     bindings/js/JSCanvasRenderingContext2DCustom.cpp
49     bindings/js/JSCanvasRenderingContextCustom.cpp
50     bindings/js/JSClipboardCustom.cpp
51     bindings/js/JSConsoleCustom.cpp
52     bindings/js/JSCryptoCustom.cpp
53     bindings/js/JSCustomXPathNSResolver.cpp
54     bindings/js/JSDictionary.cpp
55     bindings/js/JSDOMBinding.cpp
56     bindings/js/JSDOMFormDataCustom.cpp
57     bindings/js/JSDOMGlobalObject.cpp
58     bindings/js/JSDOMImplementationCustom.cpp
59     bindings/js/JSDOMMimeTypeArrayCustom.cpp
60     bindings/js/JSDOMPluginArrayCustom.cpp
61     bindings/js/JSDOMPluginCustom.cpp
62     bindings/js/JSDOMStringListCustom.cpp
63     bindings/js/JSDOMStringMapCustom.cpp
64     bindings/js/JSDOMTokenListCustom.cpp
65     bindings/js/JSDOMWindowBase.cpp
66     bindings/js/JSDOMWindowCustom.cpp
67     bindings/js/JSDOMWindowShell.cpp
68     bindings/js/JSDOMWrapper.cpp
69     bindings/js/JSDeviceMotionEventCustom.cpp
70     bindings/js/JSDeviceOrientationEventCustom.cpp
71     bindings/js/JSDocumentCustom.cpp
72     bindings/js/JSElementCustom.cpp
73     bindings/js/JSErrorHandler.cpp
74     bindings/js/JSEventCustom.cpp
75     bindings/js/JSEventListener.cpp
76     bindings/js/JSEventTargetCustom.cpp
77     bindings/js/JSExceptionBase.cpp
78     bindings/js/JSGeolocationCustom.cpp
79     bindings/js/JSHTMLAllCollectionCustom.cpp
80     bindings/js/JSHTMLAppletElementCustom.cpp
81     bindings/js/JSHTMLCanvasElementCustom.cpp
82     bindings/js/JSHTMLCollectionCustom.cpp
83     bindings/js/JSHTMLDocumentCustom.cpp
84     bindings/js/JSHTMLElementCustom.cpp
85     bindings/js/JSHTMLEmbedElementCustom.cpp
86     bindings/js/JSHTMLFormControlsCollectionCustom.cpp
87     bindings/js/JSHTMLFormElementCustom.cpp
88     bindings/js/JSHTMLFrameElementCustom.cpp
89     bindings/js/JSHTMLFrameSetElementCustom.cpp
90     bindings/js/JSHTMLInputElementCustom.cpp
91     bindings/js/JSHTMLLinkElementCustom.cpp
92     bindings/js/JSHTMLMediaElementCustom.cpp
93     bindings/js/JSHTMLObjectElementCustom.cpp
94     bindings/js/JSHTMLOptionsCollectionCustom.cpp
95     bindings/js/JSHTMLSelectElementCustom.cpp
96     bindings/js/JSHTMLStyleElementCustom.cpp
97     bindings/js/JSHTMLTemplateElementCustom.cpp
98     bindings/js/JSHistoryCustom.cpp
99     bindings/js/JSImageConstructor.cpp
100     bindings/js/JSImageDataCustom.cpp
101     bindings/js/JSInjectedScriptHostCustom.cpp
102     bindings/js/JSInjectedScriptManager.cpp
103     bindings/js/JSInspectorFrontendHostCustom.cpp
104     bindings/js/JSJavaScriptCallFrameCustom.cpp
105     bindings/js/JSLazyEventListener.cpp
106     bindings/js/JSLocationCustom.cpp
107     bindings/js/JSMainThreadExecState.cpp
108     bindings/js/JSMediaListCustom.cpp
109     bindings/js/JSMessageChannelCustom.cpp
110     bindings/js/JSMessageEventCustom.cpp
111     bindings/js/JSMessagePortCustom.cpp
112     bindings/js/JSMicroDataItemValueCustom.cpp
113     bindings/js/JSMutationCallback.cpp
114     bindings/js/JSMutationObserverCustom.cpp
115     bindings/js/JSNamedNodeMapCustom.cpp
116     bindings/js/JSNodeCustom.cpp
117     bindings/js/JSNodeFilterCondition.cpp
118     bindings/js/JSNodeFilterCustom.cpp
119     bindings/js/JSNodeIteratorCustom.cpp
120     bindings/js/JSNodeListCustom.cpp
121     bindings/js/JSPluginElementFunctions.cpp
122     bindings/js/JSPopStateEventCustom.cpp
123     bindings/js/JSProcessingInstructionCustom.cpp
124     bindings/js/JSStorageCustom.cpp
125     bindings/js/JSStyleSheetCustom.cpp
126     bindings/js/JSStyleSheetListCustom.cpp
127     bindings/js/JSTextCustom.cpp
128     bindings/js/JSTouchCustom.cpp
129     bindings/js/JSTouchListCustom.cpp
130     bindings/js/JSTreeWalkerCustom.cpp
131     bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp
132     bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp
133     bindings/js/JSWebKitPointCustom.cpp
134     bindings/js/JSXMLHttpRequestCustom.cpp
135     bindings/js/JSXMLHttpRequestUploadCustom.cpp
136     bindings/js/JSXPathResultCustom.cpp
137     bindings/js/JSXSLTProcessorCustom.cpp
138     bindings/js/JavaScriptCallFrame.cpp
139     bindings/js/PageScriptDebugServer.cpp
140     bindings/js/ScheduledAction.cpp
141     bindings/js/ScriptCachedFrameData.cpp
142     bindings/js/ScriptCallStackFactory.cpp
143     bindings/js/ScriptController.cpp
144     bindings/js/ScriptDebugServer.cpp
145     bindings/js/ScriptEventListener.cpp
146     bindings/js/ScriptFunctionCall.cpp
147     bindings/js/ScriptGCEvent.cpp
148     bindings/js/ScriptObject.cpp
149     bindings/js/ScriptProfile.cpp
150     bindings/js/ScriptProfiler.cpp
151     bindings/js/ScriptState.cpp
152     bindings/js/ScriptValue.cpp
153     bindings/js/SerializedScriptValue.cpp
154
155     bridge/IdentifierRep.cpp
156     bridge/NP_jsobject.cpp
157     bridge/npruntime.cpp
158     bridge/runtime_array.cpp
159     bridge/runtime_method.cpp
160     bridge/runtime_object.cpp
161     bridge/runtime_root.cpp
162
163     bridge/c/CRuntimeObject.cpp
164     bridge/c/c_class.cpp
165     bridge/c/c_instance.cpp
166     bridge/c/c_runtime.cpp
167     bridge/c/c_utility.cpp
168
169     bridge/jsc/BridgeJSC.cpp
170 )
171
172 list(APPEND WebCoreTestSupport_SOURCES
173     testing/js/WebCoreTestSupport.cpp
174 )
175
176 if (ENABLE_BLOB)
177     list(APPEND WebCore_SOURCES
178         bindings/js/JSFileReaderCustom.cpp
179     )
180 endif ()
181
182 if (ENABLE_REQUEST_ANIMATION_FRAME)
183     list(APPEND WebCore_SOURCES
184         bindings/js/JSRequestAnimationFrameCallbackCustom.cpp
185     )
186 endif ()
187
188 if (ENABLE_SQL_DATABASE)
189     list(APPEND WebCore_SOURCES
190         bindings/js/JSCustomSQLStatementErrorCallback.cpp
191         bindings/js/JSSQLResultSetRowListCustom.cpp
192         bindings/js/JSSQLTransactionCustom.cpp
193         bindings/js/JSSQLTransactionSyncCustom.cpp
194     )
195 endif ()
196
197 if (ENABLE_INDEXED_DATABASE)
198     list(APPEND WebCore_SOURCES
199         bindings/js/IDBBindingUtilities.cpp
200         bindings/js/JSIDBAnyCustom.cpp
201         bindings/js/JSIDBDatabaseCustom.cpp
202         bindings/js/JSIDBObjectStoreCustom.cpp
203     )
204 endif ()
205
206 if (ENABLE_WORKERS)
207     list(APPEND WebCore_SOURCES
208         bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp
209         bindings/js/JSWorkerGlobalScopeBase.cpp
210         bindings/js/JSWorkerGlobalScopeCustom.cpp
211         bindings/js/JSWorkerCustom.cpp
212         bindings/js/WorkerScriptController.cpp
213         bindings/js/WorkerScriptDebugServer.cpp
214     )
215 endif ()
216
217 if (ENABLE_VIDEO_TRACK)
218     list(APPEND WebCore_SOURCES
219         bindings/js/JSAudioTrackCustom.cpp
220         bindings/js/JSAudioTrackListCustom.cpp
221         bindings/js/JSTextTrackCueCustom.cpp
222         bindings/js/JSTextTrackCustom.cpp
223         bindings/js/JSTextTrackListCustom.cpp
224         bindings/js/JSTrackCustom.cpp
225         bindings/js/JSTrackEventCustom.cpp
226         bindings/js/JSVideoTrackCustom.cpp
227         bindings/js/JSVideoTrackListCustom.cpp
228     )
229 endif ()
230
231 if (ENABLE_SHARED_WORKERS)
232     list(APPEND WebCore_SOURCES
233         bindings/js/JSSharedWorkerCustom.cpp
234     )
235 endif ()
236
237 if (ENABLE_FILE_SYSTEM)
238     list(APPEND WebCore_SOURCES
239         bindings/js/JSEntryCustom.cpp
240         bindings/js/JSEntrySyncCustom.cpp
241     )
242 endif ()
243
244 if (ENABLE_SVG)
245     list(APPEND WebCore_SOURCES
246         bindings/js/JSSVGElementInstanceCustom.cpp
247         bindings/js/JSSVGLengthCustom.cpp
248         bindings/js/JSSVGPathSegCustom.cpp
249     )
250 endif ()
251
252 if (ENABLE_WEBGL)
253     list(APPEND WebCore_SOURCES
254         bindings/js/JSWebGLRenderingContextCustom.cpp
255     )
256 endif ()
257
258 if (ENABLE_WEB_AUDIO)
259     list(APPEND WebCore_SOURCES
260         bindings/js/JSAudioBufferSourceNodeCustom.cpp
261         bindings/js/JSAudioContextCustom.cpp
262         bindings/js/JSBiquadFilterNodeCustom.cpp
263         bindings/js/JSOscillatorNodeCustom.cpp
264         bindings/js/JSPannerNodeCustom.cpp
265     )
266 endif ()
267
268 if (ENABLE_MEDIA_STREAM)
269     list(APPEND WebCore_SOURCES
270         bindings/js/JSRTCStatsResponseCustom.cpp
271     )
272 endif ()
273
274 if (ENABLE_TIZEN_MEDIA_STREAM_RECORDER)
275     list(APPEND WebCore_SOURCES
276         bindings/js/JSMediaStreamCustom.cpp
277         bindings/js/JSMediaStreamRecorderCustom.cpp
278     )
279 endif ()
280
281 list(APPEND SCRIPTS_BINDINGS
282     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
283     ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorJS.pm
284 )
285
286 set(IDL_INCLUDES "")
287 foreach (_include ${WebCore_IDL_INCLUDES})
288     list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
289 endforeach ()
290
291 foreach (_include ${WebCoreTestSupport_IDL_INCLUDES})
292     list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
293 endforeach ()
294
295 set(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
296
297 # Create JavaScript C++ code given an IDL input
298 foreach (_idl ${WebCore_IDL_FILES})
299     set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
300 endforeach ()
301
302 foreach (_idl ${WebCoreTestSupport_IDL_FILES})
303     set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
304 endforeach ()
305
306 set(IDL_FILES_LIST "${IDL_FILES_LIST}${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl\n")
307 list(APPEND IDL_INCLUDES --include=${DERIVED_SOURCES_WEBCORE_DIR})
308 list(APPEND WebCoreTestSupport_IDL_FILES ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl)
309
310 file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
311
312 add_custom_command(
313     OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WINDOW_CONSTRUCTORS_FILE} ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
314     DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES}
315     COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --idlFilesList ${IDL_FILES_TMP} --supplementalDependencyFile ${SUPPLEMENTAL_DEPENDENCY_FILE} --windowConstructorsFile ${WINDOW_CONSTRUCTORS_FILE} --workerGlobalScopeConstructorsFile ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
316 --sharedWorkerGlobalScopeConstructorsFile ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} --dedicatedWorkerGlobalScopeConstructorsFile ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
317     VERBATIM)
318
319 GENERATE_BINDINGS(WebCore_SOURCES
320     "${WebCore_IDL_FILES}"
321     "${WEBCORE_DIR}"
322     "${IDL_INCLUDES}"
323     "${FEATURE_DEFINES_JAVASCRIPT}"
324     ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
325     ${IDL_ATTRIBUTES_FILE}
326     ${SUPPLEMENTAL_DEPENDENCY_FILE}
327     ${WINDOW_CONSTRUCTORS_FILE}
328     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
329     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
330     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
331
332 GENERATE_BINDINGS(WebCoreTestSupport_SOURCES
333     "${WebCoreTestSupport_IDL_FILES}"
334     "${WEBCORE_DIR}"
335     "${IDL_INCLUDES}"
336     "${FEATURE_DEFINES_JAVASCRIPT}"
337     ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
338     ${IDL_ATTRIBUTES_FILE}
339     ${SUPPLEMENTAL_DEPENDENCY_FILE}
340     ${WINDOW_CONSTRUCTORS_FILE}
341     ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
342     ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
343     ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})