Unreviewed. Rebaselined run-bindings-tests results.
[WebKit-https.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 WebCore_IDL_INCLUDES
7     bindings/js
8 )
9
10 LIST(APPEND WebCore_SOURCES
11     bindings/js/CallbackFunction.cpp
12     bindings/js/DOMObjectHashTableMap.cpp
13     bindings/js/DOMWrapperWorld.cpp
14     bindings/js/GCController.cpp
15     bindings/js/JSAttrCustom.cpp
16     bindings/js/JSArrayBufferCustom.cpp
17     bindings/js/JSDataViewCustom.cpp
18     bindings/js/JSCDATASectionCustom.cpp
19     bindings/js/JSCSSFontFaceRuleCustom.cpp
20     bindings/js/JSCSSImportRuleCustom.cpp
21     bindings/js/JSCSSMediaRuleCustom.cpp
22     bindings/js/JSCSSPageRuleCustom.cpp
23     bindings/js/JSCSSRuleCustom.cpp
24     bindings/js/JSCSSRuleListCustom.cpp
25     bindings/js/JSCSSStyleDeclarationCustom.cpp
26     bindings/js/JSCSSStyleRuleCustom.cpp
27     bindings/js/JSCSSValueCustom.cpp
28     bindings/js/JSCallbackData.cpp
29     bindings/js/JSCanvasRenderingContext2DCustom.cpp
30     bindings/js/JSCanvasRenderingContextCustom.cpp
31     bindings/js/JSClipboardCustom.cpp
32     bindings/js/JSConsoleCustom.cpp
33     bindings/js/JSCoordinatesCustom.cpp
34     bindings/js/JSCustomVoidCallback.cpp
35     bindings/js/JSCustomXPathNSResolver.cpp
36     bindings/js/JSDictionary.cpp
37     bindings/js/JSDOMBinding.cpp
38     bindings/js/JSDOMFormDataCustom.cpp
39     bindings/js/JSDOMGlobalObject.cpp
40     bindings/js/JSDOMImplementationCustom.cpp
41     bindings/js/JSDOMMimeTypeArrayCustom.cpp
42     bindings/js/JSDOMPluginArrayCustom.cpp
43     bindings/js/JSDOMPluginCustom.cpp
44     bindings/js/JSDOMStringMapCustom.cpp
45     bindings/js/JSDOMTokenListCustom.cpp
46     bindings/js/JSDOMWindowBase.cpp
47     bindings/js/JSDOMWindowCustom.cpp
48     bindings/js/JSDOMWindowShell.cpp
49     bindings/js/JSDOMWrapper.cpp
50     bindings/js/JSDeviceMotionEventCustom.cpp
51     bindings/js/JSDeviceOrientationEventCustom.cpp
52     bindings/js/JSDocumentCustom.cpp
53     bindings/js/JSElementCustom.cpp
54     bindings/js/JSErrorHandler.cpp
55     bindings/js/JSEventCustom.cpp
56     bindings/js/JSEventListener.cpp
57     bindings/js/JSEventTarget.cpp
58     bindings/js/JSExceptionBase.cpp
59     bindings/js/JSFloat32ArrayCustom.cpp
60     bindings/js/JSFloat64ArrayCustom.cpp
61     bindings/js/JSGeolocationCustom.cpp
62     bindings/js/JSHTMLAllCollectionCustom.cpp
63     bindings/js/JSHTMLAppletElementCustom.cpp
64     bindings/js/JSHTMLCanvasElementCustom.cpp
65     bindings/js/JSHTMLCollectionCustom.cpp
66     bindings/js/JSHTMLDocumentCustom.cpp
67     bindings/js/JSHTMLElementCustom.cpp
68     bindings/js/JSHTMLEmbedElementCustom.cpp
69     bindings/js/JSHTMLFormElementCustom.cpp
70     bindings/js/JSHTMLFrameElementCustom.cpp
71     bindings/js/JSHTMLFrameSetElementCustom.cpp
72     bindings/js/JSHTMLInputElementCustom.cpp
73     bindings/js/JSHTMLLinkElementCustom.cpp
74     bindings/js/JSHTMLMediaElementCustom.cpp
75     bindings/js/JSHTMLObjectElementCustom.cpp
76     bindings/js/JSHTMLOptionsCollectionCustom.cpp
77     bindings/js/JSHTMLOutputElementCustom.cpp
78     bindings/js/JSHTMLSelectElementCustom.cpp
79     bindings/js/JSHTMLStyleElementCustom.cpp
80     bindings/js/JSHistoryCustom.cpp
81     bindings/js/JSImageConstructor.cpp
82     bindings/js/JSImageDataCustom.cpp
83     bindings/js/JSInt16ArrayCustom.cpp
84     bindings/js/JSInt32ArrayCustom.cpp
85     bindings/js/JSInt8ArrayCustom.cpp
86     bindings/js/JSInjectedScriptHostCustom.cpp
87     bindings/js/JSInjectedScriptManager.cpp
88     bindings/js/JSInspectorFrontendHostCustom.cpp
89     bindings/js/JSJavaScriptCallFrameCustom.cpp
90     bindings/js/JSLazyEventListener.cpp
91     bindings/js/JSLocationCustom.cpp
92     bindings/js/JSMainThreadExecState.cpp
93     bindings/js/JSMediaListCustom.cpp
94     bindings/js/JSMemoryInfoCustom.cpp
95     bindings/js/JSMessageChannelCustom.cpp
96     bindings/js/JSMessageEventCustom.cpp
97     bindings/js/JSMessagePortCustom.cpp
98     bindings/js/JSMutationCallbackCustom.cpp
99     bindings/js/JSNamedNodeMapCustom.cpp
100     bindings/js/JSNodeCustom.cpp
101     bindings/js/JSNodeFilterCondition.cpp
102     bindings/js/JSNodeFilterCustom.cpp
103     bindings/js/JSNodeIteratorCustom.cpp
104     bindings/js/JSNodeListCustom.cpp
105     bindings/js/JSPluginElementFunctions.cpp
106     bindings/js/JSPopStateEventCustom.cpp
107     bindings/js/JSProcessingInstructionCustom.cpp
108     bindings/js/JSScriptProfileNodeCustom.cpp
109     bindings/js/JSStorageCustom.cpp
110     bindings/js/JSStyleSheetCustom.cpp
111     bindings/js/JSStyleSheetListCustom.cpp
112     bindings/js/JSTextCustom.cpp
113     bindings/js/JSTouchCustom.cpp
114     bindings/js/JSTouchListCustom.cpp
115     bindings/js/JSTreeWalkerCustom.cpp
116     bindings/js/JSUint16ArrayCustom.cpp 
117     bindings/js/JSUint32ArrayCustom.cpp
118     bindings/js/JSUint8ArrayCustom.cpp
119     bindings/js/JSWebKitAnimationCustom.cpp
120     bindings/js/JSWebKitAnimationListCustom.cpp
121     bindings/js/JSWebKitCSSKeyframeRuleCustom.cpp
122     bindings/js/JSWebKitCSSKeyframesRuleCustom.cpp
123     bindings/js/JSWebKitMutationObserverCustom.cpp
124     bindings/js/JSWebKitPointCustom.cpp
125     bindings/js/JSXMLHttpRequestCustom.cpp
126     bindings/js/JSXMLHttpRequestUploadCustom.cpp
127     bindings/js/JSXPathResultCustom.cpp
128     bindings/js/JSXSLTProcessorCustom.cpp
129     bindings/js/JavaScriptCallFrame.cpp
130     bindings/js/PageScriptDebugServer.cpp
131     bindings/js/ScheduledAction.cpp
132     bindings/js/ScriptCachedFrameData.cpp
133     bindings/js/ScriptCallStackFactory.cpp
134     bindings/js/ScriptController.cpp
135     bindings/js/ScriptDebugServer.cpp
136     bindings/js/ScriptEventListener.cpp
137     bindings/js/ScriptFunctionCall.cpp
138     bindings/js/ScriptGCEvent.cpp
139     bindings/js/ScriptObject.cpp
140     bindings/js/ScriptProfile.cpp
141     bindings/js/ScriptProfiler.cpp
142     bindings/js/ScriptState.cpp
143     bindings/js/ScriptValue.cpp
144     bindings/js/SerializedScriptValue.cpp
145
146     bridge/IdentifierRep.cpp
147     bridge/NP_jsobject.cpp
148     bridge/npruntime.cpp
149     bridge/runtime_array.cpp
150     bridge/runtime_method.cpp
151     bridge/runtime_object.cpp
152     bridge/runtime_root.cpp
153
154     bridge/c/CRuntimeObject.cpp
155     bridge/c/c_class.cpp
156     bridge/c/c_instance.cpp
157     bridge/c/c_runtime.cpp
158     bridge/c/c_utility.cpp
159
160     bridge/jsc/BridgeJSC.cpp
161 )
162
163 IF (ENABLE_BLOB)
164     LIST(APPEND WebCore_SOURCES
165         bindings/js/JSFileReaderCustom.cpp
166     )
167 ENDIF ()
168
169 IF (ENABLE_REQUEST_ANIMATION_FRAME)
170     LIST(APPEND WebCore_SOURCES
171         bindings/js/JSRequestAnimationFrameCallbackCustom.cpp
172     )
173 ENDIF ()
174
175 IF (ENABLE_SQL_DATABASE)
176     LIST(APPEND WebCore_SOURCES
177         bindings/js/JSCustomSQLStatementErrorCallback.cpp
178         bindings/js/JSSQLResultSetRowListCustom.cpp
179         bindings/js/JSSQLTransactionCustom.cpp
180         bindings/js/JSSQLTransactionSyncCustom.cpp
181     )
182 ENDIF ()
183
184 IF (ENABLE_INDEXED_DATABASE)
185     LIST(APPEND WebCore_SOURCES
186         bindings/js/IDBBindingUtilities.cpp
187         bindings/js/JSIDBAnyCustom.cpp
188         bindings/js/JSIDBKeyCustom.cpp
189     )
190 ENDIF ()
191
192 IF (ENABLE_WEB_SOCKETS)
193     LIST(APPEND WebCore_SOURCES
194         bindings/js/JSWebSocketCustom.cpp
195     )
196 ENDIF ()
197
198 IF (ENABLE_WORKERS)
199     LIST(APPEND WebCore_SOURCES
200         bindings/js/JSDedicatedWorkerContextCustom.cpp
201         bindings/js/JSWorkerContextBase.cpp
202         bindings/js/JSWorkerContextCustom.cpp
203         bindings/js/JSWorkerCustom.cpp
204         bindings/js/WorkerScriptController.cpp
205         bindings/js/WorkerScriptDebugServer.cpp
206     )
207 ENDIF ()
208
209 IF (ENABLE_SHARED_WORKERS)
210     LIST(APPEND WebCore_SOURCES
211         bindings/js/JSSharedWorkerCustom.cpp
212     )
213 ENDIF ()
214
215 IF (ENABLE_NOTIFICATIONS)
216     LIST(APPEND WebCore_SOURCES
217         bindings/js/JSDesktopNotificationsCustom.cpp
218     )
219 ENDIF ()
220
221 if (ENABLE_FILE_SYSTEM)
222     LIST(APPEND WebCore_SOURCES
223         bindings/js/JSDirectoryEntryCustom.cpp
224         bindings/js/JSDirectoryEntrySyncCustom.cpp
225         bindings/js/JSEntryCustom.cpp
226         bindings/js/JSEntrySyncCustom.cpp
227     )
228 ENDIF ()
229
230 IF (ENABLE_SVG)
231     LIST(APPEND WebCore_SOURCES
232         bindings/js/JSSVGElementInstanceCustom.cpp
233         bindings/js/JSSVGLengthCustom.cpp
234         bindings/js/JSSVGPathSegCustom.cpp
235     )
236 ENDIF ()
237
238 IF (ENABLE_WEBGL)
239     LIST(APPEND WebCore_SOURCES
240         bindings/js/JSWebGLRenderingContextCustom.cpp
241     )
242 ENDIF ()
243
244 LIST(APPEND SCRIPTS_BINDINGS
245     ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
246 )
247
248 SET(IDL_INCLUDES "")
249 FOREACH (_include ${WebCore_IDL_INCLUDES})
250     LIST(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
251 ENDFOREACH ()
252
253 SET(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1")
254 FOREACH (_feature ${FEATURE_DEFINES})
255     SET(FEATURE_DEFINES_JAVASCRIPT "${FEATURE_DEFINES_JAVASCRIPT} ${_feature}")
256 ENDFOREACH ()
257
258 # Create JavaScript C++ code given an IDL input
259 FOREACH (_file ${WebCore_IDL_FILES})
260     GET_FILENAME_COMPONENT (_name ${_file} NAME_WE)
261     ADD_CUSTOM_COMMAND(
262         OUTPUT  ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_name}.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_name}.h
263         MAIN_DEPENDENCY ${_file}
264         DEPENDS ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl ${SCRIPTS_BINDINGS} ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorJS.pm ${_file}
265         COMMAND ${PERL_EXECUTABLE} -I${WEBCORE_DIR}/bindings/scripts ${WEBCORE_DIR}/bindings/scripts/generate-bindings.pl --defines "${FEATURE_DEFINES_JAVASCRIPT}" --generator JS ${IDL_INCLUDES} --outputDir "${DERIVED_SOURCES_WEBCORE_DIR}" --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${WEBCORE_DIR}/${_file}
266         VERBATIM)
267     LIST(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/JS${_name}.cpp)
268 ENDFOREACH ()