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