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