UseJSC.cmake 10.8 KB
Newer Older
1
list(APPEND WebCore_INCLUDE_DIRECTORIES
2 3 4 5
    "${WEBCORE_DIR}/bindings/js"
    "${WEBCORE_DIR}/bridge/jsc"
)

6
list(APPEND WebCoreTestSupport_INCLUDE_DIRECTORIES
7 8 9
    "${WEBCORE_DIR}/testing/js"
)

10
list(APPEND WebCore_IDL_INCLUDES
11 12 13
    bindings/js
)

14 15
if (PORT MATCHES "BlackBerry")
    list(APPEND WebCore_IDL_INCLUDES
16 17
        testing/js
    )
18
    list(APPEND WebCore_IDL_FILES
19 20 21
        testing/Internals.idl
        testing/InternalSettings.idl
    )
22
endif ()
23

24
list(APPEND WebCore_SOURCES
25
    bindings/js/ArrayValue.cpp
26
    bindings/js/CallbackFunction.cpp
27 28
    bindings/js/DOMObjectHashTableMap.cpp
    bindings/js/DOMWrapperWorld.cpp
29
    bindings/js/Dictionary.cpp
30
    bindings/js/GCController.cpp
31 32
    bindings/js/JSAttrCustom.cpp
    bindings/js/JSBlobCustom.cpp
33 34 35 36 37 38 39 40 41
    bindings/js/JSCDATASectionCustom.cpp
    bindings/js/JSCSSRuleCustom.cpp
    bindings/js/JSCSSRuleListCustom.cpp
    bindings/js/JSCSSStyleDeclarationCustom.cpp
    bindings/js/JSCSSValueCustom.cpp
    bindings/js/JSCallbackData.cpp
    bindings/js/JSCanvasRenderingContext2DCustom.cpp
    bindings/js/JSCanvasRenderingContextCustom.cpp
    bindings/js/JSClipboardCustom.cpp
42
    bindings/js/JSCryptoCustom.cpp
43
    bindings/js/JSCustomXPathNSResolver.cpp
44
    bindings/js/JSDictionary.cpp
45 46 47
    bindings/js/JSDOMBinding.cpp
    bindings/js/JSDOMFormDataCustom.cpp
    bindings/js/JSDOMGlobalObject.cpp
weinig@apple.com's avatar
weinig@apple.com committed
48
    bindings/js/JSDOMGlobalObjectTask.cpp
49 50 51
    bindings/js/JSDOMMimeTypeArrayCustom.cpp
    bindings/js/JSDOMPluginArrayCustom.cpp
    bindings/js/JSDOMPluginCustom.cpp
52
    bindings/js/JSDOMStringListCustom.cpp
53 54 55 56 57 58 59 60 61 62 63 64
    bindings/js/JSDOMStringMapCustom.cpp
    bindings/js/JSDOMWindowBase.cpp
    bindings/js/JSDOMWindowCustom.cpp
    bindings/js/JSDOMWindowShell.cpp
    bindings/js/JSDOMWrapper.cpp
    bindings/js/JSDeviceMotionEventCustom.cpp
    bindings/js/JSDeviceOrientationEventCustom.cpp
    bindings/js/JSDocumentCustom.cpp
    bindings/js/JSElementCustom.cpp
    bindings/js/JSErrorHandler.cpp
    bindings/js/JSEventCustom.cpp
    bindings/js/JSEventListener.cpp
65
    bindings/js/JSEventTargetCustom.cpp
66 67 68 69 70 71 72 73 74
    bindings/js/JSExceptionBase.cpp
    bindings/js/JSGeolocationCustom.cpp
    bindings/js/JSHTMLAllCollectionCustom.cpp
    bindings/js/JSHTMLAppletElementCustom.cpp
    bindings/js/JSHTMLCanvasElementCustom.cpp
    bindings/js/JSHTMLCollectionCustom.cpp
    bindings/js/JSHTMLDocumentCustom.cpp
    bindings/js/JSHTMLElementCustom.cpp
    bindings/js/JSHTMLEmbedElementCustom.cpp
75
    bindings/js/JSHTMLFormControlsCollectionCustom.cpp
76 77 78 79 80
    bindings/js/JSHTMLFormElementCustom.cpp
    bindings/js/JSHTMLFrameElementCustom.cpp
    bindings/js/JSHTMLFrameSetElementCustom.cpp
    bindings/js/JSHTMLInputElementCustom.cpp
    bindings/js/JSHTMLLinkElementCustom.cpp
81
    bindings/js/JSHTMLMediaElementCustom.cpp
82 83 84
    bindings/js/JSHTMLObjectElementCustom.cpp
    bindings/js/JSHTMLOptionsCollectionCustom.cpp
    bindings/js/JSHTMLSelectElementCustom.cpp
85
    bindings/js/JSHTMLTemplateElementCustom.cpp
86 87 88 89 90 91 92 93 94 95 96 97 98
    bindings/js/JSHistoryCustom.cpp
    bindings/js/JSImageConstructor.cpp
    bindings/js/JSImageDataCustom.cpp
    bindings/js/JSInjectedScriptHostCustom.cpp
    bindings/js/JSInjectedScriptManager.cpp
    bindings/js/JSInspectorFrontendHostCustom.cpp
    bindings/js/JSJavaScriptCallFrameCustom.cpp
    bindings/js/JSLazyEventListener.cpp
    bindings/js/JSLocationCustom.cpp
    bindings/js/JSMainThreadExecState.cpp
    bindings/js/JSMessageChannelCustom.cpp
    bindings/js/JSMessageEventCustom.cpp
    bindings/js/JSMessagePortCustom.cpp
99
    bindings/js/JSMutationCallback.cpp
100
    bindings/js/JSMutationObserverCustom.cpp
101 102 103 104 105 106 107
    bindings/js/JSNamedNodeMapCustom.cpp
    bindings/js/JSNodeCustom.cpp
    bindings/js/JSNodeFilterCondition.cpp
    bindings/js/JSNodeFilterCustom.cpp
    bindings/js/JSNodeIteratorCustom.cpp
    bindings/js/JSNodeListCustom.cpp
    bindings/js/JSPluginElementFunctions.cpp
108
    bindings/js/JSPopStateEventCustom.cpp
109
    bindings/js/JSStorageCustom.cpp
110 111 112 113 114 115 116 117
    bindings/js/JSStyleSheetCustom.cpp
    bindings/js/JSStyleSheetListCustom.cpp
    bindings/js/JSTextCustom.cpp
    bindings/js/JSTouchCustom.cpp
    bindings/js/JSTouchListCustom.cpp
    bindings/js/JSTreeWalkerCustom.cpp
    bindings/js/JSWebKitPointCustom.cpp
    bindings/js/JSXMLHttpRequestCustom.cpp
118
    bindings/js/JSXPathResultCustom.cpp
119 120
    bindings/js/JSXSLTProcessorCustom.cpp
    bindings/js/JavaScriptCallFrame.cpp
121
    bindings/js/PageScriptDebugServer.cpp
122 123 124 125 126 127 128 129 130 131 132 133
    bindings/js/ScheduledAction.cpp
    bindings/js/ScriptCachedFrameData.cpp
    bindings/js/ScriptCallStackFactory.cpp
    bindings/js/ScriptController.cpp
    bindings/js/ScriptDebugServer.cpp
    bindings/js/ScriptFunctionCall.cpp
    bindings/js/ScriptObject.cpp
    bindings/js/ScriptProfile.cpp
    bindings/js/ScriptProfiler.cpp
    bindings/js/ScriptState.cpp
    bindings/js/ScriptValue.cpp
    bindings/js/SerializedScriptValue.cpp
134
    bindings/js/WebCoreTypedArrayController.cpp
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152

    bridge/IdentifierRep.cpp
    bridge/NP_jsobject.cpp
    bridge/npruntime.cpp
    bridge/runtime_array.cpp
    bridge/runtime_method.cpp
    bridge/runtime_object.cpp
    bridge/runtime_root.cpp

    bridge/c/CRuntimeObject.cpp
    bridge/c/c_class.cpp
    bridge/c/c_instance.cpp
    bridge/c/c_runtime.cpp
    bridge/c/c_utility.cpp

    bridge/jsc/BridgeJSC.cpp
)

153
list(APPEND WebCoreTestSupport_SOURCES
154 155 156
    testing/js/WebCoreTestSupport.cpp
)

157 158
if (ENABLE_BLOB)
    list(APPEND WebCore_SOURCES
159 160
        bindings/js/JSFileReaderCustom.cpp
    )
161
endif ()
162

163 164
if (ENABLE_REQUEST_ANIMATION_FRAME)
    list(APPEND WebCore_SOURCES
165 166
        bindings/js/JSRequestAnimationFrameCallbackCustom.cpp
    )
167
endif ()
168

169 170
if (ENABLE_SQL_DATABASE)
    list(APPEND WebCore_SOURCES
171 172 173 174 175
        bindings/js/JSCustomSQLStatementErrorCallback.cpp
        bindings/js/JSSQLResultSetRowListCustom.cpp
        bindings/js/JSSQLTransactionCustom.cpp
        bindings/js/JSSQLTransactionSyncCustom.cpp
    )
176
endif ()
177

178 179
if (ENABLE_INDEXED_DATABASE)
    list(APPEND WebCore_SOURCES
180 181
        bindings/js/IDBBindingUtilities.cpp
        bindings/js/JSIDBAnyCustom.cpp
182 183
        bindings/js/JSIDBDatabaseCustom.cpp
        bindings/js/JSIDBObjectStoreCustom.cpp
184
    )
185
endif ()
186

187
    list(APPEND WebCore_SOURCES
188 189 190
        bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp
        bindings/js/JSWorkerGlobalScopeBase.cpp
        bindings/js/JSWorkerGlobalScopeCustom.cpp
191 192 193 194 195
        bindings/js/JSWorkerCustom.cpp
        bindings/js/WorkerScriptController.cpp
        bindings/js/WorkerScriptDebugServer.cpp
    )

196 197
if (ENABLE_VIDEO_TRACK)
    list(APPEND WebCore_SOURCES
198 199
        bindings/js/JSAudioTrackCustom.cpp
        bindings/js/JSAudioTrackListCustom.cpp
200 201 202 203 204
        bindings/js/JSTextTrackCueCustom.cpp
        bindings/js/JSTextTrackCustom.cpp
        bindings/js/JSTextTrackListCustom.cpp
        bindings/js/JSTrackCustom.cpp
        bindings/js/JSTrackEventCustom.cpp
205 206
        bindings/js/JSVideoTrackCustom.cpp
        bindings/js/JSVideoTrackListCustom.cpp
207
    )
208
endif ()
209

210 211
if (ENABLE_SHARED_WORKERS)
    list(APPEND WebCore_SOURCES
212 213
        bindings/js/JSSharedWorkerCustom.cpp
    )
214
endif ()
215

216 217
if (ENABLE_SVG)
    list(APPEND WebCore_SOURCES
218 219 220 221
        bindings/js/JSSVGElementInstanceCustom.cpp
        bindings/js/JSSVGLengthCustom.cpp
        bindings/js/JSSVGPathSegCustom.cpp
    )
222
endif ()
223

224 225
if (ENABLE_WEBGL)
    list(APPEND WebCore_SOURCES
226 227
        bindings/js/JSWebGLRenderingContextCustom.cpp
    )
228
endif ()
229

230 231
if (ENABLE_WEB_AUDIO)
    list(APPEND WebCore_SOURCES
232 233
        bindings/js/JSAudioBufferSourceNodeCustom.cpp
        bindings/js/JSAudioContextCustom.cpp
234
        bindings/js/JSBiquadFilterNodeCustom.cpp
235
        bindings/js/JSOscillatorNodeCustom.cpp
236
        bindings/js/JSPannerNodeCustom.cpp
237
    )
238
endif ()
239

240 241
if (ENABLE_MEDIA_STREAM)
    list(APPEND WebCore_SOURCES
242 243
        bindings/js/JSMediaSourceStatesCustom.cpp
        bindings/js/JSMediaStreamCapabilitiesCustom.cpp
244
        bindings/js/JSRTCIceCandidateCustom.cpp
245
        bindings/js/JSRTCPeerConnectionCustom.cpp
246
        bindings/js/JSRTCSessionDescriptionCustom.cpp
247 248 249 250
        bindings/js/JSRTCStatsResponseCustom.cpp
    )
endif ()

251
list(APPEND SCRIPTS_BINDINGS
252
    ${WEBCORE_DIR}/bindings/scripts/CodeGenerator.pm
253
    ${WEBCORE_DIR}/bindings/scripts/CodeGeneratorJS.pm
254 255
)

256 257 258 259
set(IDL_INCLUDES "")
foreach (_include ${WebCore_IDL_INCLUDES})
    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
endforeach ()
260

261 262 263
foreach (_include ${WebCoreTestSupport_IDL_INCLUDES})
    list(APPEND IDL_INCLUDES --include=${WEBCORE_DIR}/${_include})
endforeach ()
264

265
set(FEATURE_DEFINES_JAVASCRIPT "LANGUAGE_JAVASCRIPT=1 ${FEATURE_DEFINES_WITH_SPACE_SEPARATOR}")
266 267

# Create JavaScript C++ code given an IDL input
268 269 270
foreach (_idl ${WebCore_IDL_FILES})
    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
endforeach ()
271

272 273 274
foreach (_idl ${WebCoreTestSupport_IDL_FILES})
    set(IDL_FILES_LIST "${IDL_FILES_LIST}${WEBCORE_DIR}/${_idl}\n")
endforeach ()
275

276 277 278 279
set(IDL_FILES_LIST "${IDL_FILES_LIST}${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl\n")
list(APPEND IDL_INCLUDES --include=${DERIVED_SOURCES_WEBCORE_DIR})
list(APPEND WebCoreTestSupport_IDL_FILES ${DERIVED_SOURCES_WEBCORE_DIR}/InternalSettingsGenerated.idl)

280
file(WRITE ${IDL_FILES_TMP} ${IDL_FILES_LIST})
281

282
add_custom_command(
283
    OUTPUT ${SUPPLEMENTAL_DEPENDENCY_FILE} ${WINDOW_CONSTRUCTORS_FILE} ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
284
    DEPENDS ${WEBCORE_DIR}/bindings/scripts/preprocess-idls.pl ${SCRIPTS_PREPROCESS_IDLS} ${WebCore_IDL_FILES} ${WebCoreTestSupport_IDL_FILES}
285
    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}
286
--sharedWorkerGlobalScopeConstructorsFile ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE} --dedicatedWorkerGlobalScopeConstructorsFile ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
287 288
    VERBATIM)

289 290 291 292 293 294
GENERATE_BINDINGS(WebCore_SOURCES
    "${WebCore_IDL_FILES}"
    "${WEBCORE_DIR}"
    "${IDL_INCLUDES}"
    "${FEATURE_DEFINES_JAVASCRIPT}"
    ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
295
    ${IDL_ATTRIBUTES_FILE}
296
    ${SUPPLEMENTAL_DEPENDENCY_FILE}
297
    ${WINDOW_CONSTRUCTORS_FILE}
298 299 300
    ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})
301 302 303 304 305 306 307

GENERATE_BINDINGS(WebCoreTestSupport_SOURCES
    "${WebCoreTestSupport_IDL_FILES}"
    "${WEBCORE_DIR}"
    "${IDL_INCLUDES}"
    "${FEATURE_DEFINES_JAVASCRIPT}"
    ${DERIVED_SOURCES_WEBCORE_DIR} JS JS
308
    ${IDL_ATTRIBUTES_FILE}
309
    ${SUPPLEMENTAL_DEPENDENCY_FILE}
310
    ${WINDOW_CONSTRUCTORS_FILE}
311 312 313
    ${WORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    ${SHAREDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE}
    ${DEDICATEDWORKERGLOBALSCOPE_CONSTRUCTORS_FILE})