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