Unreviewed, fix CMake build. This got messed up when rebasing.
[WebKit-https.git] / Source / JavaScriptCore / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12)
2 include(WebKitCommon)
3
4 set(JavaScriptCore_INCLUDE_DIRECTORIES
5     "${CMAKE_BINARY_DIR}"
6     "${JAVASCRIPTCORE_DIR}"
7     "${JAVASCRIPTCORE_DIR}/.."
8     "${JAVASCRIPTCORE_DIR}/API"
9     "${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
10     "${JAVASCRIPTCORE_DIR}/assembler"
11     "${JAVASCRIPTCORE_DIR}/b3"
12     "${JAVASCRIPTCORE_DIR}/b3/air"
13     "${JAVASCRIPTCORE_DIR}/bindings"
14     "${JAVASCRIPTCORE_DIR}/builtins"
15     "${JAVASCRIPTCORE_DIR}/bytecode"
16     "${JAVASCRIPTCORE_DIR}/bytecompiler"
17     "${JAVASCRIPTCORE_DIR}/dfg"
18     "${JAVASCRIPTCORE_DIR}/disassembler"
19     "${JAVASCRIPTCORE_DIR}/disassembler/udis86"
20     "${JAVASCRIPTCORE_DIR}/ftl"
21     "${JAVASCRIPTCORE_DIR}/heap"
22     "${JAVASCRIPTCORE_DIR}/debugger"
23     "${JAVASCRIPTCORE_DIR}/inspector"
24     "${JAVASCRIPTCORE_DIR}/inspector/agents"
25     "${JAVASCRIPTCORE_DIR}/inspector/augmentable"
26     "${JAVASCRIPTCORE_DIR}/inspector/remote"
27     "${JAVASCRIPTCORE_DIR}/interpreter"
28     "${JAVASCRIPTCORE_DIR}/jit"
29     "${JAVASCRIPTCORE_DIR}/llint"
30     "${JAVASCRIPTCORE_DIR}/parser"
31     "${JAVASCRIPTCORE_DIR}/profiler"
32     "${JAVASCRIPTCORE_DIR}/replay"
33     "${JAVASCRIPTCORE_DIR}/runtime"
34     "${JAVASCRIPTCORE_DIR}/tools"
35     "${JAVASCRIPTCORE_DIR}/wasm"
36     "${JAVASCRIPTCORE_DIR}/yarr"
37     "${DERIVED_SOURCES_DIR}"
38     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
39     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
40     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector"
41 )
42
43 set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
44     "${ICU_INCLUDE_DIRS}"
45 )
46
47 set(JavaScriptCore_SOURCES
48     API/JSBase.cpp
49     API/JSCTestRunnerUtils.cpp
50     API/JSCallbackConstructor.cpp
51     API/JSCallbackFunction.cpp
52     API/JSCallbackObject.cpp
53     API/JSClassRef.cpp
54     API/JSContextRef.cpp
55     API/JSObjectRef.cpp
56     API/JSProfilerPrivate.cpp
57     API/JSScriptRef.cpp
58     API/JSStringRef.cpp
59     API/JSValueRef.cpp
60     API/JSWeakObjectMapRefPrivate.cpp
61     API/OpaqueJSString.cpp
62
63     assembler/ARMAssembler.cpp
64     assembler/LinkBuffer.cpp
65     assembler/MacroAssembler.cpp
66     assembler/MacroAssemblerARM.cpp
67     assembler/MacroAssemblerARMv7.cpp
68     assembler/MacroAssemblerPrinter.cpp
69     assembler/MacroAssemblerX86Common.cpp
70
71     b3/air/AirAllocateStack.cpp
72     b3/air/AirArg.cpp
73     b3/air/AirBasicBlock.cpp
74     b3/air/AirCCallSpecial.cpp
75     b3/air/AirCCallingConvention.cpp
76     b3/air/AirCode.cpp
77     b3/air/AirCustom.cpp
78     b3/air/AirEliminateDeadCode.cpp
79     b3/air/AirEmitShuffle.cpp
80     b3/air/AirFixObviousSpills.cpp
81     b3/air/AirFixPartialRegisterStalls.cpp
82     b3/air/AirGenerate.cpp
83     b3/air/AirGenerated.cpp
84     b3/air/AirHandleCalleeSaves.cpp
85     b3/air/AirInsertionSet.cpp
86     b3/air/AirInst.cpp
87     b3/air/AirIteratedRegisterCoalescing.cpp
88     b3/air/AirLogRegisterPressure.cpp
89     b3/air/AirLowerAfterRegAlloc.cpp
90     b3/air/AirLowerMacros.cpp
91     b3/air/AirOptimizeBlockOrder.cpp
92     b3/air/AirPhaseScope.cpp
93     b3/air/AirRegisterPriority.cpp
94     b3/air/AirReportUsedRegisters.cpp
95     b3/air/AirSimplifyCFG.cpp
96     b3/air/AirSpecial.cpp
97     b3/air/AirSpillEverything.cpp
98     b3/air/AirStackSlot.cpp
99     b3/air/AirStackSlotKind.cpp
100     b3/air/AirTmp.cpp
101     b3/air/AirTmpWidth.cpp
102     b3/air/AirValidate.cpp
103
104     b3/B3ArgumentRegValue.cpp
105     b3/B3BasicBlock.cpp
106     b3/B3BlockInsertionSet.cpp
107     b3/B3BreakCriticalEdges.cpp
108     b3/B3CCallValue.cpp
109     b3/B3CheckSpecial.cpp
110     b3/B3CheckValue.cpp
111     b3/B3Common.cpp
112     b3/B3Commutativity.cpp
113     b3/B3Compilation.cpp
114     b3/B3Const32Value.cpp
115     b3/B3Const64Value.cpp
116     b3/B3ConstDoubleValue.cpp
117     b3/B3ConstFloatValue.cpp
118     b3/B3ConstrainedValue.cpp
119     b3/B3ControlValue.cpp
120     b3/B3DataSection.cpp
121     b3/B3DuplicateTails.cpp
122     b3/B3Effects.cpp
123     b3/B3EliminateCommonSubexpressions.cpp
124     b3/B3FixSSA.cpp
125     b3/B3FoldPathConstants.cpp
126     b3/B3FrequencyClass.cpp
127     b3/B3Generate.cpp
128     b3/B3HeapRange.cpp
129     b3/B3InsertionSet.cpp
130     b3/B3LegalizeMemoryOffsets.cpp
131     b3/B3LowerMacros.cpp
132     b3/B3LowerMacrosAfterOptimizations.cpp
133     b3/B3LowerToAir.cpp
134     b3/B3MathExtras.cpp
135     b3/B3MemoryValue.cpp
136     b3/B3MoveConstants.cpp
137     b3/B3OpaqueByproducts.cpp
138     b3/B3Opcode.cpp
139     b3/B3Origin.cpp
140     b3/B3OriginDump.cpp
141     b3/B3PatchpointSpecial.cpp
142     b3/B3PatchpointValue.cpp
143     b3/B3PhaseScope.cpp
144     b3/B3PhiChildren.cpp
145     b3/B3Procedure.cpp
146     b3/B3PureCSE.cpp
147     b3/B3ReduceDoubleToFloat.cpp
148     b3/B3ReduceStrength.cpp
149     b3/B3SSACalculator.cpp
150     b3/B3SlotBaseValue.cpp
151     b3/B3StackmapGenerationParams.cpp
152     b3/B3StackmapSpecial.cpp
153     b3/B3StackmapValue.cpp
154     b3/B3StackSlot.cpp
155     b3/B3SwitchCase.cpp
156     b3/B3SwitchValue.cpp
157     b3/B3TimingScope.cpp
158     b3/B3Type.cpp
159     b3/B3UpsilonValue.cpp
160     b3/B3UseCounts.cpp
161     b3/B3Validate.cpp
162     b3/B3Value.cpp
163     b3/B3ValueKey.cpp
164     b3/B3ValueRep.cpp
165     b3/B3Variable.cpp
166     b3/B3VariableValue.cpp
167
168     bindings/ScriptFunctionCall.cpp
169     bindings/ScriptObject.cpp
170     bindings/ScriptValue.cpp
171
172     builtins/BuiltinExecutables.cpp
173
174     bytecode/AdaptiveInferredPropertyValueWatchpointBase.cpp
175     bytecode/ArrayAllocationProfile.cpp
176     bytecode/ArrayProfile.cpp
177     bytecode/BytecodeBasicBlock.cpp
178     bytecode/BytecodeIntrinsicRegistry.cpp
179     bytecode/BytecodeLivenessAnalysis.cpp
180     bytecode/CallEdge.cpp
181     bytecode/CallLinkInfo.cpp
182     bytecode/CallLinkStatus.cpp
183     bytecode/CallMode.cpp
184     bytecode/CallVariant.cpp
185     bytecode/CodeBlock.cpp
186     bytecode/CodeBlockHash.cpp
187     bytecode/CodeBlockJettisoningWatchpoint.cpp
188     bytecode/CodeOrigin.cpp
189     bytecode/CodeType.cpp
190     bytecode/ComplexGetStatus.cpp
191     bytecode/DataFormat.cpp
192     bytecode/DFGExitProfile.cpp
193     bytecode/DeferredCompilationCallback.cpp
194     bytecode/DeferredSourceDump.cpp
195     bytecode/ExecutionCounter.cpp
196     bytecode/ExitKind.cpp
197     bytecode/ExitingJITType.cpp
198     bytecode/GetByIdStatus.cpp
199     bytecode/GetByIdVariant.cpp
200     bytecode/InlineCallFrame.cpp
201     bytecode/InlineCallFrameSet.cpp
202     bytecode/JumpTable.cpp
203     bytecode/LazyOperandValueProfile.cpp
204     bytecode/MethodOfGettingAValueProfile.cpp
205     bytecode/ObjectPropertyCondition.cpp
206     bytecode/ObjectPropertyConditionSet.cpp
207     bytecode/Opcode.cpp
208     bytecode/PolymorphicAccess.cpp
209     bytecode/PreciseJumpTargets.cpp
210     bytecode/PropertyCondition.cpp
211     bytecode/PutByIdFlags.cpp
212     bytecode/PutByIdStatus.cpp
213     bytecode/PutByIdVariant.cpp
214     bytecode/ReduceWhitespace.cpp
215     bytecode/SamplingTool.cpp
216     bytecode/SpecialPointer.cpp
217     bytecode/SpeculatedType.cpp
218     bytecode/StructureSet.cpp
219     bytecode/StructureStubClearingWatchpoint.cpp
220     bytecode/StructureStubInfo.cpp
221     bytecode/ToThisStatus.cpp
222     bytecode/TrackedReferences.cpp
223     bytecode/UnlinkedCodeBlock.cpp
224     bytecode/UnlinkedFunctionExecutable.cpp
225     bytecode/UnlinkedInstructionStream.cpp
226     bytecode/ValueProfile.cpp
227     bytecode/ValueRecovery.cpp
228     bytecode/VariableWriteFireDetail.cpp
229     bytecode/VirtualRegister.cpp
230     bytecode/Watchpoint.cpp
231
232     bytecompiler/BytecodeGenerator.cpp
233     bytecompiler/NodesCodegen.cpp
234
235     debugger/Debugger.cpp
236     debugger/DebuggerCallFrame.cpp
237     debugger/DebuggerScope.cpp
238
239     dfg/DFGAbstractHeap.cpp
240     dfg/DFGAbstractValue.cpp
241     dfg/DFGAdaptiveInferredPropertyValueWatchpoint.cpp
242     dfg/DFGAdaptiveStructureWatchpoint.cpp
243     dfg/DFGArgumentsEliminationPhase.cpp
244     dfg/DFGArgumentsUtilities.cpp
245     dfg/DFGArithMode.cpp
246     dfg/DFGArrayMode.cpp
247     dfg/DFGAtTailAbstractState.cpp
248     dfg/DFGAvailability.cpp
249     dfg/DFGAvailabilityMap.cpp
250     dfg/DFGBackwardsPropagationPhase.cpp
251     dfg/DFGBasicBlock.cpp
252     dfg/DFGBlockInsertionSet.cpp
253     dfg/DFGBlockSet.cpp
254     dfg/DFGByteCodeParser.cpp
255     dfg/DFGCFAPhase.cpp
256     dfg/DFGCFGSimplificationPhase.cpp
257     dfg/DFGCPSRethreadingPhase.cpp
258     dfg/DFGCSEPhase.cpp
259     dfg/DFGCapabilities.cpp
260     dfg/DFGCleanUpPhase.cpp
261     dfg/DFGClobberSet.cpp
262     dfg/DFGClobberize.cpp
263     dfg/DFGClobbersExitState.cpp
264     dfg/DFGCombinedLiveness.cpp
265     dfg/DFGCommon.cpp
266     dfg/DFGCommonData.cpp
267     dfg/DFGCompilationKey.cpp
268     dfg/DFGCompilationMode.cpp
269     dfg/DFGConstantFoldingPhase.cpp
270     dfg/DFGConstantHoistingPhase.cpp
271     dfg/DFGCopyBarrierOptimizationPhase.cpp
272     dfg/DFGCriticalEdgeBreakingPhase.cpp
273     dfg/DFGDCEPhase.cpp
274     dfg/DFGDesiredIdentifiers.cpp
275     dfg/DFGDesiredTransitions.cpp
276     dfg/DFGDesiredWatchpoints.cpp
277     dfg/DFGDesiredWeakReferences.cpp
278     dfg/DFGDisassembler.cpp
279     dfg/DFGDoesGC.cpp
280     dfg/DFGDriver.cpp
281     dfg/DFGEdge.cpp
282     dfg/DFGEpoch.cpp
283     dfg/DFGFailedFinalizer.cpp
284     dfg/DFGFinalizer.cpp
285     dfg/DFGFixupPhase.cpp
286     dfg/DFGFlushFormat.cpp
287     dfg/DFGFlushedAt.cpp
288     dfg/DFGLiveCatchVariablePreservationPhase.cpp
289     dfg/DFGFrozenValue.cpp
290     dfg/DFGFunctionWhitelist.cpp
291     dfg/DFGGraph.cpp
292     dfg/DFGGraphSafepoint.cpp
293     dfg/DFGHeapLocation.cpp
294     dfg/DFGInPlaceAbstractState.cpp
295     dfg/DFGInferredTypeCheck.cpp
296     dfg/DFGInsertionSet.cpp
297     dfg/DFGIntegerCheckCombiningPhase.cpp
298     dfg/DFGIntegerRangeOptimizationPhase.cpp
299     dfg/DFGInvalidationPointInjectionPhase.cpp
300     dfg/DFGJITCode.cpp
301     dfg/DFGJITCompiler.cpp
302     dfg/DFGJITFinalizer.cpp
303     dfg/DFGJumpReplacement.cpp
304     dfg/DFGLICMPhase.cpp
305     dfg/DFGLazyJSValue.cpp
306     dfg/DFGLazyNode.cpp
307     dfg/DFGLivenessAnalysisPhase.cpp
308     dfg/DFGLongLivedState.cpp
309     dfg/DFGLoopPreHeaderCreationPhase.cpp
310     dfg/DFGMaximalFlushInsertionPhase.cpp
311     dfg/DFGMayExit.cpp
312     dfg/DFGMinifiedGraph.cpp
313     dfg/DFGMinifiedNode.cpp
314     dfg/DFGMovHintRemovalPhase.cpp
315     dfg/DFGMultiGetByOffsetData.cpp
316     dfg/DFGNaturalLoops.cpp
317     dfg/DFGNode.cpp
318     dfg/DFGNodeFlags.cpp
319     dfg/DFGNodeOrigin.cpp
320     dfg/DFGOSRAvailabilityAnalysisPhase.cpp
321     dfg/DFGOSREntry.cpp
322     dfg/DFGOSREntrypointCreationPhase.cpp
323     dfg/DFGOSRExit.cpp
324     dfg/DFGOSRExitBase.cpp
325     dfg/DFGOSRExitCompiler.cpp
326     dfg/DFGOSRExitCompiler32_64.cpp
327     dfg/DFGOSRExitCompiler64.cpp
328     dfg/DFGOSRExitCompilerCommon.cpp
329     dfg/DFGOSRExitFuzz.cpp
330     dfg/DFGOSRExitJumpPlaceholder.cpp
331     dfg/DFGOSRExitPreparation.cpp
332     dfg/DFGObjectAllocationSinkingPhase.cpp
333     dfg/DFGObjectMaterializationData.cpp
334     dfg/DFGOperations.cpp
335     dfg/DFGPhantomInsertionPhase.cpp
336     dfg/DFGPhase.cpp
337     dfg/DFGPhiChildren.cpp
338     dfg/DFGPlan.cpp
339     dfg/DFGPrePostNumbering.cpp
340     dfg/DFGPredictionInjectionPhase.cpp
341     dfg/DFGPredictionPropagationPhase.cpp
342     dfg/DFGPromotedHeapLocation.cpp
343     dfg/DFGPureValue.cpp
344     dfg/DFGPutStackSinkingPhase.cpp
345     dfg/DFGSSACalculator.cpp
346     dfg/DFGSSAConversionPhase.cpp
347     dfg/DFGSSALoweringPhase.cpp
348     dfg/DFGSafepoint.cpp
349     dfg/DFGSpeculativeJIT.cpp
350     dfg/DFGSpeculativeJIT32_64.cpp
351     dfg/DFGSpeculativeJIT64.cpp
352     dfg/DFGStackLayoutPhase.cpp
353     dfg/DFGStaticExecutionCountEstimationPhase.cpp
354     dfg/DFGStoreBarrierInsertionPhase.cpp
355     dfg/DFGStrengthReductionPhase.cpp
356     dfg/DFGStructureAbstractValue.cpp
357     dfg/DFGStructureRegistrationPhase.cpp
358     dfg/DFGThreadData.cpp
359     dfg/DFGThunks.cpp
360     dfg/DFGTierUpCheckInjectionPhase.cpp
361     dfg/DFGToFTLDeferredCompilationCallback.cpp
362     dfg/DFGToFTLForOSREntryDeferredCompilationCallback.cpp
363     dfg/DFGTransition.cpp
364     dfg/DFGTypeCheckHoistingPhase.cpp
365     dfg/DFGUnificationPhase.cpp
366     dfg/DFGUseKind.cpp
367     dfg/DFGValidate.cpp
368     dfg/DFGValueSource.cpp
369     dfg/DFGValueStrength.cpp
370     dfg/DFGVarargsForwardingPhase.cpp
371     dfg/DFGVariableAccessData.cpp
372     dfg/DFGVariableAccessDataDump.cpp
373     dfg/DFGVariableEvent.cpp
374     dfg/DFGVariableEventStream.cpp
375     dfg/DFGVirtualRegisterAllocationPhase.cpp
376     dfg/DFGWatchpointCollectionPhase.cpp
377     dfg/DFGWorklist.cpp
378
379     disassembler/ARM64Disassembler.cpp
380     disassembler/ARMv7Disassembler.cpp
381     disassembler/Disassembler.cpp
382     disassembler/UDis86Disassembler.cpp
383     disassembler/X86Disassembler.cpp
384
385     disassembler/ARM64/A64DOpcode.cpp
386
387     disassembler/ARMv7/ARMv7DOpcode.cpp
388
389     disassembler/udis86/udis86.c
390     disassembler/udis86/udis86_decode.c
391     disassembler/udis86/udis86_input.c
392     disassembler/udis86/udis86_itab_holder.c
393     disassembler/udis86/udis86_syn-att.c
394     disassembler/udis86/udis86_syn-intel.c
395     disassembler/udis86/udis86_syn.c
396
397     ftl/FTLAbstractHeap.cpp
398     ftl/FTLAbstractHeapRepository.cpp
399     ftl/FTLAvailableRecovery.cpp
400     ftl/FTLCapabilities.cpp
401     ftl/FTLCommonValues.cpp
402     ftl/FTLCompile.cpp
403     ftl/FTLExceptionTarget.cpp
404     ftl/FTLExitArgument.cpp
405     ftl/FTLExitArgumentForOperand.cpp
406     ftl/FTLExitPropertyValue.cpp
407     ftl/FTLExitTimeObjectMaterialization.cpp
408     ftl/FTLExitValue.cpp
409     ftl/FTLFail.cpp
410     ftl/FTLForOSREntryJITCode.cpp
411     ftl/FTLJITCode.cpp
412     ftl/FTLJITFinalizer.cpp
413     ftl/FTLLazySlowPath.cpp
414     ftl/FTLLink.cpp
415     ftl/FTLLocation.cpp
416     ftl/FTLLowerDFGToB3.cpp
417     ftl/FTLOSREntry.cpp
418     ftl/FTLOSRExit.cpp
419     ftl/FTLOSRExitCompiler.cpp
420     ftl/FTLOSRExitHandle.cpp
421     ftl/FTLOperations.cpp
422     ftl/FTLOutput.cpp
423     ftl/FTLPatchpointExceptionHandle.cpp
424     ftl/FTLRecoveryOpcode.cpp
425     ftl/FTLSaveRestore.cpp
426     ftl/FTLSlowPathCall.cpp
427     ftl/FTLSlowPathCallKey.cpp
428     ftl/FTLState.cpp
429     ftl/FTLThunks.cpp
430     ftl/FTLValueRange.cpp
431
432     heap/CodeBlockSet.cpp
433     heap/ConservativeRoots.cpp
434     heap/CopiedBlock.cpp
435     heap/CopiedSpace.cpp
436     heap/CopyVisitor.cpp
437     heap/DeferGC.cpp
438     heap/EdenGCActivityCallback.cpp
439     heap/FullGCActivityCallback.cpp
440     heap/GCActivityCallback.cpp
441     heap/GCLogging.cpp
442     heap/HandleSet.cpp
443     heap/HandleStack.cpp
444     heap/Heap.cpp
445     heap/HeapHelperPool.cpp
446     heap/HeapStatistics.cpp
447     heap/HeapTimer.cpp
448     heap/HeapVerifier.cpp
449     heap/IncrementalSweeper.cpp
450     heap/JITStubRoutineSet.cpp
451     heap/LiveObjectList.cpp
452     heap/MachineStackMarker.cpp
453     heap/MarkStack.cpp
454     heap/MarkedAllocator.cpp
455     heap/MarkedBlock.cpp
456     heap/MarkedSpace.cpp
457     heap/SlotVisitor.cpp
458     heap/Weak.cpp
459     heap/WeakBlock.cpp
460     heap/WeakHandleOwner.cpp
461     heap/WeakSet.cpp
462     heap/WriteBarrierBuffer.cpp
463     heap/WriteBarrierSupport.cpp
464
465     inspector/ConsoleMessage.cpp
466     inspector/ContentSearchUtilities.cpp
467     inspector/EventLoop.cpp
468     inspector/IdentifiersFactory.cpp
469     inspector/InjectedScript.cpp
470     inspector/InjectedScriptBase.cpp
471     inspector/InjectedScriptHost.cpp
472     inspector/InjectedScriptManager.cpp
473     inspector/InjectedScriptModule.cpp
474     inspector/InspectorAgentRegistry.cpp
475     inspector/InspectorFrontendRouter.cpp
476     inspector/InspectorBackendDispatcher.cpp
477     inspector/InspectorValues.cpp
478     inspector/JSGlobalObjectConsoleClient.cpp
479     inspector/JSGlobalObjectInspectorController.cpp
480     inspector/JSGlobalObjectScriptDebugServer.cpp
481     inspector/JSInjectedScriptHost.cpp
482     inspector/JSInjectedScriptHostPrototype.cpp
483     inspector/JSJavaScriptCallFrame.cpp
484     inspector/JSJavaScriptCallFramePrototype.cpp
485     inspector/JavaScriptCallFrame.cpp
486     inspector/PerGlobalObjectWrapperWorld.cpp
487     inspector/ScriptArguments.cpp
488     inspector/ScriptCallFrame.cpp
489     inspector/ScriptCallStack.cpp
490     inspector/ScriptCallStackFactory.cpp
491     inspector/ScriptDebugServer.cpp
492
493     inspector/agents/InspectorAgent.cpp
494     inspector/agents/InspectorConsoleAgent.cpp
495     inspector/agents/InspectorDebuggerAgent.cpp
496     inspector/agents/InspectorHeapAgent.cpp
497     inspector/agents/InspectorRuntimeAgent.cpp
498     inspector/agents/InspectorScriptProfilerAgent.cpp
499     inspector/agents/JSGlobalObjectConsoleAgent.cpp
500     inspector/agents/JSGlobalObjectDebuggerAgent.cpp
501     inspector/agents/JSGlobalObjectRuntimeAgent.cpp
502
503     interpreter/AbstractPC.cpp
504     interpreter/CallFrame.cpp
505     interpreter/Interpreter.cpp
506     interpreter/JSStack.cpp
507     interpreter/ProtoCallFrame.cpp
508     interpreter/StackVisitor.cpp
509
510     jit/AssemblyHelpers.cpp
511     jit/BinarySwitch.cpp
512     jit/CachedRecovery.cpp
513     jit/CallFrameShuffleData.cpp
514     jit/CallFrameShuffler.cpp
515     jit/CallFrameShuffler32_64.cpp
516     jit/CallFrameShuffler64.cpp
517     jit/ExecutableAllocationFuzz.cpp
518     jit/ExecutableAllocator.cpp
519     jit/ExecutableAllocatorFixedVMPool.cpp
520     jit/GCAwareJITStubRoutine.cpp
521     jit/GPRInfo.cpp
522     jit/HostCallReturnValue.cpp
523     jit/IntrinsicEmitter.cpp
524     jit/JIT.cpp
525     jit/JITAddGenerator.cpp
526     jit/JITArithmetic.cpp
527     jit/JITArithmetic32_64.cpp
528     jit/JITBitAndGenerator.cpp
529     jit/JITBitOrGenerator.cpp
530     jit/JITBitXorGenerator.cpp
531     jit/JITCall.cpp
532     jit/JITCall32_64.cpp
533     jit/JITCode.cpp
534     jit/JITDisassembler.cpp
535     jit/JITDivGenerator.cpp
536     jit/JITExceptions.cpp
537     jit/JITInlineCacheGenerator.cpp
538     jit/JITLeftShiftGenerator.cpp
539     jit/JITMulGenerator.cpp
540     jit/JITNegGenerator.cpp
541     jit/JITOpcodes.cpp
542     jit/JITOpcodes32_64.cpp
543     jit/JITOperations.cpp
544     jit/JITPropertyAccess.cpp
545     jit/JITPropertyAccess32_64.cpp
546     jit/JITRightShiftGenerator.cpp
547     jit/JITStubRoutine.cpp
548     jit/JITSubGenerator.cpp
549     jit/JITThunks.cpp
550     jit/JITToDFGDeferredCompilationCallback.cpp
551     jit/PCToCodeOriginMap.cpp
552     jit/PolymorphicCallStubRoutine.cpp
553     jit/Reg.cpp
554     jit/RegisterAtOffset.cpp
555     jit/RegisterAtOffsetList.cpp
556     jit/RegisterSet.cpp
557     jit/Repatch.cpp
558     jit/ScratchRegisterAllocator.cpp
559     jit/SetupVarargsFrame.cpp
560     jit/TempRegisterSet.cpp
561     jit/ThunkGenerators.cpp
562
563     llint/LLIntCLoop.cpp
564     llint/LLIntData.cpp
565     llint/LLIntEntrypoint.cpp
566     llint/LLIntExceptions.cpp
567     llint/LLIntSlowPaths.cpp
568     llint/LLIntThunks.cpp
569     llint/LowLevelInterpreter.cpp
570
571     parser/Lexer.cpp
572     parser/ModuleAnalyzer.cpp
573     parser/Nodes.cpp
574     parser/NodesAnalyzeModule.cpp
575     parser/Parser.cpp
576     parser/ParserArena.cpp
577     parser/SourceCode.cpp
578     parser/SourceProvider.cpp
579     parser/SourceProviderCache.cpp
580     parser/VariableEnvironment.cpp
581
582     profiler/LegacyProfiler.cpp
583     profiler/Profile.cpp
584     profiler/ProfileGenerator.cpp
585     profiler/ProfileNode.cpp
586     profiler/ProfilerBytecode.cpp
587     profiler/ProfilerBytecodeSequence.cpp
588     profiler/ProfilerBytecodes.cpp
589     profiler/ProfilerCompilation.cpp
590     profiler/ProfilerCompilationKind.cpp
591     profiler/ProfilerCompiledBytecode.cpp
592     profiler/ProfilerDatabase.cpp
593     profiler/ProfilerJettisonReason.cpp
594     profiler/ProfilerOSRExit.cpp
595     profiler/ProfilerOSRExitSite.cpp
596     profiler/ProfilerOrigin.cpp
597     profiler/ProfilerOriginStack.cpp
598     profiler/ProfilerProfiledBytecodes.cpp
599
600     runtime/ArgList.cpp
601     runtime/ArrayBuffer.cpp
602     runtime/ArrayBufferNeuteringWatchpoint.cpp
603     runtime/ArrayBufferView.cpp
604     runtime/ArrayConstructor.cpp
605     runtime/ArrayIteratorPrototype.cpp
606     runtime/ArrayPrototype.cpp
607     runtime/BasicBlockLocation.cpp
608     runtime/BooleanConstructor.cpp
609     runtime/BooleanObject.cpp
610     runtime/BooleanPrototype.cpp
611     runtime/CallData.cpp
612     runtime/ClonedArguments.cpp
613     runtime/CodeCache.cpp
614     runtime/CodeSpecializationKind.cpp
615     runtime/CommonIdentifiers.cpp
616     runtime/CommonSlowPaths.cpp
617     runtime/CommonSlowPathsExceptions.cpp
618     runtime/CompilationResult.cpp
619     runtime/Completion.cpp
620     runtime/ConsoleClient.cpp
621     runtime/ConsolePrototype.cpp
622     runtime/ConstantMode.cpp
623     runtime/ConstructData.cpp
624     runtime/ControlFlowProfiler.cpp
625     runtime/CustomGetterSetter.cpp
626     runtime/DataView.cpp
627     runtime/DateConstructor.cpp
628     runtime/DateConversion.cpp
629     runtime/DateInstance.cpp
630     runtime/DatePrototype.cpp
631     runtime/DirectArguments.cpp
632     runtime/DirectArgumentsOffset.cpp
633     runtime/DumpContext.cpp
634     runtime/Error.cpp
635     runtime/ErrorConstructor.cpp
636     runtime/ErrorHandlingScope.cpp
637     runtime/ErrorInstance.cpp
638     runtime/ErrorPrototype.cpp
639     runtime/Exception.cpp
640     runtime/ExceptionFuzz.cpp
641     runtime/ExceptionHelpers.cpp
642     runtime/Executable.cpp
643     runtime/FunctionConstructor.cpp
644     runtime/FunctionExecutableDump.cpp
645     runtime/FunctionHasExecutedCache.cpp
646     runtime/FunctionPrototype.cpp
647     runtime/FunctionRareData.cpp
648     runtime/GeneratorFrame.cpp
649     runtime/GeneratorFunctionConstructor.cpp
650     runtime/GeneratorFunctionPrototype.cpp
651     runtime/GeneratorPrototype.cpp
652     runtime/GetterSetter.cpp
653     runtime/Identifier.cpp
654     runtime/IndexingType.cpp
655     runtime/InferredType.cpp
656     runtime/InferredTypeTable.cpp
657     runtime/InferredValue.cpp
658     runtime/InitializeThreading.cpp
659     runtime/InspectorInstrumentationObject.cpp
660     runtime/InternalFunction.cpp
661     runtime/IntlCollator.cpp
662     runtime/IntlCollatorConstructor.cpp
663     runtime/IntlCollatorPrototype.cpp
664     runtime/IntlDateTimeFormat.cpp
665     runtime/IntlDateTimeFormatConstructor.cpp
666     runtime/IntlDateTimeFormatPrototype.cpp
667     runtime/IntlNumberFormat.cpp
668     runtime/IntlNumberFormatConstructor.cpp
669     runtime/IntlNumberFormatPrototype.cpp
670     runtime/IntlObject.cpp
671     runtime/IteratorOperations.cpp
672     runtime/IteratorPrototype.cpp
673     runtime/JSAPIValueWrapper.cpp
674     runtime/JSArray.cpp
675     runtime/JSArrayBuffer.cpp
676     runtime/JSArrayBufferConstructor.cpp
677     runtime/JSArrayBufferPrototype.cpp
678     runtime/JSArrayBufferView.cpp
679     runtime/JSArrayIterator.cpp
680     runtime/JSBoundFunction.cpp
681     runtime/JSBoundSlotBaseFunction.cpp
682     runtime/JSCJSValue.cpp
683     runtime/JSCallee.cpp
684     runtime/JSCell.cpp
685     runtime/JSConsole.cpp
686     runtime/JSDataView.cpp
687     runtime/JSDataViewPrototype.cpp
688     runtime/JSDateMath.cpp
689     runtime/JSEnvironmentRecord.cpp
690     runtime/JSFunction.cpp
691     runtime/JSGeneratorFunction.cpp
692     runtime/JSGlobalLexicalEnvironment.cpp
693     runtime/JSGlobalObject.cpp
694     runtime/JSGlobalObjectDebuggable.cpp
695     runtime/JSGlobalObjectFunctions.cpp
696     runtime/JSInternalPromise.cpp
697     runtime/JSInternalPromiseConstructor.cpp
698     runtime/JSInternalPromiseDeferred.cpp
699     runtime/JSInternalPromisePrototype.cpp
700     runtime/JSJob.cpp
701     runtime/JSLexicalEnvironment.cpp
702     runtime/JSLock.cpp
703     runtime/JSMap.cpp
704     runtime/JSMapIterator.cpp
705     runtime/JSModuleEnvironment.cpp
706     runtime/JSModuleNamespaceObject.cpp
707     runtime/JSModuleRecord.cpp
708     runtime/JSNativeStdFunction.cpp
709     runtime/JSNotAnObject.cpp
710     runtime/JSONObject.cpp
711     runtime/JSObject.cpp
712     runtime/JSPromise.cpp
713     runtime/JSPromiseConstructor.cpp
714     runtime/JSPromiseDeferred.cpp
715     runtime/JSPromisePrototype.cpp
716     runtime/JSPropertyNameEnumerator.cpp
717     runtime/JSPropertyNameIterator.cpp
718     runtime/JSProxy.cpp
719     runtime/JSScope.cpp
720     runtime/JSSegmentedVariableObject.cpp
721     runtime/JSSet.cpp
722     runtime/JSSetIterator.cpp
723     runtime/JSString.cpp
724     runtime/JSStringIterator.cpp
725     runtime/JSStringJoiner.cpp
726     runtime/JSSymbolTableObject.cpp
727     runtime/JSTemplateRegistryKey.cpp
728     runtime/JSTypedArrayConstructors.cpp
729     runtime/JSTypedArrayPrototypes.cpp
730     runtime/JSTypedArrayViewConstructor.cpp
731     runtime/JSTypedArrayViewPrototype.cpp
732     runtime/JSTypedArrays.cpp
733     runtime/JSWeakMap.cpp
734     runtime/JSWeakSet.cpp
735     runtime/JSWithScope.cpp
736     runtime/JSWrapperObject.cpp
737     runtime/LiteralParser.cpp
738     runtime/Lookup.cpp
739     runtime/MapConstructor.cpp
740     runtime/MapIteratorPrototype.cpp
741     runtime/MapPrototype.cpp
742     runtime/MathCommon.cpp
743     runtime/MathObject.cpp
744     runtime/MemoryStatistics.cpp
745     runtime/ModuleLoaderObject.cpp
746     runtime/NativeErrorConstructor.cpp
747     runtime/NativeErrorPrototype.cpp
748     runtime/NativeStdFunctionCell.cpp
749     runtime/NullGetterFunction.cpp
750     runtime/NullSetterFunction.cpp
751     runtime/NumberConstructor.cpp
752     runtime/NumberObject.cpp
753     runtime/NumberPrototype.cpp
754     runtime/ObjectConstructor.cpp
755     runtime/ObjectPrototype.cpp
756     runtime/Operations.cpp
757     runtime/Options.cpp
758     runtime/PropertyDescriptor.cpp
759     runtime/PropertySlot.cpp
760     runtime/PropertyTable.cpp
761     runtime/PrototypeMap.cpp
762     runtime/ProxyConstructor.cpp
763     runtime/ProxyObject.cpp
764     runtime/ReflectObject.cpp
765     runtime/RegExp.cpp
766     runtime/RegExpCache.cpp
767     runtime/RegExpCachedResult.cpp
768     runtime/RegExpConstructor.cpp
769     runtime/RegExpMatchesArray.cpp
770     runtime/RegExpObject.cpp
771     runtime/RegExpPrototype.cpp
772     runtime/RuntimeType.cpp
773     runtime/SamplingCounter.cpp
774     runtime/SamplingProfiler.cpp
775     runtime/ScopeOffset.cpp
776     runtime/ScopedArguments.cpp
777     runtime/ScopedArgumentsTable.cpp
778     runtime/SetConstructor.cpp
779     runtime/SetIteratorPrototype.cpp
780     runtime/SetPrototype.cpp
781     runtime/SimpleTypedArrayController.cpp
782     runtime/SmallStrings.cpp
783     runtime/SparseArrayValueMap.cpp
784     runtime/StrictEvalActivation.cpp
785     runtime/StringConstructor.cpp
786     runtime/StringIteratorPrototype.cpp
787     runtime/StringObject.cpp
788     runtime/StringPrototype.cpp
789     runtime/StringRecursionChecker.cpp
790     runtime/Structure.cpp
791     runtime/StructureChain.cpp
792     runtime/StructureIDTable.cpp
793     runtime/StructureRareData.cpp
794     runtime/Symbol.cpp
795     runtime/SymbolConstructor.cpp
796     runtime/SymbolObject.cpp
797     runtime/SymbolPrototype.cpp
798     runtime/SymbolTable.cpp
799     runtime/TemplateRegistry.cpp
800     runtime/TestRunnerUtils.cpp
801     runtime/TypeLocationCache.cpp
802     runtime/TypeProfiler.cpp
803     runtime/TypeProfilerLog.cpp
804     runtime/TypeSet.cpp
805     runtime/TypedArrayController.cpp
806     runtime/TypedArrayType.cpp
807     runtime/TypeofType.cpp
808     runtime/VM.cpp
809     runtime/VMEntryScope.cpp
810     runtime/VarOffset.cpp
811     runtime/Watchdog.cpp
812     runtime/WeakMapConstructor.cpp
813     runtime/WeakMapData.cpp
814     runtime/WeakMapPrototype.cpp
815     runtime/WeakSetConstructor.cpp
816     runtime/WeakSetPrototype.cpp
817
818     tools/CodeProfile.cpp
819     tools/CodeProfiling.cpp
820     tools/FunctionOverrides.cpp
821     tools/JSDollarVM.cpp
822     tools/JSDollarVMPrototype.cpp
823
824     wasm/JSWASMModule.cpp
825     wasm/WASMFunctionParser.cpp
826     wasm/WASMModuleParser.cpp
827     wasm/WASMReader.cpp
828
829     yarr/RegularExpression.cpp
830     yarr/YarrCanonicalizeUCS2.cpp
831     yarr/YarrInterpreter.cpp
832     yarr/YarrJIT.cpp
833     yarr/YarrPattern.cpp
834     yarr/YarrSyntaxChecker.cpp
835 )
836
837 set(JavaScriptCore_OBJECT_LUT_SOURCES
838     runtime/ArrayConstructor.cpp
839     runtime/ArrayIteratorPrototype.cpp
840     runtime/BooleanPrototype.cpp
841     runtime/DateConstructor.cpp
842     runtime/DatePrototype.cpp
843     runtime/ErrorPrototype.cpp
844     runtime/GeneratorPrototype.cpp
845     runtime/InspectorInstrumentationObject.cpp
846     runtime/IntlCollatorConstructor.cpp
847     runtime/IntlCollatorPrototype.cpp
848     runtime/IntlDateTimeFormatConstructor.cpp
849     runtime/IntlDateTimeFormatPrototype.cpp
850     runtime/IntlNumberFormatConstructor.cpp
851     runtime/IntlNumberFormatPrototype.cpp
852     runtime/JSDataViewPrototype.cpp
853     runtime/JSGlobalObject.cpp
854     runtime/JSInternalPromiseConstructor.cpp
855     runtime/JSONObject.cpp
856     runtime/JSPromiseConstructor.cpp
857     runtime/JSPromisePrototype.cpp
858     runtime/MapPrototype.cpp
859     runtime/ModuleLoaderObject.cpp
860     runtime/NumberConstructor.cpp
861     runtime/NumberPrototype.cpp
862     runtime/ObjectConstructor.cpp
863     runtime/ReflectObject.cpp
864     runtime/RegExpConstructor.cpp
865     runtime/RegExpPrototype.cpp
866     runtime/SetPrototype.cpp
867     runtime/StringConstructor.cpp
868     runtime/StringIteratorPrototype.cpp
869     runtime/StringPrototype.cpp
870     runtime/SymbolConstructor.cpp
871     runtime/SymbolPrototype.cpp
872 )
873
874 set(JavaScriptCore_LIBRARIES
875     WTF${DEBUG_SUFFIX}
876     ${ICU_I18N_LIBRARIES}
877 )
878
879 set(JavaScriptCore_SCRIPTS_SOURCES_DIR "${JAVASCRIPTCORE_DIR}/Scripts")
880
881 # Globbing relies on the fact that generator-specific file names are prefixed with their directory.
882 # Top-level scripts should have a file extension, since they are invoked during the build.
883
884 set(JavaScriptCore_SCRIPTS_SOURCES_PATHS
885     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.pl
886     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/*.py
887     ${JavaScriptCore_SCRIPTS_SOURCES_DIR}/builtins/builtins*.py
888 )
889
890 # Force JavaScriptCore to run scripts from the same staging path as WebCore.
891 set(JavaScriptCore_SCRIPTS_DIR "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/Scripts")
892
893 file(MAKE_DIRECTORY ${JavaScriptCore_SCRIPTS_DIR})
894
895 # The directory flattening performed below mirrors what the Mac port does with private headers.
896
897 file(GLOB JavaScriptCore_SCRIPTS_SOURCES ${JavaScriptCore_SCRIPTS_SOURCES_PATHS})
898
899 foreach (_file ${JavaScriptCore_SCRIPTS_SOURCES})
900     get_filename_component(_script "${_file}" NAME)
901     add_custom_command(
902         OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
903         MAIN_DEPENDENCY ${_file}
904         WORKING_DIRECTORY ${DERIVED_SOURCES_DIR}
905         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} ${JavaScriptCore_SCRIPTS_DIR}/${_script}
906         VERBATIM)
907     list(APPEND JavaScriptCore_SCRIPTS ${JavaScriptCore_SCRIPTS_DIR}/${_script})
908 endforeach ()
909
910 set(UDIS_GEN_DEP
911     disassembler/udis86/ud_opcode.py
912     disassembler/udis86/ud_optable.py
913 )
914
915 add_custom_command(
916     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.c ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
917     DEPENDS ${UDIS_GEN_DEP}
918     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
919     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/disassembler/udis86/itab.py ${JAVASCRIPTCORE_DIR}/disassembler/udis86/optable.xml
920     VERBATIM)
921
922 list(APPEND JavaScriptCore_HEADERS
923     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/udis86_itab.h
924 )
925
926 set(LLINT_ASM
927     llint/LowLevelInterpreter.asm
928     llint/LowLevelInterpreter32_64.asm
929     llint/LowLevelInterpreter64.asm
930 )
931
932 set(OFFLINE_ASM
933     offlineasm/arm.rb
934     offlineasm/arm64.rb
935     offlineasm/ast.rb
936     offlineasm/backends.rb
937     offlineasm/cloop.rb
938     offlineasm/config.rb
939     offlineasm/instructions.rb
940     offlineasm/mips.rb
941     offlineasm/offsets.rb
942     offlineasm/opt.rb
943     offlineasm/parser.rb
944     offlineasm/registers.rb
945     offlineasm/risc.rb
946     offlineasm/self_hash.rb
947     offlineasm/settings.rb
948     offlineasm/sh4.rb
949     offlineasm/transform.rb
950     offlineasm/x86.rb
951 )
952
953 add_custom_command(
954     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
955     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/generate-bytecode-files
956     DEPENDS ${JAVASCRIPTCORE_DIR}/generate-bytecode-files bytecode/BytecodeList.json
957     COMMAND ${PYTHON_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/generate-bytecode-files --bytecodes_h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h --init_bytecodes_asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm ${JAVASCRIPTCORE_DIR}/bytecode/BytecodeList.json
958     VERBATIM)
959
960 add_custom_command(
961     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
962     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb
963     DEPENDS ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
964     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/generate_offset_extractor.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h
965     VERBATIM)
966
967 # We add the header files directly to the ADD_EXECUTABLE call instead of setting the
968 # OBJECT_DEPENDS property in LLIntOffsetsExtractor.cpp because generate_offset_extractor.rb and
969 # generate-bytecode-files may not regenerate the .h files in case the hash it calculates does not change.
970 # In this case, if some of the dependencies specified in the ADD_CUSTOM_COMMANDs above have
971 # changed the command will always be called because the mtime of the .h files will
972 # always be older than that of their dependencies.
973 # Additionally, setting the OBJECT_DEPENDS property will make the .h files a Makefile
974 # dependency of both LLIntOffsetsExtractor and LLIntOffsetsExtractor.cpp, so the command will
975 # actually be run multiple times!
976 add_executable(LLIntOffsetsExtractor
977     ${JAVASCRIPTCORE_DIR}/llint/LLIntOffsetsExtractor.cpp
978     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntDesiredOffsets.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Bytecodes.h
979 )
980 target_link_libraries(LLIntOffsetsExtractor WTF)
981
982 # The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
983 # LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
984 # that generates a checksum of the LLIntOffsetsExtractor binary, if the checksum of the new
985 # LLIntOffsetsExtractor matches, no output is generated. To make this target consistent and avoid
986 # running this command for every build, we artificially update LLIntAssembly.h's mtime (using touch)
987 # after every asm.rb run.
988 if (MSVC)
989     set(LLIntOutput LowLevelInterpreterWin.asm)
990 else ()
991     set(LLIntOutput LLIntAssembly.h)
992 endif ()
993
994 add_custom_command(
995     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
996     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb
997     DEPENDS LLIntOffsetsExtractor ${LLINT_ASM} ${OFFLINE_ASM} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InitBytecodes.asm
998     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/offlineasm/asm.rb -I${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ ${JAVASCRIPTCORE_DIR}/llint/LowLevelInterpreter.asm $<TARGET_FILE:LLIntOffsetsExtractor> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
999     COMMAND ${CMAKE_COMMAND} -E touch_nocreate ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${LLIntOutput}
1000     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1001     VERBATIM)
1002
1003 # The explanation for not making LLIntAssembly.h part of the OBJECT_DEPENDS property of some of
1004 # the .cpp files below is similar to the one in the previous comment. However, since these .cpp
1005 # files are used to build JavaScriptCore itself, we can just add LLIntAssembly.h to JSC_HEADERS
1006 # since it is used in the add_library() call at the end of this file.
1007 if (MSVC)
1008     enable_language(ASM_MASM)
1009     list(APPEND JavaScriptCore_SOURCES
1010         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1011     )
1012     # Win32 needs /safeseh with assembly, but Win64 does not.
1013     if (CMAKE_SIZEOF_VOID_P EQUAL 4)
1014         set_source_files_properties(${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LowLevelInterpreterWin.asm
1015             PROPERTIES COMPILE_FLAGS  "/safeseh"
1016         )
1017     endif ()
1018 else ()
1019     list(APPEND JavaScriptCore_HEADERS
1020         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/LLIntAssembly.h
1021     )
1022 endif ()
1023
1024 set(HASH_LUT_GENERATOR ${CMAKE_CURRENT_SOURCE_DIR}/create_hash_table)
1025 macro(GENERATE_HASH_LUT _input _output)
1026     add_custom_command(
1027         OUTPUT ${_output}
1028         MAIN_DEPENDENCY ${HASH_LUT_GENERATOR}
1029         DEPENDS ${_input}
1030         COMMAND ${PERL_EXECUTABLE} ${HASH_LUT_GENERATOR} ${_input} > ${_output}
1031         VERBATIM)
1032     list(APPEND JavaScriptCore_HEADERS ${_output})
1033     ADD_SOURCE_DEPENDENCIES(${_input} ${_output})
1034 endmacro()
1035
1036 # GENERATOR 1-A: LUT creator
1037
1038 foreach (_file ${JavaScriptCore_OBJECT_LUT_SOURCES})
1039     get_filename_component(_name ${_file} NAME_WE)
1040     GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/${_file} ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/${_name}.lut.h)
1041 endforeach ()
1042
1043 set(JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES
1044     API
1045     assembler
1046     bindings
1047     builtins
1048     bytecode
1049     debugger
1050     dfg
1051     disassembler
1052     heap
1053     inspector
1054     interpreter
1055     jit
1056     llint
1057     parser
1058     profiler
1059     replay
1060     runtime
1061     yarr
1062
1063     collector/handles
1064
1065     inspector/agents
1066     inspector/augmentable
1067     inspector/remote
1068 )
1069
1070 # GENERATOR 1-B: particular LUT creator (for 1 file only)
1071 GENERATE_HASH_LUT(${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/Lexer.lut.h)
1072
1073 #GENERATOR: "RegExpJitTables.h": tables used by Yarr
1074 add_custom_command(
1075     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1076     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables
1077     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/create_regex_tables > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h
1078     VERBATIM)
1079 ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/yarr/YarrPattern.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/RegExpJitTables.h)
1080
1081
1082 #GENERATOR: "KeywordLookup.h": keyword decision tree used by the lexer
1083 add_custom_command(
1084     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1085     MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py
1086     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table
1087     COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/KeywordLookupGenerator.py ${CMAKE_CURRENT_SOURCE_DIR}/parser/Keywords.table > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h
1088     VERBATIM)
1089 ADD_SOURCE_DEPENDENCIES(${CMAKE_CURRENT_SOURCE_DIR}/parser/Lexer.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/KeywordLookup.h)
1090
1091
1092 # Inspector Interfaces
1093
1094 set(JavaScriptCore_INSPECTOR_SCRIPTS_DIR "${JAVASCRIPTCORE_DIR}/inspector/scripts")
1095
1096 set(JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS
1097     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py
1098     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator.py
1099     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/cpp_generator_templates.py
1100     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_js_backend_commands.py
1101     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_header.py
1102     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_backend_dispatcher_implementation.py
1103     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_header.py
1104     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_frontend_dispatcher_implementation.py
1105     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_header.py
1106     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generate_cpp_protocol_types_implementation.py
1107     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator.py
1108     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/generator_templates.py
1109     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/__init__.py
1110     ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/codegen/models.py
1111 )
1112
1113 set(JavaScriptCore_INSPECTOR_DOMAINS
1114     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ApplicationCache.json
1115     ${JAVASCRIPTCORE_DIR}/inspector/protocol/CSS.json
1116     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Console.json
1117     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOM.json
1118     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMDebugger.json
1119     ${JAVASCRIPTCORE_DIR}/inspector/protocol/DOMStorage.json
1120     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Database.json
1121     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Debugger.json
1122     ${JAVASCRIPTCORE_DIR}/inspector/protocol/GenericTypes.json
1123     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Heap.json
1124     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Inspector.json
1125     ${JAVASCRIPTCORE_DIR}/inspector/protocol/LayerTree.json
1126     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Network.json
1127     ${JAVASCRIPTCORE_DIR}/inspector/protocol/OverlayTypes.json
1128     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Page.json
1129     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Runtime.json
1130     ${JAVASCRIPTCORE_DIR}/inspector/protocol/ScriptProfiler.json
1131     ${JAVASCRIPTCORE_DIR}/inspector/protocol/Timeline.json
1132 )
1133
1134 if (ENABLE_INDEXED_DATABASE)
1135     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1136         ${JAVASCRIPTCORE_DIR}/inspector/protocol/IndexedDB.json
1137     )
1138 endif ()
1139
1140 if (ENABLE_RESOURCE_USAGE)
1141     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1142         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Memory.json
1143     )
1144 endif ()
1145
1146 if (ENABLE_WEB_REPLAY)
1147     list(APPEND JavaScriptCore_INSPECTOR_DOMAINS
1148         ${JAVASCRIPTCORE_DIR}/inspector/protocol/Replay.json
1149     )
1150 endif ()
1151
1152 add_custom_command(
1153     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1154     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py
1155     DEPENDS ${JavaScriptCore_INSPECTOR_DOMAINS}
1156     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-combined-inspector-json.py ${JavaScriptCore_INSPECTOR_DOMAINS} > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1157     VERBATIM)
1158
1159 # Inspector Backend Dispatchers, Frontend Dispatchers, Type Builders
1160 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBINSPECTORUI_DIR}/UserInterface/Protocol)
1161 file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector)
1162 add_custom_command(
1163     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1164            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1165            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1166            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1167            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1168            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1169            ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendCommands.js
1170     MAIN_DEPENDENCY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1171     DEPENDS ${JavaScriptCore_INSPECTOR_PROTOCOL_SCRIPTS}
1172     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_INSPECTOR_SCRIPTS_DIR}/generate-inspector-protocol-bindings.py --outputDir "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector" --framework JavaScriptCore ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/CombinedDomains.json
1173     VERBATIM)
1174
1175 # JSCBuiltins
1176
1177 set(BUILTINS_GENERATOR_SCRIPTS
1178     ${JavaScriptCore_SCRIPTS_DIR}/builtins.py
1179     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generator.py
1180     ${JavaScriptCore_SCRIPTS_DIR}/builtins_model.py
1181     ${JavaScriptCore_SCRIPTS_DIR}/builtins_templates.py
1182     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_header.py
1183     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_combined_implementation.py
1184     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_header.py
1185     ${JavaScriptCore_SCRIPTS_DIR}/builtins_generate_separate_implementation.py
1186     ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1187     ${JavaScriptCore_SCRIPTS_DIR}/lazywriter.py
1188 )
1189
1190 set(JavaScriptCore_BUILTINS_SOURCES
1191     ${JAVASCRIPTCORE_DIR}/builtins/ArrayConstructor.js
1192     ${JAVASCRIPTCORE_DIR}/builtins/ArrayIteratorPrototype.js
1193     ${JAVASCRIPTCORE_DIR}/builtins/ArrayPrototype.js
1194     ${JAVASCRIPTCORE_DIR}/builtins/DatePrototype.js
1195     ${JAVASCRIPTCORE_DIR}/builtins/FunctionPrototype.js
1196     ${JAVASCRIPTCORE_DIR}/builtins/GeneratorPrototype.js
1197     ${JAVASCRIPTCORE_DIR}/builtins/GlobalObject.js
1198     ${JAVASCRIPTCORE_DIR}/builtins/InspectorInstrumentationObject.js
1199     ${JAVASCRIPTCORE_DIR}/builtins/InternalPromiseConstructor.js
1200     ${JAVASCRIPTCORE_DIR}/builtins/IteratorPrototype.js
1201     ${JAVASCRIPTCORE_DIR}/builtins/MapPrototype.js
1202     ${JAVASCRIPTCORE_DIR}/builtins/ModuleLoaderObject.js
1203     ${JAVASCRIPTCORE_DIR}/builtins/NumberPrototype.js
1204     ${JAVASCRIPTCORE_DIR}/builtins/ObjectConstructor.js
1205     ${JAVASCRIPTCORE_DIR}/builtins/PromiseConstructor.js
1206     ${JAVASCRIPTCORE_DIR}/builtins/PromiseOperations.js
1207     ${JAVASCRIPTCORE_DIR}/builtins/PromisePrototype.js
1208     ${JAVASCRIPTCORE_DIR}/builtins/ReflectObject.js
1209     ${JAVASCRIPTCORE_DIR}/builtins/SetPrototype.js
1210     ${JAVASCRIPTCORE_DIR}/builtins/StringConstructor.js
1211     ${JAVASCRIPTCORE_DIR}/builtins/StringIteratorPrototype.js
1212     ${JAVASCRIPTCORE_DIR}/builtins/StringPrototype.js
1213     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayConstructor.js
1214     ${JAVASCRIPTCORE_DIR}/builtins/TypedArrayPrototype.js
1215 )
1216
1217 add_custom_command(
1218     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1219     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes
1220     DEPENDS ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb
1221     COMMAND ${RUBY_EXECUTABLE} ${JAVASCRIPTCORE_DIR}/b3/air/opcode_generator.rb ${JAVASCRIPTCORE_DIR}/b3/air/AirOpcode.opcodes VERBATIM
1222     WORKING_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}
1223 )
1224
1225 list(APPEND JavaScriptCore_SOURCES
1226     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcode.h
1227     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/AirOpcodeGenerated.h
1228 )
1229
1230 add_custom_command(
1231     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1232     MAIN_DEPENDENCY ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py
1233     DEPENDS ${JavaScriptCore_BUILTINS_SOURCES} ${BUILTINS_GENERATOR_SCRIPTS}
1234     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/generate-js-builtins.py --framework JavaScriptCore --output-directory ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} --combined ${JavaScriptCore_BUILTINS_SOURCES}
1235     VERBATIM)
1236
1237 list(APPEND JavaScriptCore_SOURCES
1238     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.cpp
1239     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.cpp
1240     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.cpp
1241     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.cpp
1242 )
1243
1244 list(APPEND JavaScriptCore_HEADERS
1245     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorBackendDispatchers.h
1246     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorFrontendDispatchers.h
1247     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/inspector/InspectorProtocolObjects.h
1248     ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSCBuiltins.h
1249 )
1250
1251 add_custom_command(
1252     OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1253     MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js
1254     DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py
1255     COMMAND ${CMAKE_COMMAND} -E echo "//# sourceURL=__WebInspectorInjectedScript__" > ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1256     COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/jsmin.py < ${JAVASCRIPTCORE_DIR}/inspector/InjectedScriptSource.js >> ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js
1257     COMMAND ${PERL_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/xxd.pl InjectedScriptSource_js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.min.js ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h
1258     VERBATIM)
1259
1260 list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/InjectedScriptSource.h)
1261
1262 # Web Replay inputs generator
1263 if (ENABLE_WEB_REPLAY)
1264     set(JavaScript_WEB_REPLAY_INPUTS ${CMAKE_CURRENT_SOURCE_DIR}/replay/JSInputs.json)
1265     add_custom_command(
1266         OUTPUT ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSReplayInputs.h ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSReplayInputs.cpp
1267         MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/replay/scripts/CodeGeneratorReplayInputs.py
1268         DEPENDS ${JavaScript_WEB_REPLAY_INPUTS}
1269         COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/replay/scripts/CodeGeneratorReplayInputs.py --outputDir ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/ --framework JavaScriptCore ${JavaScript_WEB_REPLAY_INPUTS}
1270         VERBATIM)
1271
1272     list(APPEND JavaScriptCore_SOURCES
1273         replay/EncodedValue.cpp
1274         ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSReplayInputs.cpp
1275     )
1276     list(APPEND JavaScriptCore_HEADERS ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}/JSReplayInputs.h)
1277 endif ()
1278
1279 if (WTF_CPU_ARM)
1280 elseif (WTF_CPU_ARM64)
1281 elseif (WTF_CPU_HPPA)
1282 elseif (WTF_CPU_PPC)
1283 elseif (WTF_CPU_PPC64)
1284 elseif (WTF_CPU_PPC64LE)
1285 elseif (WTF_CPU_S390)
1286 elseif (WTF_CPU_S390X)
1287 elseif (WTF_CPU_MIPS)
1288 elseif (WTF_CPU_SH4)
1289 elseif (WTF_CPU_X86)
1290 elseif (WTF_CPU_X86_64)
1291     if (MSVC AND ENABLE_JIT)
1292         add_custom_command(
1293             OUTPUT ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj
1294             MAIN_DEPENDENCY ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1295             COMMAND ml64 -nologo -c -Fo ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj ${JAVASCRIPTCORE_DIR}/jit/JITStubsMSVC64.asm
1296             VERBATIM)
1297
1298         list(APPEND JavaScriptCore_SOURCES ${DERIVED_SOURCES_DIR}/JITStubsMSVC64.obj)
1299     endif ()
1300 else ()
1301     message(FATAL_ERROR "Unknown CPU")
1302 endif ()
1303
1304
1305 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
1306
1307 WEBKIT_CREATE_FORWARDING_HEADERS(JavaScriptCore DIRECTORIES ${JavaScriptCore_FORWARDING_HEADERS_DIRECTORIES} FILES ${JavaScriptCore_FORWARDING_HEADERS_FILES})
1308
1309
1310 add_subdirectory(shell)
1311
1312 WEBKIT_WRAP_SOURCELIST(${JavaScriptCore_SOURCES})
1313 include_directories(${JavaScriptCore_INCLUDE_DIRECTORIES})
1314 include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
1315 add_library(JavaScriptCore ${JavaScriptCore_LIBRARY_TYPE} ${JavaScriptCore_HEADERS} ${JavaScriptCore_SOURCES})
1316 target_link_libraries(JavaScriptCore ${JavaScriptCore_LIBRARIES})
1317 set_target_properties(JavaScriptCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_JavaScriptCore")
1318 set_target_properties(JavaScriptCore PROPERTIES FOLDER "JavaScriptCore")
1319
1320 if (JavaScriptCore_PRE_BUILD_COMMAND)
1321     add_custom_command(TARGET JavaScriptCore PRE_BUILD COMMAND ${JavaScriptCore_PRE_BUILD_COMMAND} VERBATIM)
1322 endif ()
1323
1324 if (JavaScriptCore_POST_BUILD_COMMAND)
1325     add_custom_command(TARGET JavaScriptCore POST_BUILD COMMAND ${JavaScriptCore_POST_BUILD_COMMAND} VERBATIM)
1326 endif ()
1327
1328 if (JavaScriptCore_OUTPUT_NAME)
1329     set_target_properties(JavaScriptCore PROPERTIES OUTPUT_NAME ${JavaScriptCore_OUTPUT_NAME})
1330 endif ()
1331
1332 if (${JavaScriptCore_LIBRARY_TYPE} STREQUAL "SHARED")
1333     POPULATE_LIBRARY_VERSION(JAVASCRIPTCORE)
1334     set_target_properties(JavaScriptCore PROPERTIES VERSION ${JAVASCRIPTCORE_VERSION} SOVERSION ${JAVASCRIPTCORE_VERSION_MAJOR})
1335     install(TARGETS JavaScriptCore DESTINATION "${LIB_INSTALL_DIR}")
1336 endif ()
1337
1338 # Force staging of shared scripts, even if they aren't directly used to build JavaScriptCore.
1339
1340 add_custom_target(stageSharedScripts DEPENDS ${JavaScriptCore_SCRIPTS})
1341 add_dependencies(JavaScriptCore stageSharedScripts)
1342
1343 WEBKIT_FRAMEWORK(JavaScriptCore)