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