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