ae88b6820daa4ca70e3a2e0d5991bf4912238b09
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_PUBLIC_HEADERS
2     ASCIICType.h
3     Algorithms.h
4     Assertions.h
5     Atomics.h
6     AutodrainedPool.h
7     AutomaticThread.h
8     BackwardsGraph.h
9     Bag.h
10     BagToHashMap.h
11     BitVector.h
12     Bitmap.h
13     BlockObjCExceptions.h
14     BlockPtr.h
15     BloomFilter.h
16     BooleanLattice.h
17     Box.h
18     Brigand.h
19     BubbleSort.h
20     BumpPointerAllocator.h
21     ByteOrder.h
22     CPUTime.h
23     CagedPtr.h
24     CagedUniquePtr.h
25     CallbackAggregator.h
26     CheckedArithmetic.h
27     CheckedBoolean.h
28     ClockType.h
29     CommaPrinter.h
30     CompactPointerTuple.h
31     CompilationThread.h
32     Compiler.h
33     CompletionHandler.h
34     ConcurrentBuffer.h
35     ConcurrentPtrHashSet.h
36     ConcurrentVector.h
37     Condition.h
38     CountingLock.h
39     CrossThreadCopier.h
40     CrossThreadQueue.h
41     CrossThreadTask.h
42     CrossThreadTaskHandler.h
43     CryptographicUtilities.h
44     CryptographicallyRandomNumber.h
45     DataLog.h
46     DateMath.h
47     DebugUtilities.h
48     DecimalNumber.h
49     DeferrableRefCounted.h
50     DeprecatedOptional.h
51     Deque.h
52     DisallowCType.h
53     Dominators.h
54     DoublyLinkedList.h
55     DumbPtrTraits.h
56     DumbValueTraits.h
57     EnumTraits.h
58     Expected.h
59     ExportMacros.h
60     FastBitVector.h
61     FastMalloc.h
62     FastTLS.h
63     FeatureDefines.h
64     FileMetadata.h
65     FilePrintStream.h
66     FileSystem.h
67     FlipBytes.h
68     ForbidHeapAllocation.h
69     Forward.h
70     Function.h
71     FunctionDispatcher.h
72     FunctionTraits.h
73     GetPtr.h
74     Gigacage.h
75     GlobalVersion.h
76     GraphNodeWorklist.h
77     GregorianDateTime.h
78     HashCountedSet.h
79     HashFunctions.h
80     HashIterators.h
81     HashMap.h
82     HashMethod.h
83     HashSet.h
84     HashTable.h
85     HashTraits.h
86     Hasher.h
87     HexNumber.h
88     Identified.h
89     Indenter.h
90     IndexKeyType.h
91     IndexMap.h
92     IndexSet.h
93     IndexSparseSet.h
94     IndexedContainerIterator.h
95     InlineASM.h
96     Insertion.h
97     InstanceCounted.h
98     IsoMalloc.h
99     IsoMallocInlines.h
100     IteratorAdaptors.h
101     IteratorRange.h
102     JSONValues.h
103     JSValueMalloc.h
104     KeyValuePair.h
105     LEBDecoder.h
106     Language.h
107     ListDump.h
108     ListHashSet.h
109     Liveness.h
110     Lock.h
111     LockAlgorithm.h
112     LockAlgorithmInlines.h
113     LockedPrintStream.h
114     Locker.h
115     LocklessBag.h
116     Logger.h
117     LoggerHelper.h
118     LoggingAccumulator.h
119     LoggingHashID.h
120     LoggingHashMap.h
121     LoggingHashSet.h
122     LoggingHashTraits.h
123     MD5.h
124     MachSendRight.h
125     MainThread.h
126     MallocPtr.h
127     Markable.h
128     MathExtras.h
129     MediaTime.h
130     MemoryFootprint.h
131     MemoryPressureHandler.h
132     MessageQueue.h
133     MetaAllocator.h
134     MetaAllocatorHandle.h
135     MetaAllocatorPtr.h
136     MonotonicTime.h
137     NakedPtr.h
138     NaturalLoops.h
139     NeverDestroyed.h
140     NoLock.h
141     NoTailCalls.h
142     Noncopyable.h
143     NotFound.h
144     NumberOfCores.h
145     OSAllocator.h
146     OSObjectPtr.h
147     OSRandomSource.h
148     ObjCRuntimeExtras.h
149     ObjectIdentifier.h
150     OptionSet.h
151     Optional.h
152     OrderMaker.h
153     PackedIntVector.h
154     PageAllocation.h
155     PageBlock.h
156     PageReservation.h
157     ParallelHelperPool.h
158     ParallelJobs.h
159     ParallelJobsGeneric.h
160     ParallelJobsLibdispatch.h
161     ParallelJobsOpenMP.h
162     ParallelVectorIterator.h
163     ParkingLot.h
164     Platform.h
165     PlatformRegisters.h
166     PointerComparison.h
167     PointerPreparations.h
168     Poisoned.h
169     PoisonedUniquePtr.h
170     PrintStream.h
171     PriorityQueue.h
172     ProcessID.h
173     ProcessPrivilege.h
174     PtrTag.h
175     RAMSize.h
176     RandomDevice.h
177     RandomNumber.h
178     RandomNumberSeed.h
179     Range.h
180     RangeSet.h
181     RawPointer.h
182     ReadWriteLock.h
183     RecursableLambda.h
184     RecursiveLockAdapter.h
185     RedBlackTree.h
186     Ref.h
187     RefCounted.h
188     RefCountedArray.h
189     RefCountedLeakCounter.h
190     RefCounter.h
191     RefPtr.h
192     RetainPtr.h
193     RunLoop.h
194     RunLoopTimer.h
195     SHA1.h
196     SaturatedArithmetic.h
197     SchedulePair.h
198     Scope.h
199     ScopedLambda.h
200     Seconds.h
201     SegmentedVector.h
202     SentinelLinkedList.h
203     SetForScope.h
204     SharedTask.h
205     SimpleStats.h
206     SingleRootGraph.h
207     SinglyLinkedList.h
208     SinglyLinkedListWithTail.h
209     SixCharacterHash.h
210     SmallPtrSet.h
211     SoftLinking.h
212     Spectrum.h
213     StackBounds.h
214     StackPointer.h
215     StackShot.h
216     StackShotProfiler.h
217     StackStats.h
218     StackTrace.h
219     StdLibExtras.h
220     StdList.h
221     StdMap.h
222     StdSet.h
223     StdUnorderedMap.h
224     StdUnorderedSet.h
225     Stopwatch.h
226     StreamBuffer.h
227     StringExtras.h
228     StringHashDumpContext.h
229     StringPrintStream.h
230     SynchronizedFixedQueue.h
231     SystemFree.h
232     SystemTracing.h
233     ThreadGroup.h
234     ThreadMessage.h
235     ThreadSafeRefCounted.h
236     ThreadSpecific.h
237     Threading.h
238     ThreadingPrimitives.h
239     TimeWithDynamicClockType.h
240     TimingScope.h
241     TinyLRUCache.h
242     TinyPtrSet.h
243     TriState.h
244     TypeCasts.h
245     URL.h
246     URLHelpers.h
247     URLHash.h
248     URLParser.h
249     UUID.h
250     UnalignedAccess.h
251     Unexpected.h
252     UniStdExtras.h
253     UnionFind.h
254     UniqueArray.h
255     UniqueRef.h
256     UnsafePointer.h
257     VMTags.h
258     ValueCheck.h
259     Variant.h
260     Vector.h
261     VectorTraits.h
262     WTFSemaphore.h
263     WallTime.h
264     WeakPtr.h
265     WeakRandom.h
266     WindowsExtras.h
267     WordLock.h
268     WorkQueue.h
269     WorkerPool.h
270     dtoa.h
271
272     dtoa/bignum-dtoa.h
273     dtoa/bignum.h
274     dtoa/cached-powers.h
275     dtoa/diy-fp.h
276     dtoa/double-conversion.h
277     dtoa/fast-dtoa.h
278     dtoa/fixed-dtoa.h
279     dtoa/ieee.h
280     dtoa/strtod.h
281     dtoa/utils.h
282
283     persistence/PersistentCoder.h
284     persistence/PersistentCoders.h
285     persistence/PersistentDecoder.h
286     persistence/PersistentEncoder.h
287
288     text/ASCIIFastPath.h
289     text/ASCIILiteral.h
290     text/AtomicString.h
291     text/AtomicStringHash.h
292     text/AtomicStringImpl.h
293     text/AtomicStringTable.h
294     text/Base64.h
295     text/CString.h
296     text/ConversionMode.h
297     text/ExternalStringImpl.h
298     text/IntegerToStringConversion.h
299     text/LChar.h
300     text/LineBreakIteratorPoolICU.h
301     text/LineEnding.h
302     text/NullTextBreakIterator.h
303     text/OrdinalNumber.h
304     text/StringBuffer.h
305     text/StringBuilder.h
306     text/StringCommon.h
307     text/StringConcatenate.h
308     text/StringConcatenateNumbers.h
309     text/StringHash.h
310     text/StringHasher.h
311     text/StringImpl.h
312     text/StringOperators.h
313     text/StringToIntegerConversion.h
314     text/StringView.h
315     text/SymbolImpl.h
316     text/SymbolRegistry.h
317     text/TextBreakIterator.h
318     text/TextBreakIteratorInternalICU.h
319     text/TextPosition.h
320     text/TextStream.h
321     text/UTF8ConversionError.h
322     text/UniquedStringImpl.h
323     text/ValueToString.h
324     text/WTFString.h
325
326     text/icu/TextBreakIteratorICU.h
327     text/icu/UTextProvider.h
328     text/icu/UTextProviderLatin1.h
329     text/icu/UTextProviderUTF16.h
330
331     threads/BinarySemaphore.h
332     threads/Signals.h
333
334     unicode/CharacterNames.h
335     unicode/Collator.h
336     unicode/UTF8Conversion.h
337 )
338
339 set(WTF_SOURCES
340     ASCIICType.cpp
341     Assertions.cpp
342     AutomaticThread.cpp
343     BitVector.cpp
344     CPUTime.cpp
345     ClockType.cpp
346     CompilationThread.cpp
347     ConcurrentPtrHashSet.cpp
348     CountingLock.cpp
349     CrossThreadCopier.cpp
350     CrossThreadTaskHandler.cpp
351     CryptographicUtilities.cpp
352     CryptographicallyRandomNumber.cpp
353     CurrentTime.cpp
354     DataLog.cpp
355     DateMath.cpp
356     DecimalNumber.cpp
357     FastBitVector.cpp
358     FastMalloc.cpp
359     FilePrintStream.cpp
360     FileSystem.cpp
361     FunctionDispatcher.cpp
362     Gigacage.cpp
363     GlobalVersion.cpp
364     GregorianDateTime.cpp
365     HashTable.cpp
366     HexNumber.cpp
367     JSONValues.cpp
368     JSValueMalloc.cpp
369     Language.cpp
370     Lock.cpp
371     LockedPrintStream.cpp
372     Logger.cpp
373     MD5.cpp
374     MainThread.cpp
375     MediaTime.cpp
376     MemoryPressureHandler.cpp
377     MetaAllocator.cpp
378     MonotonicTime.cpp
379     NumberOfCores.cpp
380     OSRandomSource.cpp
381     ObjectIdentifier.cpp
382     PageBlock.cpp
383     ParallelHelperPool.cpp
384     ParallelJobsGeneric.cpp
385     ParkingLot.cpp
386     Poisoned.cpp
387     PrintStream.cpp
388     ProcessPrivilege.cpp
389     RAMSize.cpp
390     RandomDevice.cpp
391     RandomNumber.cpp
392     ReadWriteLock.cpp
393     RefCountedLeakCounter.cpp
394     RunLoop.cpp
395     SHA1.cpp
396     Seconds.cpp
397     SixCharacterHash.cpp
398     StackBounds.cpp
399     StackPointer.cpp
400     StackStats.cpp
401     StackTrace.cpp
402     StringPrintStream.cpp
403     ThreadGroup.cpp
404     ThreadMessage.cpp
405     Threading.cpp
406     TimeWithDynamicClockType.cpp
407     TimingScope.cpp
408     URL.cpp
409     URLHelpers.cpp
410     URLParser.cpp
411     UUID.cpp
412     WTFAssertions.cpp
413     WallTime.cpp
414     WordLock.cpp
415     WorkQueue.cpp
416     WorkerPool.cpp
417     dtoa.cpp
418
419     dtoa/bignum-dtoa.cc
420     dtoa/bignum.cc
421     dtoa/cached-powers.cc
422     dtoa/diy-fp.cc
423     dtoa/double-conversion.cc
424     dtoa/fast-dtoa.cc
425     dtoa/fixed-dtoa.cc
426     dtoa/strtod.cc
427
428     persistence/PersistentCoders.cpp
429     persistence/PersistentDecoder.cpp
430     persistence/PersistentEncoder.cpp
431
432     text/ASCIILiteral.cpp
433     text/AtomicString.cpp
434     text/AtomicStringImpl.cpp
435     text/AtomicStringTable.cpp
436     text/Base64.cpp
437     text/CString.cpp
438     text/ExternalStringImpl.cpp
439     text/LineEnding.cpp
440     text/StringBuilder.cpp
441     text/StringBuilderJSON.cpp
442     text/StringImpl.cpp
443     text/StringView.cpp
444     text/SymbolImpl.cpp
445     text/SymbolRegistry.cpp
446     text/TextBreakIterator.cpp
447     text/TextStream.cpp
448     text/WTFString.cpp
449
450     text/icu/UTextProvider.cpp
451     text/icu/UTextProviderLatin1.cpp
452     text/icu/UTextProviderUTF16.cpp
453
454     threads/BinarySemaphore.cpp
455     threads/Signals.cpp
456
457     unicode/UTF8Conversion.cpp
458 )
459
460 set(WTF_INCLUDE_DIRECTORIES
461     "${BMALLOC_DIR}"
462     "${CMAKE_BINARY_DIR}"
463     "${DERIVED_SOURCES_DIR}"
464     "${THIRDPARTY_DIR}"
465 )
466
467 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
468     "${WTF_DIR}"
469     "${WTF_DIR}/wtf"
470     "${WTF_DIR}/wtf/dtoa"
471     "${WTF_DIR}/wtf/persistence"
472     "${WTF_DIR}/wtf/text"
473     "${WTF_DIR}/wtf/text/icu"
474     "${WTF_DIR}/wtf/threads"
475     "${WTF_DIR}/wtf/unicode"
476 )
477
478 set(WTF_LIBRARIES
479     ${CMAKE_DL_LIBS}
480 )
481
482 if (NOT USE_SYSTEM_MALLOC)
483     list(APPEND WTF_LIBRARIES bmalloc)
484 endif ()
485
486 list(APPEND WTF_SOURCES
487     unicode/CollatorDefault.cpp
488
489     unicode/icu/CollatorICU.cpp
490 )
491 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
492     ${ICU_INCLUDE_DIRS}
493 )
494 list(APPEND WTF_LIBRARIES
495     ${ICU_DATA_LIBRARIES}
496     ${ICU_I18N_LIBRARIES}
497     ${ICU_LIBRARIES}
498 )
499
500 WEBKIT_FRAMEWORK_DECLARE(WTF)
501 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
502
503 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
504 WEBKIT_FRAMEWORK(WTF)
505
506 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
507     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
508     FILES ${WTF_PUBLIC_HEADERS}
509 )
510
511 if (MSVC)
512     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
513     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
514
515     add_custom_command(
516         TARGET WTF
517         PRE_BUILD
518         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
519         VERBATIM)
520
521     add_custom_command(
522         TARGET WTF
523         POST_BUILD
524         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
525         VERBATIM)
526 endif ()
527
528 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
529
530 file(COPY
531     ../Scripts/generate-unified-source-bundles.rb
532     DESTINATION
533     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
534 )