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