cee1cce1e57184d13bd2cd519ef6a20dffb1a96a
[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     FilePrintStream.h
65     FlipBytes.h
66     ForbidHeapAllocation.h
67     Forward.h
68     Function.h
69     FunctionDispatcher.h
70     FunctionTraits.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     MachSendRight.h
123     MainThread.h
124     MallocPtr.h
125     Markable.h
126     MathExtras.h
127     MediaTime.h
128     MemoryFootprint.h
129     MemoryPressureHandler.h
130     MessageQueue.h
131     MetaAllocator.h
132     MetaAllocatorHandle.h
133     MetaAllocatorPtr.h
134     MonotonicTime.h
135     NakedPtr.h
136     NaturalLoops.h
137     NeverDestroyed.h
138     NoLock.h
139     NoTailCalls.h
140     Noncopyable.h
141     NotFound.h
142     NumberOfCores.h
143     OSAllocator.h
144     OSObjectPtr.h
145     OSRandomSource.h
146     ObjCRuntimeExtras.h
147     ObjectIdentifier.h
148     OptionSet.h
149     Optional.h
150     OrderMaker.h
151     PackedIntVector.h
152     PageAllocation.h
153     PageBlock.h
154     PageReservation.h
155     ParallelHelperPool.h
156     ParallelJobs.h
157     ParallelJobsGeneric.h
158     ParallelJobsLibdispatch.h
159     ParallelJobsOpenMP.h
160     ParallelVectorIterator.h
161     ParkingLot.h
162     Platform.h
163     PlatformRegisters.h
164     PointerComparison.h
165     PointerPreparations.h
166     Poisoned.h
167     PoisonedUniquePtr.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     Spectrum.h
211     StackBounds.h
212     StackPointer.h
213     StackShot.h
214     StackShotProfiler.h
215     StackStats.h
216     StackTrace.h
217     StdLibExtras.h
218     StdList.h
219     StdMap.h
220     StdSet.h
221     StdUnorderedMap.h
222     StdUnorderedSet.h
223     Stopwatch.h
224     StreamBuffer.h
225     StringExtras.h
226     StringHashDumpContext.h
227     StringPrintStream.h
228     SynchronizedFixedQueue.h
229     SystemFree.h
230     SystemTracing.h
231     ThreadGroup.h
232     ThreadMessage.h
233     ThreadSafeRefCounted.h
234     ThreadSpecific.h
235     Threading.h
236     ThreadingPrimitives.h
237     TimeWithDynamicClockType.h
238     TimingScope.h
239     TinyLRUCache.h
240     TinyPtrSet.h
241     TriState.h
242     TypeCasts.h
243     URL.h
244     URLHash.h
245     URLParser.h
246     UUID.h
247     UnalignedAccess.h
248     Unexpected.h
249     UniStdExtras.h
250     UnionFind.h
251     UniqueArray.h
252     UniqueRef.h
253     UnsafePointer.h
254     VMTags.h
255     ValueCheck.h
256     Variant.h
257     Vector.h
258     VectorTraits.h
259     WTFSemaphore.h
260     WallTime.h
261     WeakPtr.h
262     WeakRandom.h
263     WindowsExtras.h
264     WordLock.h
265     WorkQueue.h
266     WorkerPool.h
267     dtoa.h
268
269     dtoa/bignum-dtoa.h
270     dtoa/bignum.h
271     dtoa/cached-powers.h
272     dtoa/diy-fp.h
273     dtoa/double-conversion.h
274     dtoa/double.h
275     dtoa/fast-dtoa.h
276     dtoa/fixed-dtoa.h
277     dtoa/strtod.h
278     dtoa/utils.h
279
280     persistence/PersistentCoder.h
281     persistence/PersistentCoders.h
282     persistence/PersistentDecoder.h
283     persistence/PersistentEncoder.h
284
285     text/ASCIIFastPath.h
286     text/ASCIILiteral.h
287     text/AtomicString.h
288     text/AtomicStringHash.h
289     text/AtomicStringImpl.h
290     text/AtomicStringTable.h
291     text/Base64.h
292     text/CString.h
293     text/ConversionMode.h
294     text/ExternalStringImpl.h
295     text/IntegerToStringConversion.h
296     text/LChar.h
297     text/LineBreakIteratorPoolICU.h
298     text/LineEnding.h
299     text/NullTextBreakIterator.h
300     text/OrdinalNumber.h
301     text/StringBuffer.h
302     text/StringBuilder.h
303     text/StringCommon.h
304     text/StringConcatenate.h
305     text/StringConcatenateNumbers.h
306     text/StringHash.h
307     text/StringHasher.h
308     text/StringImpl.h
309     text/StringOperators.h
310     text/StringToIntegerConversion.h
311     text/StringView.h
312     text/SymbolImpl.h
313     text/SymbolRegistry.h
314     text/TextBreakIterator.h
315     text/TextBreakIteratorInternalICU.h
316     text/TextPosition.h
317     text/TextStream.h
318     text/UTF8ConversionError.h
319     text/UniquedStringImpl.h
320     text/ValueToString.h
321     text/WTFString.h
322
323     text/icu/TextBreakIteratorICU.h
324     text/icu/UTextProvider.h
325     text/icu/UTextProviderLatin1.h
326     text/icu/UTextProviderUTF16.h
327
328     threads/BinarySemaphore.h
329     threads/Signals.h
330
331     unicode/CharacterNames.h
332     unicode/Collator.h
333     unicode/UTF8Conversion.h
334 )
335
336 set(WTF_SOURCES
337     Assertions.cpp
338     AutomaticThread.cpp
339     BitVector.cpp
340     CPUTime.cpp
341     ClockType.cpp
342     CompilationThread.cpp
343     ConcurrentPtrHashSet.cpp
344     CountingLock.cpp
345     CrossThreadCopier.cpp
346     CrossThreadTaskHandler.cpp
347     CryptographicUtilities.cpp
348     CryptographicallyRandomNumber.cpp
349     CurrentTime.cpp
350     DataLog.cpp
351     DateMath.cpp
352     DecimalNumber.cpp
353     FastBitVector.cpp
354     FastMalloc.cpp
355     FilePrintStream.cpp
356     FunctionDispatcher.cpp
357     Gigacage.cpp
358     GlobalVersion.cpp
359     GregorianDateTime.cpp
360     HashTable.cpp
361     JSONValues.cpp
362     JSValueMalloc.cpp
363     Language.cpp
364     Lock.cpp
365     LockedPrintStream.cpp
366     MD5.cpp
367     MainThread.cpp
368     MediaTime.cpp
369     MemoryPressureHandler.cpp
370     MetaAllocator.cpp
371     MonotonicTime.cpp
372     NumberOfCores.cpp
373     OSRandomSource.cpp
374     PageBlock.cpp
375     ParallelHelperPool.cpp
376     ParallelJobsGeneric.cpp
377     ParkingLot.cpp
378     Poisoned.cpp
379     PrintStream.cpp
380     ProcessPrivilege.cpp
381     RAMSize.cpp
382     RandomDevice.cpp
383     RandomNumber.cpp
384     ReadWriteLock.cpp
385     RefCountedLeakCounter.cpp
386     RunLoop.cpp
387     SHA1.cpp
388     Seconds.cpp
389     SixCharacterHash.cpp
390     StackBounds.cpp
391     StackPointer.cpp
392     StackStats.cpp
393     StackTrace.cpp
394     StringPrintStream.cpp
395     ThreadGroup.cpp
396     ThreadMessage.cpp
397     Threading.cpp
398     TimeWithDynamicClockType.cpp
399     TimingScope.cpp
400     URL.cpp
401     URLParser.cpp
402     UUID.cpp
403     WTFAssertions.cpp
404     WallTime.cpp
405     WordLock.cpp
406     WorkQueue.cpp
407     WorkerPool.cpp
408     dtoa.cpp
409
410     dtoa/bignum-dtoa.cc
411     dtoa/bignum.cc
412     dtoa/cached-powers.cc
413     dtoa/diy-fp.cc
414     dtoa/double-conversion.cc
415     dtoa/fast-dtoa.cc
416     dtoa/fixed-dtoa.cc
417     dtoa/strtod.cc
418
419     persistence/PersistentCoders.cpp
420     persistence/PersistentDecoder.cpp
421     persistence/PersistentEncoder.cpp
422
423     text/ASCIILiteral.cpp
424     text/AtomicString.cpp
425     text/AtomicStringImpl.cpp
426     text/AtomicStringTable.cpp
427     text/Base64.cpp
428     text/CString.cpp
429     text/ExternalStringImpl.cpp
430     text/LineEnding.cpp
431     text/StringBuilder.cpp
432     text/StringBuilderJSON.cpp
433     text/StringImpl.cpp
434     text/StringView.cpp
435     text/SymbolImpl.cpp
436     text/SymbolRegistry.cpp
437     text/TextBreakIterator.cpp
438     text/TextStream.cpp
439     text/WTFString.cpp
440
441     text/icu/UTextProvider.cpp
442     text/icu/UTextProviderLatin1.cpp
443     text/icu/UTextProviderUTF16.cpp
444
445     threads/BinarySemaphore.cpp
446     threads/Signals.cpp
447
448     unicode/UTF8Conversion.cpp
449 )
450
451 set(WTF_INCLUDE_DIRECTORIES
452     "${BMALLOC_DIR}"
453     "${CMAKE_BINARY_DIR}"
454     "${DERIVED_SOURCES_DIR}"
455     "${THIRDPARTY_DIR}"
456 )
457
458 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
459     "${WTF_DIR}"
460     "${WTF_DIR}/wtf"
461     "${WTF_DIR}/wtf/dtoa"
462     "${WTF_DIR}/wtf/persistence"
463     "${WTF_DIR}/wtf/text"
464     "${WTF_DIR}/wtf/text/icu"
465     "${WTF_DIR}/wtf/threads"
466     "${WTF_DIR}/wtf/unicode"
467 )
468
469 set(WTF_LIBRARIES
470     ${CMAKE_DL_LIBS}
471 )
472
473 if (NOT USE_SYSTEM_MALLOC)
474     list(APPEND WTF_LIBRARIES bmalloc)
475 endif ()
476
477 list(APPEND WTF_SOURCES
478     unicode/CollatorDefault.cpp
479
480     unicode/icu/CollatorICU.cpp
481 )
482 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
483     ${ICU_INCLUDE_DIRS}
484 )
485 list(APPEND WTF_LIBRARIES
486     ${ICU_DATA_LIBRARIES}
487     ${ICU_I18N_LIBRARIES}
488     ${ICU_LIBRARIES}
489 )
490
491 if (WIN32)
492     list(APPEND WTF_SOURCES
493         OSAllocatorWin.cpp
494         ThreadSpecificWin.cpp
495         ThreadingWin.cpp
496     )
497     list(APPEND WTF_LIBRARIES
498         DbgHelp
499         winmm
500     )
501 else ()
502     list(APPEND WTF_SOURCES
503         OSAllocatorPosix.cpp
504         ThreadingPthreads.cpp
505     )
506 endif ()
507
508 WEBKIT_FRAMEWORK_DECLARE(WTF)
509 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
510
511 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
512 WEBKIT_FRAMEWORK(WTF)
513
514 WEBKIT_MAKE_FORWARDING_HEADERS(WTF
515     DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
516     FILES ${WTF_PUBLIC_HEADERS}
517 )
518
519 if (MSVC)
520     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
521     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
522
523     add_custom_command(
524         TARGET WTF
525         PRE_BUILD
526         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
527         VERBATIM)
528
529     add_custom_command(
530         TARGET WTF
531         POST_BUILD
532         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
533         VERBATIM)
534 endif ()
535
536 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/wtf/Scripts)
537
538 file(COPY
539     ../Scripts/generate-unified-source-bundles.rb
540     DESTINATION
541     ${FORWARDING_HEADERS_DIR}/wtf/Scripts
542 )