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