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