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