5ed0c4542d24f15b9686212b6f8207dd57dff836
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_HEADERS
2     ASCIICType.h
3     Assertions.h
4     Atomics.h
5     Bag.h
6     BagToHashMap.h
7     BitVector.h
8     Bitmap.h
9     BumpPointerAllocator.h
10     ByteOrder.h
11     CompilationThread.h
12     Compiler.h
13     Condition.h
14     CryptographicUtilities.h
15     CryptographicallyRandomNumber.h
16     CurrentTime.h
17     DataLog.h
18     DateMath.h
19     Dominators.h
20     DecimalNumber.h
21     DeferrableRefCounted.h
22     Deque.h
23     DisallowCType.h
24     DoublyLinkedList.h
25     FastMalloc.h
26     FeatureDefines.h
27     FilePrintStream.h
28     FlipBytes.h
29     Forward.h
30     FunctionDispatcher.h
31     Functional.h
32     GetPtr.h
33     GraphNodeWorklist.h
34     GregorianDateTime.h
35     HashCountedSet.h
36     Hasher.h
37     HashFunctions.h
38     HashIterators.h
39     HashMap.h
40     HashMethod.h
41     HashSet.h
42     HashTable.h
43     HashTraits.h
44     HexNumber.h
45     IteratorAdaptors.h
46     IteratorRange.h
47     ListHashSet.h
48     Lock.h
49     Locker.h
50     MD5.h
51     MainThread.h
52     MallocPtr.h
53     MathExtras.h
54     MediaTime.h
55     MessageQueue.h
56     MetaAllocator.h
57     MetaAllocatorHandle.h
58     Noncopyable.h
59     NumberOfCores.h
60     OSAllocator.h
61     OSRandomSource.h
62     PageAllocation.h
63     PageBlock.h
64     PageReservation.h
65     ParallelHelperPool.h
66     ParallelJobs.h
67     ParallelJobsGeneric.h
68     ParallelJobsLibdispatch.h
69     ParallelJobsOpenMP.h
70     ParallelVectorIterator.h
71     ParkingLot.h
72     PassRefPtr.h
73     Platform.h
74     PrintStream.h
75     ProcessID.h
76     RAMSize.h
77     RandomNumber.h
78     RandomNumberSeed.h
79     RawPointer.h
80     RedBlackTree.h
81     Ref.h
82     RefCounted.h
83     RefCountedLeakCounter.h
84     RefCounter.h
85     RefPtr.h
86     RetainPtr.h
87     RunLoop.h
88     SHA1.h
89     SharedTask.h
90     SaturatedArithmetic.h
91     ScopedLambda.h
92     SegmentedVector.h
93     StackBounds.h
94     StackStats.h
95     StaticConstructors.h
96     StdLibExtras.h
97     Stopwatch.h
98     StringExtras.h
99     StringPrintStream.h
100     ThreadIdentifierDataPthreads.h
101     ThreadSafeRefCounted.h
102     ThreadSpecific.h
103     Threading.h
104     ThreadingPrimitives.h
105     TinyPtrSet.h
106     VMTags.h
107     ValueCheck.h
108     Vector.h
109     VectorTraits.h
110     WTFThreadData.h
111     WeakPtr.h
112     WordLock.h
113     WorkQueue.h
114     dtoa.h
115
116     dtoa/bignum-dtoa.h
117     dtoa/bignum.h
118     dtoa/cached-powers.h
119     dtoa/diy-fp.h
120     dtoa/double-conversion.h
121     dtoa/double.h
122     dtoa/fast-dtoa.h
123     dtoa/fixed-dtoa.h
124     dtoa/strtod.h
125     dtoa/utils.h
126
127     text/AtomicString.h
128     text/AtomicStringImpl.h
129     text/AtomicStringTable.h
130     text/Base64.h
131     text/CString.h
132     text/IntegerToStringConversion.h
133     text/LChar.h
134     text/StringBuffer.h
135     text/StringCommon.h
136     text/StringHash.h
137     text/StringImpl.h
138     text/StringView.h
139     text/SymbolImpl.h
140     text/SymbolRegistry.h
141     text/UniquedStringImpl.h
142     text/WTFString.h
143
144     threads/BinarySemaphore.h
145
146     unicode/CharacterNames.h
147     unicode/Collator.h
148     unicode/UTF8.h
149 )
150
151 set(WTF_SOURCES
152     Assertions.cpp
153     Atomics.cpp
154     BitVector.cpp
155     CompilationThread.cpp
156     CryptographicUtilities.cpp
157     CryptographicallyRandomNumber.cpp
158     CurrentTime.cpp
159     DataLog.cpp
160     DateMath.cpp
161     DecimalNumber.cpp
162     FastBitVector.cpp
163     FastMalloc.cpp
164     FilePrintStream.cpp
165     FunctionDispatcher.cpp
166     GregorianDateTime.cpp
167     HashTable.cpp
168     Lock.cpp
169     MD5.cpp
170     MainThread.cpp
171     MediaTime.cpp
172     MetaAllocator.cpp
173     NumberOfCores.cpp
174     OSRandomSource.cpp
175     PageBlock.cpp
176     ParallelHelperPool.cpp
177     ParallelJobsGeneric.cpp
178     ParkingLot.cpp
179     PrintStream.cpp
180     RAMSize.cpp
181     RandomNumber.cpp
182     RefCountedLeakCounter.cpp
183     RefCounter.cpp
184     RunLoop.cpp
185     SHA1.cpp
186     SixCharacterHash.cpp
187     StackBounds.cpp
188     StackStats.cpp
189     StringPrintStream.cpp
190     Threading.cpp
191     WTFThreadData.cpp
192     WordLock.cpp
193     WorkQueue.cpp
194     dtoa.cpp
195
196     dtoa/bignum-dtoa.cc
197     dtoa/bignum.cc
198     dtoa/cached-powers.cc
199     dtoa/diy-fp.cc
200     dtoa/double-conversion.cc
201     dtoa/fast-dtoa.cc
202     dtoa/fixed-dtoa.cc
203     dtoa/strtod.cc
204
205     text/AtomicString.cpp
206     text/AtomicStringImpl.cpp
207     text/AtomicStringTable.cpp
208     text/Base64.cpp
209     text/CString.cpp
210     text/StringBuilder.cpp
211     text/StringImpl.cpp
212     text/StringStatics.cpp
213     text/StringView.cpp
214     text/SymbolRegistry.cpp
215     text/WTFString.cpp
216
217     threads/BinarySemaphore.cpp
218
219     unicode/UTF8.cpp
220 )
221
222 set(WTF_INCLUDE_DIRECTORIES
223     "${BMALLOC_DIR}"
224     "${WTF_DIR}"
225     "${WTF_DIR}/wtf"
226     "${WTF_DIR}/wtf/dtoa"
227     "${WTF_DIR}/wtf/text"
228     "${WTF_DIR}/wtf/threads"
229     "${WTF_DIR}/wtf/unicode"
230     "${THIRDPARTY_DIR}"
231     "${CMAKE_BINARY_DIR}"
232     "${DERIVED_SOURCES_DIR}"
233 )
234
235 set(WTF_LIBRARIES
236     ${CMAKE_DL_LIBS}
237 )
238
239 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
240     list(APPEND WTF_HEADERS
241         spi/darwin/CommonCryptoSPI.h
242     )
243     list(APPEND WTF_INCLUDE_DIRECTORIES
244         "${WTF_DIR}/wtf/spi/darwin"
245     )
246 endif ()
247
248 # FIXME: Port bmalloc to Windows. https://bugs.webkit.org/show_bug.cgi?id=143310
249 if (NOT WIN32)
250     list(APPEND WTF_LIBRARIES bmalloc)
251 endif ()
252
253 list(APPEND WTF_SOURCES
254     unicode/icu/CollatorICU.cpp
255 )
256 set(WTF_SYSTEM_INCLUDE_DIRECTORIES
257     ${ICU_INCLUDE_DIRS}
258 )
259 list(APPEND WTF_LIBRARIES
260     ${ICU_I18N_LIBRARIES}
261     ${ICU_LIBRARIES}
262 )
263
264 if (WIN32)
265     list(APPEND WTF_SOURCES
266         OSAllocatorWin.cpp
267         ThreadSpecificWin.cpp
268         ThreadingWin.cpp
269     )
270 else ()
271     list(APPEND WTF_HEADERS
272         ThreadIdentifierDataPthreads.h
273     )
274     list(APPEND WTF_SOURCES
275         OSAllocatorPosix.cpp
276         ThreadIdentifierDataPthreads.cpp
277         ThreadingPthreads.cpp
278     )
279 endif ()
280
281 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
282
283 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
284 include_directories(${WTF_INCLUDE_DIRECTORIES})
285 include_directories(SYSTEM ${WTF_SYSTEM_INCLUDE_DIRECTORIES})
286 add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
287 target_link_libraries(WTF ${WTF_LIBRARIES})
288 set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
289 set_target_properties(WTF PROPERTIES FOLDER "JavaScriptCore")
290
291 if (MSVC)
292     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
293     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
294 endif ()
295
296 if (WTF_POST_BUILD_COMMAND)
297     add_custom_command(TARGET WTF POST_BUILD COMMAND ${WTF_POST_BUILD_COMMAND} VERBATIM)
298 endif ()
299
300 if (WTF_OUTPUT_NAME)
301     set_target_properties(WTF PROPERTIES OUTPUT_NAME ${WTF_OUTPUT_NAME})
302 endif ()
303
304 WEBKIT_FRAMEWORK(WTF)