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