UseJSC.cmake 11 KB

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