3c3f25161dbb26ee2cd73535990889f70ce3232a
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_PUBLIC_HEADERS
2     ASCIICType.h
3     AggregateLogger.h
4     Algorithms.h
5     Assertions.h
6     Atomics.h
7     AutodrainedPool.h
8     AutomaticThread.h
9     BackwardsGraph.h
10     Bag.h
11     BagToHashMap.h
12     BitVector.h
13     Bitmap.h
14     BlockObjCExceptions.h
15     BlockPtr.h
16     BloomFilter.h
17     BooleanLattice.h
18     Box.h
19     Brigand.h
20     BubbleSort.h
21     BumpPointerAllocator.h
22     ByteOrder.h
23     CPUTime.h
24     CagedPtr.h
25     CagedUniquePtr.h
26     CallbackAggregator.h
27     CheckedArithmetic.h
28     CheckedBoolean.h
29     ClockType.h
30     CommaPrinter.h
31     CompactPointerTuple.h
32     CompilationThread.h
33     Compiler.h
34     CompletionHandler.h
35     ConcurrentBuffer.h
36     ConcurrentPtrHashSet.h
37     ConcurrentVector.h
38     Condition.h
39     CountingLock.h
40     CrossThreadCopier.h
41     CrossThreadQueue.h
42     CrossThreadTask.h
43     CrossThreadTaskHandler.h
44     CryptographicUtilities.h
45     CryptographicallyRandomNumber.h
46     DataLog.h
47     DateMath.h
48     DebugUtilities.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     PrintStream.h
169     PriorityQueue.h
170     ProcessID.h
171     ProcessPrivilege.h
172     PtrTag.h
173     RAMSize.h
174     RandomDevice.h
175     RandomNumber.h
176     RandomNumberSeed.h
177     Range.h
178     RangeSet.h
179     RawPointer.h
180     ReadWriteLock.h
181     RecursableLambda.h
182     RecursiveLockAdapter.h
183     RedBlackTree.h
184     Ref.h
185     RefCounted.h
186     RefCountedArray.h
187     RefCountedLeakCounter.h
188     RefCounter.h
189     RefPtr.h
190     RetainPtr.h
191     RunLoop.h
192     RunLoopTimer.h
193     SHA1.h
194     SaturatedArithmetic.h
195     SchedulePair.h
196     Scope.h
197     ScopedLambda.h
198     Seconds.h
199     SegmentedVector.h
200     SentinelLinkedList.h
201     SetForScope.h
202     SharedTask.h
203     SimpleStats.h
204     SingleRootGraph.h
205     SinglyLinkedList.h
206     SinglyLinkedListWithTail.h
207     SixCharacterHash.h
208     SmallPtrSet.h
209     SoftLinking.h
210     SpanningTree.h
211     Spectrum.h
212     StackBounds.h
213     StackPointer.h
214     StackShot.h
215     StackShotProfiler.h
216     StackStats.h
217     StackTrace.h
218     StdLibExtras.h
219     StdList.h
220     StdMap.h
221     StdSet.h
222     StdUnorderedMap.h
223     StdUnorderedSet.h
224     Stopwatch.h
225     StreamBuffer.h
226     StringExtras.h
227     StringHashDumpContext.h
228     StringPrintStream.h
229     SynchronizedFixedQueue.h
230     SystemFree.h
231     SystemTracing.h
232     ThreadGroup.h
233     ThreadMessage.h
234     ThreadSafeRefCounted.h
235     ThreadSpecific.h
236     Threading.h
237     ThreadingPrimitives.h
238     TimeWithDynamicClockType.h
239     TimingScope.h
240     TinyLRUCache.h
241     TinyPtrSet.h
242     TriState.h
243     TypeCasts.h
244     URL.h
245     URLHelpers.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     WeakHashSet.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     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     HexNumber.cpp
366     JSONValues.cpp
367     JSValueMalloc.cpp
368     Language.cpp
369     Lock.cpp
370     LockedPrintStream.cpp
371     Logger.cpp
372     MD5.cpp
373     MainThread.cpp
374     MediaTime.cpp
375     MemoryPressureHandler.cpp
376     MetaAllocator.cpp
377     MonotonicTime.cpp
378     NumberOfCores.cpp
379     OSRandomSource.cpp
380     ObjectIdentifier.cpp
381     PageBlock.cpp
382     ParallelHelperPool.cpp
383     ParallelJobsGeneric.cpp
384     ParkingLot.cpp
385     PrintStream.cpp
386     ProcessPrivilege.cpp
387     RAMSize.cpp
388     RandomDevice.cpp
389     RandomNumber.cpp
390     ReadWriteLock.cpp
391     RefCountedLeakCounter.cpp
392     RunLoop.cpp
393     SHA1.cpp
394     Seconds.cpp
395     SixCharacterHash.cpp
396     StackBounds.cpp
397     StackPointer.cpp
398     StackStats.cpp
399     StackTrace.cpp
400     StringPrintStream.cpp
401     ThreadGroup.cpp
402     ThreadMessage.cpp
403     Threading.cpp
404     TimeWithDynamicClockType.cpp
405     TimingScope.cpp
406     URL.cpp
407     URLHelpers.cpp
408     URLParser.cpp
409     UUID.cpp
410     WTFAssertions.cpp
411     WallTime.cpp
412     WordLock.cpp
413     WorkQueue.cpp
414     WorkerPool.cpp
415     dtoa.cpp
416
417     dtoa/bignum-dtoa.cc
418     dtoa/bignum.cc
419     dtoa/cached-powers.cc
420     dtoa/diy-fp.cc
421     dtoa/double-conversion.cc
422     dtoa/fast-dtoa.cc
423     dtoa/fixed-dtoa.cc
424     dtoa/strtod.cc
425
426     persistence/PersistentCoders.cpp
427     persistence/PersistentDecoder.cpp
428     persistence/PersistentEncoder.cpp
429
430     text/ASCIILiteral.cpp
431     text/AtomicString.cpp
432     text/AtomicStringImpl.cpp
433     text/AtomicStringTable.cpp
434     text/Base64.cpp
435     text/CString.cpp
436     text/ExternalStringImpl.cpp
437     text/LineEnding.cpp
438     text/StringBuilder.cpp
439     text/StringBuilderJSON.cpp
440     text/StringImpl.cpp
441     text/StringView.cpp
442     text/SymbolImpl.cpp
443     text/SymbolRegistry.cpp
444     text/TextBreakIterator.cpp
445     text/TextStream.cpp
446     text/WTFString.cpp
447
448     text/icu/UTextProvider.cpp
449     text/icu/UTextProviderLatin1.cpp
450     text/icu/UTextProviderUTF16.cpp
451
452     threads/BinarySemaphore.cpp
453     threads/Signals.cpp
454
455     unicode/UTF8Conversion.cpp
456 )
457
458 set(WTF_INCLUDE_DIRECTORIES
459     "${BMALLOC_DIR}"
460     # FIXME: https://bugs.webkit.org/show_bug.cgi?id=196734#c1
461     "${CMAKE_BINARY_DIR}"
462     "${DERIVED_SOURCES_DIR}"
463     "${THIRDPARTY_DIR}"
464 )
465
466 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
467     "${CMAKE_BINARY_DIR}"
468     "${WTF_DERIVED_SOURCES_DIR}"
469     "${WTF_DIR}"
470     "${WTF_DIR}/wtf"
471     "${WTF_DIR}/wtf/dtoa"
472     "${WTF_DIR}/wtf/persistence"
473     "${WTF_DIR}/wtf/text"
474     "${WTF_DIR}/wtf/text/icu"
475     "${WTF_DIR}/wtf/threads"
476     "${WTF_DIR}/wtf/unicode"
477 )
478
479 set(WTF_LIBRARIES
480     ${CMAKE_DL_LIBS}
481 )
482
483 if (NOT USE_SYSTEM_MALLOC)
484     list(APPEND WTF_LIBRARIES bmalloc)
485 endif ()
486
487 list(APPEND WTF_SOURCES
488     unicode/CollatorDefault.cpp
489
490     unicode/icu/CollatorICU.cpp
491 )
492 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
493     ${ICU_INCLUDE_DIRS}
494 )
495 list(APPEND WTF_LIBRARIES
496     ${ICU_DATA_LIBRARIES}
497     ${ICU_I18N_LIBRARIES}
498     ${ICU_LIBRARIES}
499 )
500
501 WEBKIT_FRAMEWORK_DECLARE(WTF)
502 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
503
504 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
505 WEBKIT_FRAMEWORK(WTF)
506
507 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
508     TARGET_NAME WTFFrameworkHeaders
509     DESTINATION ${WTF_FRAMEWORK_HEADERS_DIR}/wtf
510     FILES ${WTF_PUBLIC_HEADERS}
511 )
512
513 if (MSVC)
514     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
515     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
516
517     add_custom_command(
518         TARGET WTF
519         PRE_BUILD
520         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${WTF_DERIVED_SOURCES_DIR}
521         VERBATIM)
522
523     add_custom_command(
524         TARGET WTF
525         POST_BUILD
526         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${WTF_DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
527         VERBATIM)
528 endif ()
529
530 file(COPY
531     ../Scripts/generate-unified-source-bundles.rb
532     DESTINATION
533     ${WTF_SCRIPTS_DIR}
534 )