Unreviewed, rolling out r144074.
[WebKit-https.git] / Source / JavaScriptCore / CMakeLists.txt
1 set(JavaScriptCore_INCLUDE_DIRECTORIES
2     "${CMAKE_BINARY_DIR}"
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}/dfg"
10     "${JAVASCRIPTCORE_DIR}/disassembler"
11     "${JAVASCRIPTCORE_DIR}/heap"
12     "${JAVASCRIPTCORE_DIR}/debugger"
13     "${JAVASCRIPTCORE_DIR}/interpreter"
14     "${JAVASCRIPTCORE_DIR}/jit"
15     "${JAVASCRIPTCORE_DIR}/llint"
16     "${JAVASCRIPTCORE_DIR}/parser"
17     "${JAVASCRIPTCORE_DIR}/profiler"
18     "${JAVASCRIPTCORE_DIR}/runtime"
19     "${JAVASCRIPTCORE_DIR}/tools"
20     "${JAVASCRIPTCORE_DIR}/yarr"
21     "${WTF_DIR}"
22     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
23     "${CMAKE_SOURCE_DIR}/Source"
24 )
25
26 set(JavaScriptCore_SOURCES
27     API/JSBase.cpp
28     API/JSCallbackConstructor.cpp
29     API/JSCallbackFunction.cpp
30     API/JSCallbackObject.cpp
31     API/JSClassRef.cpp
32     API/JSContextRef.cpp
33     API/JSObjectRef.cpp
34     API/JSProfilerPrivate.cpp
35     API/JSScriptRef.cpp
36     API/JSStringRef.cpp
37     API/JSValueRef.cpp
38     API/JSWeakObjectMapRefPrivate.cpp
39     API/OpaqueJSString.cpp
40
41     assembler/MacroAssembler.cpp
42     assembler/LinkBuffer.cpp
43
44     bytecode/ArrayAllocationProfile.cpp
45     bytecode/ArrayProfile.cpp
46     bytecode/CallLinkInfo.cpp
47     bytecode/CallLinkStatus.cpp
48     bytecode/CodeBlock.cpp
49     bytecode/CodeBlockHash.cpp
50     bytecode/CodeOrigin.cpp
51     bytecode/CodeType.cpp
52     bytecode/DFGExitProfile.cpp
53     bytecode/ExecutionCounter.cpp
54     bytecode/ExitKind.cpp
55     bytecode/GetByIdStatus.cpp
56     bytecode/JumpTable.cpp
57     bytecode/LazyOperandValueProfile.cpp
58     bytecode/MethodOfGettingAValueProfile.cpp
59     bytecode/Opcode.cpp
60     bytecode/PolymorphicPutByIdList.cpp
61     bytecode/PreciseJumpTargets.cpp
62     bytecode/PutByIdStatus.cpp
63     bytecode/SpeculatedType.cpp
64     bytecode/ReduceWhitespace.cpp
65     bytecode/ResolveGlobalStatus.cpp
66     bytecode/SamplingTool.cpp
67     bytecode/SpecialPointer.cpp
68     bytecode/StructureStubClearingWatchpoint.cpp
69     bytecode/StructureStubInfo.cpp
70     bytecode/UnlinkedCodeBlock.cpp
71     bytecode/Watchpoint.cpp
72
73     bytecompiler/BytecodeGenerator.cpp
74     bytecompiler/NodesCodegen.cpp
75
76     dfg/DFGAbstractState.cpp
77     dfg/DFGArgumentsSimplificationPhase.cpp
78     dfg/DFGArrayMode.cpp
79     dfg/DFGAssemblyHelpers.cpp
80     dfg/DFGByteCodeParser.cpp
81     dfg/DFGCapabilities.cpp
82     dfg/DFGCommon.cpp
83     dfg/DFGCFAPhase.cpp
84     dfg/DFGCFGSimplificationPhase.cpp
85     dfg/DFGCPSRethreadingPhase.cpp
86     dfg/DFGConstantFoldingPhase.cpp
87     dfg/DFGCSEPhase.cpp
88     dfg/DFGDisassembler.cpp
89     dfg/DFGDominators.cpp
90     dfg/DFGDriver.cpp
91     dfg/DFGEdge.cpp
92     dfg/DFGFixupPhase.cpp
93     dfg/DFGGraph.cpp
94     dfg/DFGJITCompiler.cpp
95     dfg/DFGLongLivedState.cpp
96     dfg/DFGMinifiedNode.cpp
97     dfg/DFGNode.cpp
98     dfg/DFGNodeFlags.cpp
99     dfg/DFGOSREntry.cpp
100     dfg/DFGOSRExit.cpp
101     dfg/DFGOSRExitCompiler.cpp
102     dfg/DFGOSRExitCompiler32_64.cpp
103     dfg/DFGOSRExitCompiler64.cpp
104     dfg/DFGOSRExitJumpPlaceholder.cpp
105     dfg/DFGOperations.cpp
106     dfg/DFGPhase.cpp
107     dfg/DFGPredictionPropagationPhase.cpp
108     dfg/DFGPredictionInjectionPhase.cpp
109     dfg/DFGRepatch.cpp
110     dfg/DFGSpeculativeJIT.cpp
111     dfg/DFGSpeculativeJIT32_64.cpp
112     dfg/DFGSpeculativeJIT64.cpp
113     dfg/DFGStructureCheckHoistingPhase.cpp
114     dfg/DFGThunks.cpp
115     dfg/DFGUnificationPhase.cpp
116     dfg/DFGUseKind.cpp
117     dfg/DFGValueSource.cpp
118     dfg/DFGVariableAccessDataDump.cpp
119     dfg/DFGVariableEvent.cpp
120     dfg/DFGVariableEventStream.cpp
121     dfg/DFGValidate.cpp
122     dfg/DFGVirtualRegisterAllocationPhase.cpp
123
124     disassembler/Disassembler.cpp
125
126     heap/BlockAllocator.cpp
127     heap/CopiedSpace.cpp
128     heap/CopyVisitor.cpp
129     heap/ConservativeRoots.cpp
130     heap/DFGCodeBlocks.cpp
131     heap/GCThread.cpp
132     heap/GCThreadSharedData.cpp
133     heap/HandleSet.cpp
134     heap/HandleStack.cpp
135     heap/Heap.cpp
136     heap/HeapStatistics.cpp
137     heap/HeapTimer.cpp
138     heap/IncrementalSweeper.cpp
139     heap/JITStubRoutineSet.cpp
140     heap/MachineStackMarker.cpp
141     heap/MarkedAllocator.cpp
142     heap/MarkedBlock.cpp
143     heap/MarkedSpace.cpp
144     heap/MarkStack.cpp
145     heap/SlotVisitor.cpp
146     heap/WeakSet.cpp
147     heap/WeakHandleOwner.cpp
148     heap/WeakBlock.cpp
149
150     debugger/Debugger.cpp
151     debugger/DebuggerActivation.cpp
152     debugger/DebuggerCallFrame.cpp
153
154     interpreter/AbstractPC.cpp
155     interpreter/CallFrame.cpp
156     interpreter/Interpreter.cpp
157     interpreter/JSStack.cpp
158     interpreter/VMInspector.cpp
159
160     jit/ClosureCallStubRoutine.cpp
161     jit/ExecutableAllocator.cpp
162     jit/HostCallReturnValue.cpp
163     jit/GCAwareJITStubRoutine.cpp
164     jit/JITArithmetic32_64.cpp
165     jit/JITArithmetic.cpp
166     jit/JITCall32_64.cpp
167     jit/JITCall.cpp
168     jit/JITCode.cpp
169     jit/JIT.cpp
170     jit/JITDisassembler.cpp
171     jit/JITExceptions.cpp
172     jit/JITOpcodes32_64.cpp
173     jit/JITOpcodes.cpp
174     jit/JITPropertyAccess32_64.cpp
175     jit/JITPropertyAccess.cpp
176     jit/JITStubRoutine.cpp
177     jit/JITStubs.cpp
178     jit/JITThunks.cpp
179     jit/JumpReplacementWatchpoint.cpp
180     jit/ThunkGenerators.cpp
181
182     parser/Lexer.cpp
183     parser/Nodes.cpp
184     parser/Parser.cpp
185     parser/ParserArena.cpp
186     parser/SourceProvider.cpp
187     parser/SourceProviderCache.cpp
188
189     profiler/ProfilerBytecode.cpp
190     profiler/ProfilerBytecodeSequence.cpp
191     profiler/ProfilerBytecodes.cpp
192     profiler/ProfilerCompilation.cpp
193     profiler/ProfilerCompilationKind.cpp
194     profiler/ProfilerCompiledBytecode.cpp
195     profiler/ProfilerDatabase.cpp
196     profiler/ProfilerOrigin.cpp
197     profiler/ProfilerOriginStack.cpp
198     profiler/ProfilerOSRExit.cpp
199     profiler/ProfilerOSRExitSite.cpp
200     profiler/ProfilerProfiledBytecodes.cpp
201     profiler/Profile.cpp
202     profiler/ProfileGenerator.cpp
203     profiler/ProfileNode.cpp
204     profiler/LegacyProfiler.cpp
205
206     runtime/ArgList.cpp
207     runtime/Arguments.cpp
208     runtime/ArrayConstructor.cpp
209     runtime/ArrayPrototype.cpp
210     runtime/BooleanConstructor.cpp
211     runtime/BooleanObject.cpp
212     runtime/BooleanPrototype.cpp
213     runtime/CallData.cpp
214     runtime/CodeCache.cpp
215     runtime/CodeSpecializationKind.cpp
216     runtime/CommonIdentifiers.cpp
217     runtime/Completion.cpp
218     runtime/ConstructData.cpp
219     runtime/DateConstructor.cpp
220     runtime/DateConversion.cpp
221     runtime/DateInstance.cpp
222     runtime/DatePrototype.cpp
223     runtime/Error.cpp
224     runtime/ErrorConstructor.cpp
225     runtime/ErrorInstance.cpp
226     runtime/ErrorPrototype.cpp
227     runtime/ExceptionHelpers.cpp
228     runtime/Executable.cpp
229     runtime/FunctionConstructor.cpp
230     runtime/FunctionExecutableDump.cpp
231     runtime/FunctionPrototype.cpp
232     runtime/GCActivityCallback.cpp
233     runtime/GetterSetter.cpp
234     runtime/Identifier.cpp
235     runtime/IndexingType.cpp
236     runtime/InitializeThreading.cpp
237     runtime/InternalFunction.cpp
238     runtime/JSActivation.cpp
239     runtime/JSAPIValueWrapper.cpp
240     runtime/JSArray.cpp
241     runtime/JSCell.cpp
242     runtime/JSDateMath.cpp
243     runtime/JSFunction.cpp
244     runtime/JSBoundFunction.cpp
245     runtime/JSGlobalData.cpp
246     runtime/JSGlobalObject.cpp
247     runtime/JSGlobalObjectFunctions.cpp
248     runtime/JSProxy.cpp
249     runtime/JSLock.cpp
250     runtime/JSNotAnObject.cpp
251     runtime/JSObject.cpp
252     runtime/JSONObject.cpp
253     runtime/JSPropertyNameIterator.cpp
254     runtime/JSSegmentedVariableObject.cpp
255     runtime/JSNameScope.cpp
256     runtime/JSWithScope.cpp
257     runtime/JSScope.cpp
258     runtime/JSString.cpp
259     runtime/JSStringJoiner.cpp
260     runtime/JSSymbolTableObject.cpp
261     runtime/JSCJSValue.cpp
262     runtime/JSVariableObject.cpp
263     runtime/JSWrapperObject.cpp
264     runtime/LiteralParser.cpp
265     runtime/Lookup.cpp
266     runtime/MathObject.cpp
267     runtime/MemoryStatistics.cpp
268     runtime/NameConstructor.cpp
269     runtime/NameInstance.cpp
270     runtime/NamePrototype.cpp
271     runtime/NativeErrorConstructor.cpp
272     runtime/NativeErrorPrototype.cpp
273     runtime/NumberConstructor.cpp
274     runtime/NumberObject.cpp
275     runtime/NumberPrototype.cpp
276     runtime/ObjectConstructor.cpp
277     runtime/ObjectPrototype.cpp
278     runtime/Operations.cpp
279     runtime/Options.cpp
280     runtime/PropertyDescriptor.cpp
281     runtime/PropertyNameArray.cpp
282     runtime/PropertySlot.cpp
283     runtime/PrototypeMap.cpp
284     runtime/RegExp.cpp
285     runtime/RegExpCache.cpp
286     runtime/RegExpConstructor.cpp
287     runtime/RegExpCachedResult.cpp
288     runtime/RegExpMatchesArray.cpp
289     runtime/RegExpObject.cpp
290     runtime/RegExpPrototype.cpp
291     runtime/SmallStrings.cpp
292     runtime/SparseArrayValueMap.cpp
293     runtime/StrictEvalActivation.cpp
294     runtime/StringConstructor.cpp
295     runtime/StringObject.cpp
296     runtime/StringPrototype.cpp
297     runtime/StringRecursionChecker.cpp
298     runtime/Structure.cpp
299     runtime/StructureRareData.cpp
300     runtime/StructureChain.cpp
301     runtime/SymbolTable.cpp
302     runtime/TimeoutChecker.cpp
303
304     tools/CodeProfile.cpp
305     tools/CodeProfiling.cpp
306
307     yarr/YarrCanonicalizeUCS2.cpp
308     yarr/YarrPattern.cpp
309     yarr/YarrInterpreter.cpp
310     yarr/YarrJIT.cpp
311     yarr/YarrSyntaxChecker.cpp
312 )
313
314 set(JavaScriptCore_LUT_FILES
315     runtime/ArrayConstructor.cpp
316     runtime/ArrayPrototype.cpp
317     runtime/BooleanPrototype.cpp
318     runtime/DateConstructor.cpp
319     runtime/DatePrototype.cpp
320     runtime/ErrorPrototype.cpp
321     runtime/JSGlobalObject.cpp
322     runtime/JSONObject.cpp
323     runtime/MathObject.cpp
324     runtime/NamePrototype.cpp
325     runtime/NumberConstructor.cpp
326     runtime/NumberPrototype.cpp
327     runtime/ObjectConstructor.cpp
328     runtime/ObjectPrototype.cpp
329     runtime/RegExpConstructor.cpp
330     runtime/RegExpObject.cpp
331     runtime/RegExpPrototype.cpp
332     runtime/StringConstructor.cpp
333     runtime/StringPrototype.cpp
334 )
335
336 set(JavaScriptCore_LIBRARIES
337     ${WTF_LIBRARY_NAME}
338 )
339
340 if (ENABLE_LLINT)
341     # We cannot check for RUBY_FOUND because it is set only when the full package is installed and
342     # the only thing we need is the interpreter. Unlike Python, cmake does not provide a macro
343     # for finding the only Ruby interpreter.
344     if (NOT RUBY_EXECUTABLE)
345         message(FATAL_ERROR "The Ruby interpreter is needed to generate LLInt files.")
346     endif ()
347
348     set(LLINT_ASM
349         llint/LowLevelInterpreter.asm
350         llint/LowLevelInterpreter32_64.asm
351         llint/LowLevelInterpreter64.asm
352     )
353
354     set(OFFLINE_ASM
355         offlineasm/armv7.rb
356         offlineasm/ast.rb
357         offlineasm/backends.rb
358         offlineasm/cloop.rb
359         offlineasm/config.rb
360         offlineasm/instructions.rb
361         offlineasm/offsets.rb
362         offlineasm/opt.rb
363         offlineasm/parser.rb
364         offlineasm/registers.rb
365         offlineasm/risc.rb
366         offlineasm/self_hash.rb
367         offlineasm/settings.rb
368         offlineasm/transform.rb
369         offlineasm/x86.rb
370     )
371
372     add_custom_command(
373         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
374         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
375         DEPENDS ${LLINT_ASM} ${OFFLINE_ASM}
376         COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
377         VERBATIM)
378
379     # We add the header file directly to the ADD_EXECUTABLE call instead of setting the
380     # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb may
381     # not regenerate it in case the hash it calculates does not change.
382     # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMAND above have
383     # changed the command will always be called because the mtime of LLIntDesiredOffsets.h will
384     # always be older than that of its dependencies.
385     # Additionally, setting the OBJECT_DEPENDS property will make LLIntDesiredOffsets.h a Makefile
386     # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
387     # actually be run twice!
388     add_executable(LLIntOffsetsExtractor
389         ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
390         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
391     )
392     target_link_libraries(LLIntOffsetsExtractor ${WTF_LIBRARY_NAME})
393
394     # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
395     # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
396     # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
397     # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
398     # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
399     # after every asm.rb run.
400     add_custom_command(
401         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
402         MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
403         DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM}
404         COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
405         COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
406         VERBATIM)
407
408     # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
409     # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
410     # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
411     # since it is used in the add_library() call at the end of this file.
412     list(APPEND JavaScriptCore_HEADERS
413         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
414     )
415     list(APPEND JavaScriptCore_SOURCES
416         llint/LLIntCLoop.cpp
417         llint/LLIntData.cpp
418         llint/LLIntEntrypoints.cpp
419         llint/LLIntExceptions.cpp
420         llint/LLIntSlowPaths.cpp
421         llint/LLIntThunks.cpp
422         llint/LowLevelInterpreter.cpp
423     )
424 endif ()
425
426 # GENERATOR 1-A: LUT creator
427 foreach (_file ${JavaScriptCore_LUT_FILES})
428     get_filename_component(_name ${_file} NAME_WE)
429     GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
430     list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
431 endforeach ()
432
433 set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
434     assembler
435     bytecode
436     collector/handles
437     debugger
438     heap
439     interpreter
440     jit
441     llint
442     parser
443     profiler
444     runtime
445     yarr
446 )
447
448 set(JavaScriptCore_FORWARDING_HEADERS_FILES
449     API/APICast.h
450     API/APIShims.h
451     API/JavaScript.h
452     API/JSBase.h
453     API/JSContextRef.h
454     API/JSContextRefPrivate.h
455     API/JSObjectRef.h
456     API/JSObjectRefPrivate.h
457     API/JSScriptRefPrivate.h
458     API/JSStringRef.h
459     API/JSStringRefCF.h
460     API/JSStringRefBSTR.h
461     API/JSValueRef.h
462     API/JavaScriptCore.h
463     API/JSRetainPtr.h
464     API/JSWeakObjectMapRefInternal.h
465     API/JSWeakObjectMapRefPrivate.h
466     API/JSRetainPtr.h
467     API/OpaqueJSString.h
468     API/WebKitAvailability.h
469 )
470
471
472 # GENERATOR 1-B: particular LUT creator (for 1 file only)
473 GENERATE_HASH_LUT(${JAVASCRIPTCORE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h MAIN_DEPENDENCY)
474 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
475
476 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
477 add_custom_command(
478     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
479     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/create_regex_tables
480     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
481     VERBATIM)
482 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
483
484
485 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
486 add_custom_command(
487     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
488     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py
489     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/KeywordLookupGenerator.py ${JAVASCRIPTCORE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
490     VERBATIM)
491 ADD_SOURCE_DEPENDENCIES(${JAVASCRIPTCORE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
492
493 if (WTF_CPU_ARM)
494     list(APPEND JavaScriptCore_SOURCES
495         assembler/ARMAssembler.cpp
496         assembler/ARMv7Assembler.cpp
497         assembler/MacroAssemblerARM.cpp
498     )
499 elseif (WTF_CPU_MIPS)
500 elseif (WTF_CPU_X86)
501 elseif (WTF_CPU_X86_64)
502 else ()
503     message(FATAL_ERROR "Unknown CPU")
504 endif ()
505
506
507 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
508
509 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
510
511
512 add_subdirectory(shell)
513
514 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
515 include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
516 add_definitions(-DBUILDING_JavaScriptCore)
517 add_library(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
518 target_link_libraries(${JavaScriptCore_LIBRARY_NAME} ${JavaScriptCore_LIBRARIES})
519 set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES FOLDER "JavaScriptCore")
520 set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES LINK_INTERFACE_LIBRARIES "")
521
522 if (SHARED_CORE)
523     set_target_properties(${JavaScriptCore_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
524     install(TARGETS ${JavaScriptCore_LIBRARY_NAME} DESTINATION "${LIB_INSTALL_DIR}")
525 endif ()