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