02da782d6a7e8212dcfcc6d30c2827b48a544255
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_HEADERS
2     ASCIICType.h
3     Assertions.h
4     Atomics.h
5     AutomaticThread.h
6     BackwardsGraph.h
7     Bag.h
8     BagToHashMap.h
9     BitVector.h
10     Bitmap.h
11     Brigand.h
12     BubbleSort.h
13     BumpPointerAllocator.h
14     ByteOrder.h
15     CPUTime.h
16     CagedPtr.h
17     CagedUniquePtr.h
18     ClockType.h
19     CompilationThread.h
20     Compiler.h
21     Condition.h
22     CrossThreadCopier.h
23     CrossThreadTask.h
24     CrossThreadTaskHandler.h
25     CryptographicUtilities.h
26     CryptographicallyRandomNumber.h
27     CurrentTime.h
28     DataLog.h
29     DateMath.h
30     Dominators.h
31     DecimalNumber.h
32     DeferrableRefCounted.h
33     Deque.h
34     DisallowCType.h
35     DoublyLinkedList.h
36     FastMalloc.h
37     FastTLS.h
38     FeatureDefines.h
39     FilePrintStream.h
40     FlipBytes.h
41     Forward.h
42     FunctionDispatcher.h
43     GetPtr.h
44     Gigacage.h
45     GlobalVersion.h
46     GraphNodeWorklist.h
47     GregorianDateTime.h
48     HashCountedSet.h
49     Hasher.h
50     HashFunctions.h
51     HashIterators.h
52     HashMap.h
53     HashMethod.h
54     HashSet.h
55     HashTable.h
56     HashTraits.h
57     HexNumber.h
58     IndexMap.h
59     IndexSet.h
60     IndexSparseSet.h
61     IndexedContainerIterator.h
62     IteratorAdaptors.h
63     IteratorRange.h
64     JSONValues.h
65     Language.h
66     ListHashSet.h
67     Liveness.h
68     Lock.h
69     LockAlgorithmInlines.h
70     LockAlgorithm.h
71     LockedPrintStream.h
72     Locker.h
73     LocklessBag.h
74     LoggingHashID.h
75     LoggingHashMap.h
76     LoggingHashSet.h
77     LoggingHashTraits.h
78     MD5.h
79     MainThread.h
80     MallocPtr.h
81     MathExtras.h
82     MediaTime.h
83     MemoryFootprint.h
84     MemoryPressureHandler.h
85     MessageQueue.h
86     MetaAllocator.h
87     MetaAllocatorHandle.h
88     NaturalLoops.h
89     MonotonicTime.h
90     Noncopyable.h
91     NumberOfCores.h
92     OSAllocator.h
93     OSRandomSource.h
94     OptionSet.h
95     OrderMaker.h
96     PageAllocation.h
97     PageBlock.h
98     PageReservation.h
99     ParallelHelperPool.h
100     ParallelJobs.h
101     ParallelJobsGeneric.h
102     ParallelJobsLibdispatch.h
103     ParallelJobsOpenMP.h
104     ParallelVectorIterator.h
105     ParkingLot.h
106     Platform.h
107     PlatformRegisters.h
108     PrintStream.h
109     ProcessID.h
110     RAMSize.h
111     RandomDevice.h
112     RandomNumber.h
113     RandomNumberSeed.h
114     Range.h
115     RangeSet.h
116     RawPointer.h
117     ReadWriteLock.h
118     RecursiveLockAdapter.h
119     RedBlackTree.h
120     Ref.h
121     RefCounted.h
122     RefCountedLeakCounter.h
123     RefCounter.h
124     RefPtr.h
125     RetainPtr.h
126     RunLoop.h
127     SHA1.h
128     SharedTask.h
129     SaturatedArithmetic.h
130     ScopedLambda.h
131     ScrambledPtr.h
132     Seconds.h
133     SegmentedVector.h
134     SmallPtrSet.h
135     StackBounds.h
136     StackStats.h
137     StackTrace.h
138     StdLibExtras.h
139     Stopwatch.h
140     StringExtras.h
141     StringPrintStream.h
142     SystemFree.h
143     SystemTracing.h
144     ThreadGroup.h
145     ThreadMessage.h
146     ThreadSafeRefCounted.h
147     ThreadSpecific.h
148     Threading.h
149     ThreadingPrimitives.h
150     TimeWithDynamicClockType.h
151     TimingScope.h
152     TinyPtrSet.h
153     UUID.h
154     UniqueRef.h
155     VMTags.h
156     ValueCheck.h
157     Variant.h
158     Vector.h
159     VectorTraits.h
160     WallTime.h
161     WeakPtr.h
162     WordLock.h
163     WorkQueue.h
164     dtoa.h
165
166     dtoa/bignum-dtoa.h
167     dtoa/bignum.h
168     dtoa/cached-powers.h
169     dtoa/diy-fp.h
170     dtoa/double-conversion.h
171     dtoa/double.h
172     dtoa/fast-dtoa.h
173     dtoa/fixed-dtoa.h
174     dtoa/strtod.h
175     dtoa/utils.h
176
177     text/AtomicString.h
178     text/AtomicStringImpl.h
179     text/AtomicStringTable.h
180     text/Base64.h
181     text/CString.h
182     text/IntegerToStringConversion.h
183     text/LChar.h
184     text/LineEnding.h
185     text/LineBreakIteratorPoolICU.h
186     text/StringBuffer.h
187     text/StringCommon.h
188     text/StringHash.h
189     text/StringHasher.h
190     text/StringImpl.h
191     text/StringMalloc.h
192     text/StringVector.h
193     text/StringView.h
194     text/SymbolImpl.h
195     text/SymbolRegistry.h
196     text/TextBreakIterator.h
197     text/TextBreakIteratorInternalICU.h
198     text/TextStream.h
199     text/UniquedStringImpl.h
200     text/ValueToString.h
201     text/WTFString.h
202
203     text/icu/UTextProvider.h
204     text/icu/UTextProviderLatin1.h
205     text/icu/UTextProviderUTF16.h
206
207     threads/BinarySemaphore.h
208     threads/Signals.h
209
210     unicode/CharacterNames.h
211     unicode/Collator.h
212     unicode/UTF8.h
213 )
214
215 set(WTF_SOURCES
216     Assertions.cpp
217     Atomics.cpp
218     AutomaticThread.cpp
219     BitVector.cpp
220     CPUTime.cpp
221     ClockType.cpp
222     CompilationThread.cpp
223     CrossThreadCopier.cpp
224     CrossThreadTaskHandler.cpp
225     CryptographicUtilities.cpp
226     CryptographicallyRandomNumber.cpp
227     CurrentTime.cpp
228     DataLog.cpp
229     DateComponents.cpp
230     DateMath.cpp
231     DecimalNumber.cpp
232     FastBitVector.cpp
233     FastMalloc.cpp
234     FilePrintStream.cpp
235     FunctionDispatcher.cpp
236     Gigacage.cpp
237     GlobalVersion.cpp
238     GregorianDateTime.cpp
239     HashTable.cpp
240     JSONValues.cpp
241     Language.cpp
242     Lock.cpp
243     LockedPrintStream.cpp
244     MD5.cpp
245     MainThread.cpp
246     MediaTime.cpp
247     MemoryPressureHandler.cpp
248     MetaAllocator.cpp
249     MonotonicTime.cpp
250     NumberOfCores.cpp
251     OSRandomSource.cpp
252     PageBlock.cpp
253     ParallelHelperPool.cpp
254     ParallelJobsGeneric.cpp
255     ParkingLot.cpp
256     PrintStream.cpp
257     RAMSize.cpp
258     RandomDevice.cpp
259     RandomNumber.cpp
260     ReadWriteLock.cpp
261     RefCountedLeakCounter.cpp
262     RunLoop.cpp
263     SHA1.cpp
264     ScrambledPtr.cpp
265     Seconds.cpp
266     SixCharacterHash.cpp
267     StackBounds.cpp
268     StackStats.cpp
269     StackTrace.cpp
270     StringPrintStream.cpp
271     ThreadGroup.cpp
272     ThreadMessage.cpp
273     Threading.cpp
274     TimeWithDynamicClockType.cpp
275     TimingScope.cpp
276     UUID.cpp
277     WallTime.cpp
278     WordLock.cpp
279     WorkQueue.cpp
280     dtoa.cpp
281
282     dtoa/bignum-dtoa.cc
283     dtoa/bignum.cc
284     dtoa/cached-powers.cc
285     dtoa/diy-fp.cc
286     dtoa/double-conversion.cc
287     dtoa/fast-dtoa.cc
288     dtoa/fixed-dtoa.cc
289     dtoa/strtod.cc
290
291     persistence/PersistentCoders.cpp
292     persistence/PersistentDecoder.cpp
293     persistence/PersistentEncoder.cpp
294
295     text/AtomicString.cpp
296     text/AtomicStringImpl.cpp
297     text/AtomicStringTable.cpp
298     text/Base64.cpp
299     text/CString.cpp
300     text/LineEnding.cpp
301     text/StringBuilder.cpp
302     text/StringBuilderJSON.cpp
303     text/StringImpl.cpp
304     text/StringMalloc.cpp
305     text/StringView.cpp
306     text/SymbolImpl.cpp
307     text/SymbolRegistry.cpp
308     text/TextBreakIterator.cpp
309     text/TextStream.cpp
310     text/WTFString.cpp
311
312     text/icu/UTextProvider.cpp
313     text/icu/UTextProviderLatin1.cpp
314     text/icu/UTextProviderUTF16.cpp
315
316     threads/BinarySemaphore.cpp
317     threads/Signals.cpp
318
319     unicode/UTF8.cpp
320 )
321
322 set(WTF_INCLUDE_DIRECTORIES
323     "${BMALLOC_DIR}"
324     "${WTF_DIR}"
325     "${CMAKE_BINARY_DIR}"
326     "${DERIVED_SOURCES_DIR}"
327     "${THIRDPARTY_DIR}"
328 )
329
330 set(WTF_PRIVATE_INCLUDE_DIRECTORIES
331     "${WTF_DIR}/wtf"
332     "${WTF_DIR}/wtf/dtoa"
333     "${WTF_DIR}/wtf/persistence"
334     "${WTF_DIR}/wtf/text"
335     "${WTF_DIR}/wtf/text/icu"
336     "${WTF_DIR}/wtf/threads"
337     "${WTF_DIR}/wtf/unicode"
338 )
339
340 set(WTF_LIBRARIES
341     ${CMAKE_DL_LIBS}
342 )
343
344 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
345     list(APPEND WTF_HEADERS
346         spi/darwin/CommonCryptoSPI.h
347     )
348     list(APPEND WTF_INCLUDE_DIRECTORIES
349         "${WTF_DIR}/wtf/spi/darwin"
350     )
351 endif ()
352
353 if (NOT USE_SYSTEM_MALLOC)
354     list(APPEND WTF_LIBRARIES bmalloc)
355 endif ()
356
357 list(APPEND WTF_SOURCES
358     unicode/icu/CollatorICU.cpp
359 )
360 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
361     ${ICU_INCLUDE_DIRS}
362 )
363 list(APPEND WTF_LIBRARIES
364     ${ICU_DATA_LIBRARIES}
365     ${ICU_I18N_LIBRARIES}
366     ${ICU_LIBRARIES}
367 )
368
369 if (WIN32)
370     list(APPEND WTF_SOURCES
371         OSAllocatorWin.cpp
372         ThreadSpecificWin.cpp
373         ThreadingWin.cpp
374     )
375     list(APPEND WTF_LIBRARIES
376         winmm
377     )
378 else ()
379     list(APPEND WTF_SOURCES
380         OSAllocatorPosix.cpp
381         ThreadingPthreads.cpp
382     )
383 endif ()
384
385 WEBKIT_FRAMEWORK_DECLARE(WTF)
386 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
387
388 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
389 WEBKIT_FRAMEWORK(WTF)
390
391 if (MSVC)
392     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
393     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
394
395     add_custom_command(
396         TARGET WTF
397         PRE_BUILD
398         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_DIR}
399         VERBATIM)
400
401     add_custom_command(
402         TARGET WTF
403         POST_BUILD
404         COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/version-stamp.pl ${DERIVED_SOURCES_DIR} $<TARGET_FILE:WTF>
405         VERBATIM)
406 endif ()
407
408 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/WTF/Scripts)
409
410 file(COPY
411     ../Scripts/generate-unified-source-bundles.rb
412     DESTINATION
413     ${FORWARDING_HEADERS_DIR}/WTF/Scripts
414 )