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