1c6d7300581228b55dbd4e34469ebefc43977fc2
[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     URLHash.h
247     URLParser.h
248     UUID.h
249     UnalignedAccess.h
250     Unexpected.h
251     UniStdExtras.h
252     UnionFind.h
253     UniqueArray.h
254     UniqueRef.h
255     UnsafePointer.h
256     VMTags.h
257     ValueCheck.h
258     Variant.h
259     Vector.h
260     VectorTraits.h
261     WTFSemaphore.h
262     WallTime.h
263     WeakPtr.h
264     WeakRandom.h
265     WindowsExtras.h
266     WordLock.h
267     WorkQueue.h
268     WorkerPool.h
269     dtoa.h
270
271     dtoa/bignum-dtoa.h
272     dtoa/bignum.h
273     dtoa/cached-powers.h
274     dtoa/diy-fp.h
275     dtoa/double-conversion.h
276     dtoa/double.h
277     dtoa/fast-dtoa.h
278     dtoa/fixed-dtoa.h
279     dtoa/strtod.h
280     dtoa/utils.h
281
282     persistence/PersistentCoder.h
283     persistence/PersistentCoders.h
284     persistence/PersistentDecoder.h
285     persistence/PersistentEncoder.h
286
287     text/ASCIIFastPath.h
288     text/ASCIILiteral.h
289     text/AtomicString.h
290     text/AtomicStringHash.h
291     text/AtomicStringImpl.h
292     text/AtomicStringTable.h
293     text/Base64.h
294     text/CString.h
295     text/ConversionMode.h
296     text/ExternalStringImpl.h
297     text/IntegerToStringConversion.h
298     text/LChar.h
299     text/LineBreakIteratorPoolICU.h
300     text/LineEnding.h
301     text/NullTextBreakIterator.h
302     text/OrdinalNumber.h
303     text/StringBuffer.h
304     text/StringBuilder.h
305     text/StringCommon.h
306     text/StringConcatenate.h
307     text/StringConcatenateNumbers.h
308     text/StringHash.h
309     text/StringHasher.h
310     text/StringImpl.h
311     text/StringOperators.h
312     text/StringToIntegerConversion.h
313     text/StringView.h
314     text/SymbolImpl.h
315     text/SymbolRegistry.h
316     text/TextBreakIterator.h
317     text/TextBreakIteratorInternalICU.h
318     text/TextPosition.h
319     text/TextStream.h
320     text/UTF8ConversionError.h
321     text/UniquedStringImpl.h
322     text/ValueToString.h
323     text/WTFString.h
324
325     text/icu/TextBreakIteratorICU.h
326     text/icu/UTextProvider.h
327     text/icu/UTextProviderLatin1.h
328     text/icu/UTextProviderUTF16.h
329
330     threads/BinarySemaphore.h
331     threads/Signals.h
332
333     unicode/CharacterNames.h
334     unicode/Collator.h
335     unicode/UTF8Conversion.h
336 )
337
338 set(WTF_SOURCES
339     ASCIICType.cpp
340     Assertions.cpp
341     AutomaticThread.cpp
342     BitVector.cpp
343     CPUTime.cpp
344     ClockType.cpp
345     CompilationThread.cpp
346     ConcurrentPtrHashSet.cpp
347     CountingLock.cpp
348     CrossThreadCopier.cpp
349     CrossThreadTaskHandler.cpp
350     CryptographicUtilities.cpp
351     CryptographicallyRandomNumber.cpp
352     CurrentTime.cpp
353     DataLog.cpp
354     DateMath.cpp
355     DecimalNumber.cpp
356     FastBitVector.cpp
357     FastMalloc.cpp
358     FilePrintStream.cpp
359     FileSystem.cpp
360     FunctionDispatcher.cpp
361     Gigacage.cpp
362     GlobalVersion.cpp
363     GregorianDateTime.cpp
364     HashTable.cpp
365     JSONValues.cpp
366     JSValueMalloc.cpp
367     Language.cpp
368     Lock.cpp
369     LockedPrintStream.cpp
370     MD5.cpp
371     MainThread.cpp
372     MediaTime.cpp
373     MemoryPressureHandler.cpp
374     MetaAllocator.cpp
375     MonotonicTime.cpp
376     NumberOfCores.cpp
377     OSRandomSource.cpp
378     ObjectIdentifier.cpp
379     PageBlock.cpp
380     ParallelHelperPool.cpp
381     ParallelJobsGeneric.cpp
382     ParkingLot.cpp
383     Poisoned.cpp
384     PrintStream.cpp
385     ProcessPrivilege.cpp
386     RAMSize.cpp
387     RandomDevice.cpp
388     RandomNumber.cpp
389     ReadWriteLock.cpp
390     RefCountedLeakCounter.cpp
391     RunLoop.cpp
392     SHA1.cpp
393     Seconds.cpp
394     SixCharacterHash.cpp
395     StackBounds.cpp
396     StackPointer.cpp
397     StackStats.cpp
398     StackTrace.cpp
399     StringPrintStream.cpp
400     ThreadGroup.cpp
401     ThreadMessage.cpp
402     Threading.cpp
403     TimeWithDynamicClockType.cpp
404     TimingScope.cpp
405     URL.cpp
406     URLParser.cpp
407     UUID.cpp
408     WTFAssertions.cpp
409     WallTime.cpp
410     WordLock.cpp
411     WorkQueue.cpp
412     WorkerPool.cpp
413     dtoa.cpp
414
415     dtoa/bignum-dtoa.cc
416     dtoa/bignum.cc
417     dtoa/cached-powers.cc
418     dtoa/diy-fp.cc
419     dtoa/double-conversion.cc
420     dtoa/fast-dtoa.cc
421     dtoa/fixed-dtoa.cc
422     dtoa/strtod.cc
423
424     persistence/PersistentCoders.cpp
425     persistence/PersistentDecoder.cpp
426     persistence/PersistentEncoder.cpp
427
428     text/ASCIILiteral.cpp
429     text/AtomicString.cpp
430     text/AtomicStringImpl.cpp
431     text/AtomicStringTable.cpp
432     text/Base64.cpp
433     text/CString.cpp
434     text/ExternalStringImpl.cpp
435     text/LineEnding.cpp
436     text/StringBuilder.cpp
437     text/StringBuilderJSON.cpp
438     text/StringImpl.cpp
439     text/StringView.cpp
440     text/SymbolImpl.cpp
441     text/SymbolRegistry.cpp
442     text/TextBreakIterator.cpp
443     text/TextStream.cpp
444     text/WTFString.cpp
445
446     text/icu/UTextProvider.cpp
447     text/icu/UTextProviderLatin1.cpp
448     text/icu/UTextProviderUTF16.cpp
449
450     threads/BinarySemaphore.cpp
451     threads/Signals.cpp
452
453     unicode/UTF8Conversion.cpp
454 )
455
456 set(WTF_INCLUDE_DIRECTORIES
457     "${BMALLOC_DIR}"
458     "${CMAKE_BINARY_DIR}"
459     "${DERIVED_SOURCES_DIR}"
460     "${THIRDPARTY_DIR}"
461 )
462
463 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
464     "${WTF_DIR}"
465     "${WTF_DIR}/wtf"
466     "${WTF_DIR}/wtf/dtoa"
467     "${WTF_DIR}/wtf/persistence"
468     "${WTF_DIR}/wtf/text"
469     "${WTF_DIR}/wtf/text/icu"
470     "${WTF_DIR}/wtf/threads"
471     "${WTF_DIR}/wtf/unicode"
472 )
473
474 set(WTF_LIBRARIES
475     ${CMAKE_DL_LIBS}
476 )
477
478 if (NOT USE_SYSTEM_MALLOC)
479     list(APPEND WTF_LIBRARIES bmalloc)
480 endif ()
481
482 list(APPEND WTF_SOURCES
483     unicode/CollatorDefault.cpp
484
485     unicode/icu/CollatorICU.cpp
486 )
487 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
488     ${ICU_INCLUDE_DIRS}
489 )
490 list(APPEND WTF_LIBRARIES
491     ${ICU_DATA_LIBRARIES}
492     ${ICU_I18N_LIBRARIES}
493     ${ICU_LIBRARIES}
494 )
495
496 WEBKIT_FRAMEWORK_DECLARE(WTF)
497 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
498
499 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
500 WEBKIT_FRAMEWORK(WTF)
501
502 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
503     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
504     FILES ${WTF_PUBLIC_HEADERS}
505 )
506
507 if (MSVC)
508     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
509     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
510
511     add_custom_command(
512         TARGET WTF
513         PRE_BUILD
514         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
515         VERBATIM)
516
517     add_custom_command(
518         TARGET WTF
519         POST_BUILD
520         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
521         VERBATIM)
522 endif ()
523
524 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
525
526 file(COPY
527     ../Scripts/generate-unified-source-bundles.rb
528     DESTINATION
529     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
530 )