File: CMakeLists.txt

package info (click to toggle)
webkit2gtk 2.48.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 429,620 kB
  • sloc: cpp: 3,696,936; javascript: 194,444; ansic: 169,997; python: 46,499; asm: 19,276; ruby: 18,528; perl: 16,602; xml: 4,650; yacc: 2,360; sh: 2,098; java: 1,993; lex: 1,327; pascal: 366; makefile: 298
file content (809 lines) | stat: -rw-r--r-- 17,741 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
set(WTF_PUBLIC_HEADERS
    AbstractRefCounted.h
    AbstractRefCountedAndCanMakeWeakPtr.h
    AbstractThreadSafeRefCountedAndCanMakeWeakPtr.h
    ASCIICType.h
    AccessibleAddress.h
    AggregateLogger.h
    Algorithms.h
    AlignedStorage.h
    AnsiColors.h
    ApproximateTime.h
    ArgumentCoder.h
    Assertions.h
    Atomics.h
    AutodrainedPool.h
    AutomaticThread.h
    BackwardsGraph.h
    Bag.h
    BagToHashMap.h
    BitSet.h
    BitVector.h
    BlockObjCExceptions.h
    BlockPtr.h
    BloomFilter.h
    BooleanLattice.h
    Box.h
    BoxPtr.h
    Brigand.h
    BubbleSort.h
    BumpPointerAllocator.h
    ButterflyArray.h
    ByteOrder.h
    CPUTime.h
    CanMakeWeakPtr.h
    CagedPtr.h
    CagedUniquePtr.h
    CallbackAggregator.h
    CancellableTask.h
    CheckedArithmetic.h
    CheckedBoolean.h
    CheckedPtr.h
    CheckedRef.h
    ClockType.h
    CodePtr.h
    CommaPrinter.h
    CompactPointerTuple.h
    CompactPtr.h
    CompactRefPtr.h
    CompactRefPtrTuple.h
    CompactUniquePtrTuple.h
    CompactVariant.h
    CompactVariantOperations.h
    CompilationThread.h
    Compiler.h
    CompletionHandler.h
    ConcurrentBuffer.h
    ConcurrentPtrHashSet.h
    ConcurrentVector.h
    Condition.h
    ContinuousApproximateTime.h
    ContinuousTime.h
    CountingLock.h
    CrossThreadCopier.h
    CrossThreadQueue.h
    CrossThreadTask.h
    CrossThreadTaskHandler.h
    CryptographicUtilities.h
    CryptographicallyRandomNumber.h
    DataLog.h
    DataMutex.h
    DataRef.h
    DateMath.h
    DebugHeap.h
    DebugUtilities.h
    DeferrableRefCounted.h
    Deque.h
    Dominators.h
    DoublyLinkedList.h
    EmbeddedFixedVector.h
    EnumClassOperatorOverloads.h
    EnumTraits.h
    EnumeratedArray.h
    Expected.h
    ExperimentalFeatureNames.h
    ExportMacros.h
    FailureAction.h
    FastBitVector.h
    FastFloat.h
    FastMalloc.h
    FastTLS.h
    FilePrintStream.h
    FileSystem.h
    FixedBitVector.h
    FixedVector.h
    FixedWidthDouble.h
    FlatteningVariantAdaptor.h
    FlipBytes.h
    Float16.h
    ForbidHeapAllocation.h
    Forward.h
    Function.h
    FunctionDispatcher.h
    FunctionPtr.h
    FunctionTraits.h
    GenericHashKey.h
    GenericTimeMixin.h
    GetPtr.h
    Gigacage.h
    GlobalVersion.h
    GraphNodeWorklist.h
    GregorianDateTime.h
    HashCountedSet.h
    HashFunctions.h
    HashIterators.h
    HashMap.h
    HashMethod.h
    HashSet.h
    HashTable.h
    HashTraits.h
    Hasher.h
    HexNumber.h
    Identified.h
    Indenter.h
    IndexedRange.h
    IndexKeyType.h
    IndexMap.h
    IndexSet.h
    IndexSparseSet.h
    IndexedContainerIterator.h
    InlineASM.h
    Insertion.h
    InstanceCounted.h
    Int128.h
    InterferenceGraph.h
    IsoMalloc.h
    IsoMallocInlines.h
    IterationStatus.h
    IteratorAdaptors.h
    IteratorRange.h
    JSONValues.h
    JSValueMalloc.h
    KeyValuePair.h
    LEBDecoder.h
    Language.h
    LazyRef.h
    LazyUniqueRef.h
    LikelyDenseUnsignedIntegerSet.h
    ListDump.h
    ListHashSet.h
    Liveness.h
    Lock.h
    LockAlgorithm.h
    LockAlgorithmInlines.h
    LockedPrintStream.h
    Locker.h
    LocklessBag.h
    LogChannels.h
    LogInitialization.h
    Logger.h
    LoggerHelper.h
    Logging.h
    LoggingAccumulator.h
    LoggingHashID.h
    LoggingHashMap.h
    LoggingHashSet.h
    LoggingHashTraits.h
    MachSendRight.h
    MainThread.h
    MainThreadData.h
    MainThreadDispatcher.h
    MallocCommon.h
    MallocPtr.h
    MallocSpan.h
    Markable.h
    MathExtras.h
    MediaTime.h
    MemoryFootprint.h
    MemoryPressureHandler.h
    MessageQueue.h
    MetaAllocator.h
    MetaAllocatorHandle.h
    Mmap.h
    MonotonicTime.h
    NakedPtr.h
    NativePromise.h
    NaturalLoops.h
    NeverDestroyed.h
    NoLock.h
    NoTailCalls.h
    Noncopyable.h
    Nonmovable.h
    NotFound.h
    NumberOfCores.h
    OSAllocator.h
    OSObjectPtr.h
    OSRandomSource.h
    ObjCRuntimeExtras.h
    ObjectIdentifier.h
    Observer.h
    OptionSet.h
    OptionSetHash.h
    OrderMaker.h
    OverflowPolicy.h
    Packed.h
    PackedRef.h
    PackedRefPtr.h
    PageAllocation.h
    PageBlock.h
    PageReservation.h
    ParallelHelperPool.h
    ParallelJobs.h
    ParallelJobsGeneric.h
    ParallelJobsLibdispatch.h
    ParallelJobsOpenMP.h
    ParallelVectorIterator.h
    ParkingLot.h
    Platform.h
    PlatformCallingConventions.h
    PlatformCPU.h
    PlatformEnable.h
    PlatformEnableCocoa.h
    PlatformEnableGlib.h
    PlatformEnablePlayStation.h
    PlatformEnableWin.h
    PlatformHave.h
    PlatformLegacy.h
    PlatformOS.h
    PlatformRegisters.h
    PlatformUse.h
    PointerComparison.h
    PointerPreparations.h
    PreciseSum.h
    PrintStream.h
    PriorityQueue.h
    ProcessID.h
    ProcessPrivilege.h
    PtrTag.h
    RAMSize.h
    RandomDevice.h
    Range.h
    RangeSet.h
    RawHex.h
    RawPointer.h
    RawPtrTraits.h
    RawValueTraits.h
    ReadWriteLock.h
    RecursableLambda.h
    RecursiveLockAdapter.h
    RedBlackTree.h
    Ref.h
    RefCounted.h
    RefCountedAndCanMakeWeakPtr.h
    RefCountedFixedVector.h
    RefCountedLeakCounter.h
    RefCounter.h
    RefPtr.h
    RefTrackerMixin.h
    RefVector.h
    ReferenceWrapperVector.h
    ResourceUsage.h
    RetainPtr.h
    RetainReleaseSwift.h
    RobinHoodHashMap.h
    RobinHoodHashSet.h
    RobinHoodHashTable.h
    RunLoop.h
    RuntimeApplicationChecks.h
    SHA1.h
    SIMDHelpers.h
    SIMDUTF.h
    SafeStrerror.h
    SaturatedArithmetic.h
    SchedulePair.h
    Scope.h
    ScopedLambda.h
    ScopedPrintStream.h
    Seconds.h
    SegmentedVector.h
    SentinelLinkedList.h
    SetForScope.h
    SharedTask.h
    SignedPtr.h
    SimpleStats.h
    SingleRootGraph.h
    SingleThreadIntegralWrapper.h
    SinglyLinkedList.h
    SinglyLinkedListWithTail.h
    SixCharacterHash.h
    SmallMap.h
    SmallSet.h
    SoftLinking.h
    SortedArrayMap.h
    SpanningTree.h
    Spectrum.h
    StackBounds.h
    StackCheck.h
    StackPointer.h
    StackShot.h
    StackShotProfiler.h
    StackStats.h
    StackTrace.h
    StdFilesystem.h
    StdIntExtras.h
    StdLibExtras.h
    StdList.h
    StdMap.h
    StdMultimap.h
    StdSet.h
    StdUnorderedMap.h
    StdUnorderedSet.h
    Stopwatch.h
    StreamBuffer.h
    StringExtras.h
    StringHashDumpContext.h
    StringPrintStream.h
    SuspendableWorkQueue.h
    SynchronizedFixedQueue.h
    SystemFree.h
    SystemMalloc.h
    SystemTracing.h
    TZoneMalloc.h
    TZoneMallocInlines.h
    TaggedArrayStoragePtr.h
    TaggedPtr.h
    ThreadAssertions.h
    ThreadGroup.h
    ThreadMessage.h
    ThreadSafetyAnalysis.h
    ThreadSafeRefCounted.h
    ThreadSafeRefCountedWithSuppressingSaferCPPChecking.h
    ThreadSafeWeakHashSet.h
    ThreadSafeWeakPtr.h
    ThreadSanitizerSupport.h
    ThreadSpecific.h
    Threading.h
    ThreadingPrimitives.h
    TimeWithDynamicClockType.h
    TimingScope.h
    TinyLRUCache.h
    TinyPtrSet.h
    TrailingArray.h
    TranslatedProcess.h
    TriState.h
    TypeCasts.h
    TypeTraits.h
    URL.h
    URLHelpers.h
    URLHash.h
    URLParser.h
    UUID.h
    UnalignedAccess.h
    Unexpected.h
    UniStdExtras.h
    UnionFind.h
    UniqueArray.h
    UniqueRef.h
    UniqueRefVector.h
    VMTags.h
    ValueCheck.h
    VariantExtras.h
    VariantList.h
    VariantListOperations.h
    Vector.h
    VectorHash.h
    VectorTraits.h
    WTFConfig.h
    WTFProcess.h
    WTFSemaphore.h
    WallTime.h
    WeakHashCountedSet.h
    WeakHashMap.h
    WeakHashSet.h
    WeakListHashSet.h
    WeakObjCPtr.h
    WeakPtr.h
    WeakPtrFactory.h
    WeakPtrImpl.h
    WeakRandom.h
    WeakRandomNumber.h
    WeakRef.h
    WindowsExtras.h
    WordLock.h
    WorkQueue.h
    WorkerPool.h
    ZippedRange.h
    dtoa.h

    dragonbox/dragonbox.h
    dragonbox/dragonbox_to_chars.h
    dragonbox/ieee754_format.h

    dragonbox/detail/bits.h
    dragonbox/detail/cache_holder.h
    dragonbox/detail/decimal_fp.h
    dragonbox/detail/div.h
    dragonbox/detail/log.h
    dragonbox/detail/policy.h
    dragonbox/detail/policy_holder.h
    dragonbox/detail/util.h
    dragonbox/detail/wuint.h

    dtoa/bignum-dtoa.h
    dtoa/bignum.h
    dtoa/cached-powers.h
    dtoa/diy-fp.h
    dtoa/double-conversion.h
    dtoa/fast-dtoa.h
    dtoa/fixed-dtoa.h
    dtoa/ieee.h
    dtoa/strtod.h
    dtoa/utils.h

    fast_float/ascii_number.h
    fast_float/bigint.h
    fast_float/decimal_to_binary.h
    fast_float/digit_comparison.h
    fast_float/fast_float.h
    fast_float/fast_table.h
    fast_float/float_common.h
    fast_float/parse_number.h
    fast_float/simple_decimal_conversion.h

    persistence/PersistentCoders.h
    persistence/PersistentDecoder.h
    persistence/PersistentEncoder.h

    simde/simde.h
    simde/arm/neon.h
    simde/arm/sve.h
    simde/wasm/simd128.h

    simdutf/simdutf_impl.h

    text/ASCIIFastPath.h
    text/ASCIILiteral.h
    text/AdaptiveStringSearcher.h
    text/AtomString.h
    text/AtomStringHash.h
    text/AtomStringImpl.h
    text/AtomStringTable.h
    text/Base64.h
    text/CString.h
    text/CharacterProperties.h
    text/CodePointIterator.h
    text/ConversionMode.h
    text/EscapedFormsForJSON.h
    text/ExternalStringImpl.h
    text/FastCharacterComparison.h
    text/IntegerToStringConversion.h
    text/LChar.h
    text/LineEnding.h
    text/MakeString.h
    text/NullTextBreakIterator.h
    text/OrdinalNumber.h
    text/ParsingUtilities.h
    text/StringBuffer.h
    text/StringBuilder.h
    text/StringBuilderInternals.h
    text/StringBuilderJSON.h
    text/StringCommon.h
    text/StringConcatenate.h
    text/StringConcatenateNumbers.h
    text/StringHash.h
    text/StringHasher.h
    text/StringHasherInlines.h
    text/SuperFastHash.h
    text/WYHash.h
    text/StringImpl.h
    text/StringParsingBuffer.h
    text/StringSearch.h
    text/StringToIntegerConversion.h
    text/StringView.h
    text/SymbolImpl.h
    text/SymbolRegistry.h
    text/TextBreakIterator.h
    text/TextBreakIteratorInternalICU.h
    text/TextPosition.h
    text/TextStream.h
    text/UTF8ConversionError.h
    text/UniquedStringImpl.h
    text/WTFString.h

    text/icu/TextBreakIteratorICU.h
    text/icu/UnicodeExtras.h
    text/icu/UTextProvider.h
    text/icu/UTextProviderLatin1.h
    text/icu/UTextProviderUTF16.h

    threads/BinarySemaphore.h
    threads/Signals.h

    unicode/CharacterNames.h
    unicode/Collator.h
    unicode/UTF8Conversion.h

    unicode/icu/ICUHelpers.h
)

set(WTF_SOURCES
    ASCIICType.cpp
    ApproximateTime.cpp
    Assertions.cpp
    AutomaticThread.cpp
    BitVector.cpp
    BloomFilter.cpp
    CPUTime.cpp
    ClockType.cpp
    CodePtr.cpp
    CompilationThread.cpp
    ConcurrentBuffer.cpp
    ConcurrentPtrHashSet.cpp
    ContinuousApproximateTime.cpp
    ContinuousTime.cpp
    CountingLock.cpp
    CrossThreadCopier.cpp
    CrossThreadTaskHandler.cpp
    CryptographicUtilities.cpp
    CryptographicallyRandomNumber.cpp
    CurrentTime.cpp
    DataLog.cpp
    DateMath.cpp
    DebugHeap.cpp
    EmbeddedFixedVector.cpp
    FastBitVector.cpp
    FastFloat.cpp
    FastMalloc.cpp
    FilePrintStream.cpp
    FileSystem.cpp
    FunctionDispatcher.cpp
    Gigacage.cpp
    GlobalVersion.cpp
    GregorianDateTime.cpp
    HashTable.cpp
    HexNumber.cpp
    Int128.cpp
    JSONValues.cpp
    Language.cpp
    LikelyDenseUnsignedIntegerSet.cpp
    Lock.cpp
    LockedPrintStream.cpp
    LogChannels.cpp
    LogInitialization.cpp
    Logger.cpp
    Logging.cpp
    MainThread.cpp
    MainThreadDispatcher.cpp
    MallocCommon.cpp
    MediaTime.cpp
    MemoryPressureHandler.cpp
    MetaAllocator.cpp
    MonotonicTime.cpp
    NativePromise.cpp
    NumberOfCores.cpp
    OSRandomSource.cpp
    ObjectIdentifier.cpp
    PageBlock.cpp
    ParallelHelperPool.cpp
    ParallelJobsGeneric.cpp
    ParkingLot.cpp
    PreciseSum.cpp
    PrintStream.cpp
    ProcessPrivilege.cpp
    RAMSize.cpp
    RandomDevice.cpp
    ReadWriteLock.cpp
    RefCounted.cpp
    RefCountedLeakCounter.cpp
    RefTrackerMixin.cpp
    RunLoop.cpp
    RuntimeApplicationChecks.cpp
    SHA1.cpp
    SIMDUTF.cpp
    SafeStrerror.cpp
    Seconds.cpp
    SegmentedVector.cpp
    SixCharacterHash.cpp
    SmallSet.cpp
    StackBounds.cpp
    StackCheck.cpp
    StackPointer.cpp
    StackStats.cpp
    StackTrace.cpp
    StringPrintStream.cpp
    SuspendableWorkQueue.cpp
    ThreadGroup.cpp
    ThreadMessage.cpp
    Threading.cpp
    TimeWithDynamicClockType.cpp
    TimingScope.cpp
    URL.cpp
    URLHelpers.cpp
    URLParser.cpp
    UUID.cpp
    UniqueArray.cpp
    Vector.cpp
    WTFAssertions.cpp
    WTFConfig.cpp
    WTFProcess.cpp
    WallTime.cpp
    WeakPtr.cpp
    WeakRandomNumber.cpp
    WordLock.cpp
    WorkQueue.cpp
    WorkerPool.cpp
    dtoa.cpp

    dragonbox/dragonbox_to_chars.cpp

    dtoa/bignum-dtoa.cc
    dtoa/bignum.cc
    dtoa/cached-powers.cc
    dtoa/diy-fp.cc
    dtoa/double-conversion.cc
    dtoa/fast-dtoa.cc
    dtoa/fixed-dtoa.cc
    dtoa/strtod.cc

    persistence/PersistentCoders.cpp
    persistence/PersistentDecoder.cpp
    persistence/PersistentEncoder.cpp

    text/ASCIILiteral.cpp
    text/AtomString.cpp
    text/AtomStringImpl.cpp
    text/AtomStringTable.cpp
    text/Base64.cpp
    text/CString.cpp
    text/ExternalStringImpl.cpp
    text/LineEnding.cpp
    text/StringBuffer.cpp
    text/StringBuilder.cpp
    text/StringBuilderJSON.cpp
    text/StringCommon.cpp
    text/StringImpl.cpp
    text/StringView.cpp
    text/SymbolImpl.cpp
    text/SymbolRegistry.cpp
    text/TextBreakIterator.cpp
    text/TextStream.cpp
    text/WTFString.cpp

    text/icu/UnicodeExtras.cpp
    text/icu/UTextProvider.cpp
    text/icu/UTextProviderLatin1.cpp
    text/icu/UTextProviderUTF16.cpp

    threads/BinarySemaphore.cpp
    threads/Signals.cpp

    unicode/CollatorDefault.cpp
    unicode/UTF8Conversion.cpp

    unicode/icu/CollatorICU.cpp
    unicode/icu/ICUHelpers.cpp
)

if (WIN32)
    list(APPEND WTF_PUBLIC_HEADERS
        text/win/WCharStringExtras.h

        win/DbgHelperWin.h
        win/GDIObject.h
        win/PathWalker.h
        win/SoftLinking.h
        win/Win32Handle.h
    )
elseif (APPLE)
    list(APPEND WTF_SOURCES
        darwin/OSLogPrintStream.mm
    )

    list(APPEND WTF_PUBLIC_HEADERS
        cf/CFURLExtras.h
        cf/TypeCastsCF.h
        cf/VectorCF.h

        cocoa/CrashReporter.h
        cocoa/Entitlements.h
        cocoa/NSURLExtras.h
        cocoa/RuntimeApplicationChecksCocoa.h
        cocoa/SoftLinking.h
        cocoa/TollFreeBridging.h
        cocoa/TypeCastsCocoa.h
        cocoa/VectorCocoa.h

        darwin/OSLogPrintStream.h
        darwin/WeakLinking.h

        spi/cf/CFBundleSPI.h
        spi/cf/CFStringSPI.h

        spi/cocoa/CFXPCBridgeSPI.h
        spi/cocoa/CrashReporterClientSPI.h
        spi/cocoa/IOSurfaceSPI.h
        spi/cocoa/MachVMSPI.h
        spi/cocoa/NSLocaleSPI.h
        spi/cocoa/NSObjCRuntimeSPI.h
        spi/cocoa/SecuritySPI.h
        spi/cocoa/objcSPI.h

        spi/darwin/AbortWithReasonSPI.h
        spi/darwin/CodeSignSPI.h
        spi/darwin/DataVaultSPI.h
        spi/darwin/OSVariantSPI.h
        spi/darwin/ProcessMemoryFootprint.h
        spi/darwin/SandboxSPI.h
        spi/darwin/XPCSPI.h
        spi/darwin/dyldSPI.h

        spi/mac/MetadataSPI.h

        text/cf/StringConcatenateCF.h
        text/cf/TextBreakIteratorCF.h
    )
elseif (CMAKE_SYSTEM_NAME MATCHES "Linux")
    list(APPEND WTF_PUBLIC_HEADERS
        linux/CurrentProcessMemoryStatus.h
        linux/ProcessMemoryFootprint.h
    )
endif ()

set(WTF_PRIVATE_INCLUDE_DIRECTORIES
    "${CMAKE_BINARY_DIR}"
    "${WTF_DERIVED_SOURCES_DIR}"
    "${WTF_DIR}"
    "${WTF_DIR}/wtf"
    "${WTF_DIR}/wtf/dtoa"
    "${WTF_DIR}/wtf/fast_float"
    "${WTF_DIR}/wtf/persistence"
    "${WTF_DIR}/wtf/simdutf"
    "${WTF_DIR}/wtf/text"
    "${WTF_DIR}/wtf/text/icu"
    "${WTF_DIR}/wtf/threads"
    "${WTF_DIR}/wtf/unicode"
)

set(WTF_LIBRARIES
    ${CMAKE_DL_LIBS}
    ICU::data
    ICU::i18n
    ICU::uc
)

if (NOT USE_SYSTEM_MALLOC)
    set(WTF_FRAMEWORKS bmalloc)
endif ()

if (ATOMICS_REQUIRE_LIBATOMIC)
    list(APPEND WTF_LIBRARIES atomic)
endif ()

if (COMPILER_IS_GCC_OR_CLANG)
    if (HAVE_STD_EXPERIMENTAL_FILESYSTEM)
        list(APPEND WTF_LIBRARIES stdc++fs)
    endif ()
endif ()

set(WTF_INTERFACE_LIBRARIES WTF)
set(WTF_INTERFACE_INCLUDE_DIRECTORIES ${WTF_FRAMEWORK_HEADERS_DIR})
set(WTF_INTERFACE_DEPENDENCIES WTF_CopyHeaders)

WEBKIT_FRAMEWORK_DECLARE(WTF)
WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()

if (PORT STREQUAL GTK OR PORT STREQUAL WPE)
    WEBKIT_ADD_TARGET_CXX_FLAGS(WTF
        -Wunsafe-buffer-usage
        -fsafe-buffer-usage-suggestions
    )
endif ()

WEBKIT_COPY_FILES(WTF_CopyHeaders
    DESTINATION ${WTF_FRAMEWORK_HEADERS_DIR}/wtf
    FILES ${WTF_PUBLIC_HEADERS}
)

WEBKIT_FRAMEWORK(WTF)

if (MSVC)
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
else ()
    # Prior to GCC 13, GCC has a bug that warning suppression pragma cannot be effective on preprocessor itself.
    # We need to disable preprocessor related warnings manually here.
    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431
    set_source_files_properties(
        SIMDUTF.cpp
        text/Base64.cpp
        PROPERTIES COMPILE_FLAGS "-Wno-error=undef -Wno-undef")
endif ()

file(MAKE_DIRECTORY ${WTF_SCRIPTS_DIR})

message(STATUS "Copying generate-unified-source-bundles.rb to: ${WTF_SCRIPTS_DIR}")

file(COPY
    ../Scripts/generate-unified-source-bundles.rb
    DESTINATION ${WTF_SCRIPTS_DIR}
)

set(WTF_PREFERENCES
    ../Scripts/GeneratePreferences.rb
    ../Scripts/Preferences/UnifiedWebPreferences.yaml
)

WEBKIT_COPY_FILES(WTF_CopyPreferences
    DESTINATION ${WTF_SCRIPTS_DIR}
    FILES ${WTF_PREFERENCES}
)