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}/debugger"
10 "${JAVASCRIPTCORE_DIR}/interpreter"
11 "${JAVASCRIPTCORE_DIR}/jit"
12 "${JAVASCRIPTCORE_DIR}/parser"
13 "${JAVASCRIPTCORE_DIR}/pcre"
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
45 debugger/DebuggerActivation.cpp
46 debugger/DebuggerCallFrame.cpp
48 interpreter/CallFrame.cpp
49 interpreter/Interpreter.cpp
50 interpreter/RegisterFile.cpp
52 jit/ExecutableAllocator.cpp
53 jit/JITArithmetic32_64.cpp
58 jit/JITOpcodes32_64.cpp
60 jit/JITPropertyAccess32_64.cpp
61 jit/JITPropertyAccess.cpp
63 jit/ThunkGenerators.cpp
69 parser/ParserArena.cpp
74 pcre/pcre_ucp_searchfuncs.cpp
78 profiler/ProfileGenerator.cpp
79 profiler/ProfileNode.cpp
84 runtime/ArrayConstructor.cpp
85 runtime/ArrayPrototype.cpp
86 runtime/BooleanConstructor.cpp
87 runtime/BooleanObject.cpp
88 runtime/BooleanPrototype.cpp
91 runtime/CommonIdentifiers.cpp
92 runtime/Completion.cpp
93 runtime/ConstructData.cpp
94 runtime/DateConstructor.cpp
95 runtime/DateConversion.cpp
96 runtime/DateInstance.cpp
97 runtime/DatePrototype.cpp
99 runtime/ErrorConstructor.cpp
100 runtime/ErrorInstance.cpp
101 runtime/ErrorPrototype.cpp
102 runtime/ExceptionHelpers.cpp
103 runtime/Executable.cpp
104 runtime/FunctionConstructor.cpp
105 runtime/FunctionPrototype.cpp
106 runtime/GCActivityCallback.cpp
108 runtime/GetterSetter.cpp
109 runtime/GlobalEvalFunction.cpp
110 runtime/Identifier.cpp
111 runtime/InitializeThreading.cpp
112 runtime/InternalFunction.cpp
113 runtime/JSActivation.cpp
114 runtime/JSAPIValueWrapper.cpp
116 runtime/JSByteArray.cpp
118 runtime/JSFunction.cpp
119 runtime/JSGlobalData.cpp
120 runtime/JSGlobalObject.cpp
121 runtime/JSGlobalObjectFunctions.cpp
122 runtime/JSImmediate.cpp
124 runtime/JSNotAnObject.cpp
125 runtime/JSNumberCell.cpp
127 runtime/JSObjectWithGlobalObject.cpp
128 runtime/JSONObject.cpp
129 runtime/JSPropertyNameIterator.cpp
130 runtime/JSStaticScopeObject.cpp
133 runtime/JSVariableObject.cpp
134 runtime/JSWrapperObject.cpp
136 runtime/LiteralParser.cpp
138 runtime/MarkStack.cpp
139 runtime/MathObject.cpp
140 runtime/NativeErrorConstructor.cpp
141 runtime/NativeErrorPrototype.cpp
142 runtime/NumberConstructor.cpp
143 runtime/NumberObject.cpp
144 runtime/NumberPrototype.cpp
145 runtime/ObjectConstructor.cpp
146 runtime/ObjectPrototype.cpp
147 runtime/Operations.cpp
148 runtime/PropertyDescriptor.cpp
149 runtime/PropertyNameArray.cpp
150 runtime/PropertySlot.cpp
151 runtime/PrototypeFunction.cpp
153 runtime/RegExpCache.cpp
154 runtime/RegExpConstructor.cpp
155 runtime/RegExpObject.cpp
156 runtime/RegExpPrototype.cpp
158 runtime/ScopeChain.cpp
159 runtime/SmallStrings.cpp
160 runtime/StrictEvalActivation.cpp
161 runtime/StringConstructor.cpp
162 runtime/StringObject.cpp
163 runtime/StringPrototype.cpp
164 runtime/Structure.cpp
165 runtime/StructureChain.cpp
166 runtime/TimeoutChecker.cpp
169 yarr/RegexCompiler.cpp
170 yarr/RegexInterpreter.cpp
174 wtf/PageAllocation.cpp
176 SET(JavaScriptCore_HEADERS )
178 SET(JavaScriptCore_LUT_FILES
179 runtime/ArrayPrototype.cpp
180 runtime/DatePrototype.cpp
181 runtime/JSONObject.cpp
182 runtime/MathObject.cpp
183 runtime/NumberConstructor.cpp
184 runtime/RegExpConstructor.cpp
185 runtime/RegExpObject.cpp
186 runtime/StringPrototype.cpp
189 SET(JavaScriptCore_LIBRARIES
194 # GENERATOR 1-A: LUT creator
195 FOREACH (_file ${JavaScriptCore_LUT_FILES})
196 GET_FILENAME_COMPONENT(_name ${_file} NAME_WE)
197 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
198 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/${_name}.lut.h)
202 # GENERATOR 1-B: particular LUT creator (for 1 file only)
203 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
204 LIST(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_DIR}/Lexer.lut.h)
206 # GENERATOR: "chartables.c": compile and execute the chartables generator (and add it to sources)
208 OUTPUT ${DERIVED_SOURCES_DIR}/chartables.c
209 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/pcre/dftables
210 COMMAND ${PERL_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/pcre/dftables --preprocessor "${CODE_GENERATOR_PREPROCESSOR}" ${DERIVED_SOURCES_DIR}/chartables.c
212 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/pcre/pcre_tables.cpp ${DERIVED_SOURCES_DIR}/chartables.c)
215 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
217 OUTPUT ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
218 MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
219 COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_DIR}/RegExpJitTables.h
221 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/RegexCompiler.cpp ${DERIVED_SOURCES_DIR}/RegExpJitTables.h)
226 LIST(APPEND JavaScriptCore_SOURCES
227 assembler/ARMAssembler.cpp
228 assembler/MacroAssemblerARM.cpp
230 ELSEIF (WTF_CPU_MIPS)
232 ELSEIF (WTF_CPU_X86_64)
234 MESSAGE(FATAL_ERROR "Unknown CPU")
238 INCLUDE_IF_EXISTS(${JAVASCRIPTCORE_DIR}/CMakeLists${PORT}.txt)
241 # Declare source groups for Visual Studio folders
242 SOURCE_GROUP(API "API/")
243 SOURCE_GROUP(assembler "assembler/")
244 SOURCE_GROUP(bytecode "bytecode/")
245 SOURCE_GROUP(bytecompiler "bytecompiler/")
246 SOURCE_GROUP(debugger "debugger/")
247 SOURCE_GROUP(bytecode "bytecode/")
248 SOURCE_GROUP(interpreter "interpreter/")
249 SOURCE_GROUP(jit "jit/")
250 SOURCE_GROUP(parser "parser/")
251 SOURCE_GROUP(pcre "pcre/")
252 SOURCE_GROUP(profiler "profiler/")
253 SOURCE_GROUP(runtime "runtime/")
254 SOURCE_GROUP(yarr "yarr/")
255 SOURCE_GROUP(wtf "wtf/")
257 ADD_SUBDIRECTORY(wtf)
258 ADD_SUBDIRECTORY(shell)
260 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
261 INCLUDE_DIRECTORIES(${JavaScriptCore_INCLUDE_DIRECTORIES})
262 ADD_DEFINITIONS(-DBUILDING_JavaScriptCore)
263 ADD_LIBRARY(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
264 TARGET_LINK_LIBRARIES(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
266 IF (JavaScriptCore_LINK_FLAGS)
267 ADD_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} LINK_FLAGS "${JavaScriptCore_LINK_FLAGS}")
271 SET_TARGET_PROPERTIES(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
272 INSTALL(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION lib)