1 SET(JavaScriptCore_INCLUDE_DIRECTORIES
3 "${JAVASCRIPTCORE_DIR}"
4 "${JAVASCRIPTCORE_DIR}/API"
5 "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
6 "${JAVASCRIPTCORE_DIR}/assembler"
7 "${JAVASCRIPTCORE_DIR}/bytecode"
8 "${JAVASCRIPTCORE_DIR}/bytecompiler"
9 "${JAVASCRIPTCORE_DIR}/heap"
10 "${JAVASCRIPTCORE_DIR}/debugger"
11 "${JAVASCRIPTCORE_DIR}/interpreter"
12 "${JAVASCRIPTCORE_DIR}/jit"
13 "${JAVASCRIPTCORE_DIR}/parser"
14 "${JAVASCRIPTCORE_DIR}/profiler"
15 "${JAVASCRIPTCORE_DIR}/runtime"
16 "${JAVASCRIPTCORE_DIR}/yarr"
17 "${WTF_INCLUDE_DIRECTORIES}"
21 SET(JavaScriptCore_SOURCES
23 API/JSCallbackConstructor.cpp
24 API/JSCallbackFunction.cpp
25 API/JSCallbackObject.cpp
29 API/JSProfilerPrivate.cpp
32 API/JSWeakObjectMapRefPrivate.cpp
33 API/OpaqueJSString.cpp
35 bytecode/CodeBlock.cpp
36 bytecode/JumpTable.cpp
38 bytecode/SamplingTool.cpp
39 bytecode/StructureStubInfo.cpp
41 bytecompiler/BytecodeGenerator.cpp
42 bytecompiler/NodesCodegen.cpp
47 heap/MachineStackMarker.cpp
50 heap/ConservativeRoots.cpp
54 debugger/DebuggerActivation.cpp
55 debugger/DebuggerCallFrame.cpp
57 interpreter/CallFrame.cpp
58 interpreter/Interpreter.cpp
59 interpreter/RegisterFile.cpp
61 jit/ExecutableAllocator.cpp
62 jit/JITArithmetic32_64.cpp
67 jit/JITOpcodes32_64.cpp
69 jit/JITPropertyAccess32_64.cpp
70 jit/JITPropertyAccess.cpp
72 jit/ThunkGenerators.cpp
78 parser/ParserArena.cpp
79 parser/SourceProviderCache.cpp
82 profiler/ProfileGenerator.cpp
83 profiler/ProfileNode.cpp
88 runtime/ArrayConstructor.cpp
89 runtime/ArrayPrototype.cpp
90 runtime/BooleanConstructor.cpp
91 runtime/BooleanObject.cpp
92 runtime/BooleanPrototype.cpp
94 runtime/CommonIdentifiers.cpp
95 runtime/Completion.cpp
96 runtime/ConstructData.cpp
97 runtime/DateConstructor.cpp
98 runtime/DateConversion.cpp
99 runtime/DateInstance.cpp
100 runtime/DatePrototype.cpp
102 runtime/ErrorConstructor.cpp
103 runtime/ErrorInstance.cpp
104 runtime/ErrorPrototype.cpp
105 runtime/ExceptionHelpers.cpp
106 runtime/Executable.cpp
107 runtime/FunctionConstructor.cpp
108 runtime/FunctionPrototype.cpp
109 runtime/GCActivityCallback.cpp
110 runtime/GetterSetter.cpp
111 runtime/Identifier.cpp
112 runtime/InitializeThreading.cpp
113 runtime/InternalFunction.cpp
114 runtime/JSActivation.cpp
115 runtime/JSAPIValueWrapper.cpp
117 runtime/JSByteArray.cpp
119 runtime/JSFunction.cpp
120 runtime/JSGlobalData.cpp
121 runtime/JSGlobalObject.cpp
122 runtime/JSGlobalObjectFunctions.cpp
124 runtime/JSNotAnObject.cpp
126 runtime/JSObjectWithGlobalObject.cpp
127 runtime/JSONObject.cpp
128 runtime/JSPropertyNameIterator.cpp
129 runtime/JSStaticScopeObject.cpp
132 runtime/JSVariableObject.cpp
133 runtime/JSWrapperObject.cpp
135 runtime/LiteralParser.cpp
137 runtime/MathObject.cpp
138 runtime/NativeErrorConstructor.cpp
139 runtime/NativeErrorPrototype.cpp
140 runtime/NumberConstructor.cpp
141 runtime/NumberObject.cpp
142 runtime/NumberPrototype.cpp
143 runtime/ObjectConstructor.cpp
144 runtime/ObjectPrototype.cpp
145 runtime/Operations.cpp
146 runtime/PropertyDescriptor.cpp
147 runtime/PropertyNameArray.cpp
148 runtime/PropertySlot.cpp
150 runtime/RegExpCache.cpp
151 runtime/RegExpConstructor.cpp
152 runtime/RegExpObject.cpp
153 runtime/RegExpPrototype.cpp
155 runtime/ScopeChain.cpp
156 runtime/SmallStrings.cpp
157 runtime/StrictEvalActivation.cpp
158 runtime/StringConstructor.cpp
159 runtime/StringObject.cpp
160 runtime/StringPrototype.cpp
161 runtime/StringRecursionChecker.cpp
162 runtime/Structure.cpp
163 runtime/StructureChain.cpp
164 runtime/TimeoutChecker.cpp
168 yarr/YarrInterpreter.cpp
170 yarr/YarrSyntaxChecker.cpp
173 wtf/PageAllocationAligned.cpp
176 SET(JavaScriptCore_HEADERS )
178 SET(JavaScriptCore_LUT_FILES
179 runtime/ArrayConstructor.cpp
180 runtime/ArrayPrototype.cpp
181 runtime/BooleanPrototype.cpp
182 runtime/DateConstructor.cpp
183 runtime/DatePrototype.cpp
184 runtime/ErrorPrototype.cpp
185 runtime/JSGlobalObject.cpp
186 runtime/JSONObject.cpp
187 runtime/MathObject.cpp
188 runtime/NumberConstructor.cpp
189 runtime/NumberPrototype.cpp
190 runtime/ObjectConstructor.cpp
191 runtime/ObjectPrototype.cpp
192 runtime/RegExpConstructor.cpp
193 runtime/RegExpObject.cpp
194 runtime/RegExpPrototype.cpp
195 runtime/StringConstructor.cpp
196 runtime/StringPrototype.cpp
199 SET(JavaScriptCore_LIBRARIES
204 # GENERATOR 1-A: LUT creator
205 FOREACH (_file ${JavaScriptCore_LUT_FILES})
206 GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
207 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
208 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
212 # GENERATOR 1-B: particular LUT creator (for 1 file only)
213 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
214 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
216 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
218 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
219 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
220 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
222 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
225 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
227 OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
228 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
229 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
231 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
234 LIST(APPEND JavaScriptCore_SOURCES
235 assembler/ARMAssembler.cpp
236 assembler/ARMv7Assembler.cpp
237 assembler/MacroAssemblerARM.cpp
239 ELSEIF (WTF_CPU_MIPS)
241 ELSEIF (WTF_CPU_X86_64)
243 MESSAGE(FATAL_ERROR "Unknown CPU")
247 INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/CMakeLists${PORT}.txt)
250 ADD_SUBDIRECTORY(wtf)
251 ADD_SUBDIRECTORY(shell)
253 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
254 INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
255 ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
256 ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
257 TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
259 IF (JavaScriptCore_LINK_FLAGS)
260 ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
264 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
265 INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION lib)