Progress towards CMake on Windows and Mac.
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 set(WTF_HEADERS
2     ASCIICType.h
3     AVLTree.h
4     Assertions.h
5     Atomics.h
6     Bag.h
7     BagToHashMap.h
8     BitVector.h
9     Bitmap.h
10     BoundsCheckedPointer.h
11     BumpPointerAllocator.h
12     ByteOrder.h
13     CompilationThread.h
14     Compiler.h
15     CryptographicUtilities.h
16     CryptographicallyRandomNumber.h
17     CurrentTime.h
18     DataLog.h
19     DateMath.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     GregorianDateTime.h
34     HashCountedSet.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     Locker.h
47     MD5.h
48     MainThread.h
49     MallocPtr.h
50     MathExtras.h
51     MediaTime.h
52     MessageQueue.h
53     MetaAllocator.h
54     MetaAllocatorHandle.h
55     Noncopyable.h
56     NumberOfCores.h
57     OSAllocator.h
58     OSRandomSource.h
59     OwnPtr.h
60     OwnPtrCommon.h
61     PageAllocation.h
62     PageBlock.h
63     PageReservation.h
64     ParallelJobs.h
65     ParallelJobsGeneric.h
66     ParallelJobsLibdispatch.h
67     ParallelJobsOpenMP.h
68     PassOwnPtr.h
69     PassRef.h
70     PassRefPtr.h
71     Platform.h
72     PrintStream.h
73     ProcessID.h
74     RAMSize.h
75     RandomNumber.h
76     RandomNumberSeed.h
77     RawPointer.h
78     RedBlackTree.h
79     Ref.h
80     RefCounted.h
81     RefCountedLeakCounter.h
82     RefCounter.h
83     RefPtr.h
84     RetainPtr.h
85     RunLoop.h
86     SHA1.h
87     SaturatedArithmetic.h
88     SegmentedVector.h
89     SpinLock.h
90     StackBounds.h
91     StackStats.h
92     StaticConstructors.h
93     StdLibExtras.h
94     Stopwatch.h
95     StringExtras.h
96     StringHasher.h
97     StringPrintStream.h
98     ThreadIdentifierDataPthreads.h
99     ThreadSafeRefCounted.h
100     ThreadSpecific.h
101     Threading.h
102     ThreadingPrimitives.h
103     VMTags.h
104     ValueCheck.h
105     Vector.h
106     VectorTraits.h
107     WTFThreadData.h
108     WorkQueue.h
109     WeakPtr.h
110     dtoa.h
111
112     dtoa/bignum-dtoa.h
113     dtoa/bignum.h
114     dtoa/cached-powers.h
115     dtoa/diy-fp.h
116     dtoa/double-conversion.h
117     dtoa/double.h
118     dtoa/fast-dtoa.h
119     dtoa/fixed-dtoa.h
120     dtoa/strtod.h
121     dtoa/utils.h
122
123     text/AtomicString.h
124     text/AtomicStringImpl.h
125     text/AtomicStringTable.h
126     text/Base64.h
127     text/CString.h
128     text/IntegerToStringConversion.h
129     text/LChar.h
130     text/StringBuffer.h
131     text/StringCommon.h
132     text/StringHash.h
133     text/StringImpl.h
134     text/StringView.h
135     text/WTFString.h
136
137     threads/BinarySemaphore.h
138
139     unicode/CharacterNames.h
140     unicode/Collator.h
141     unicode/UTF8.h
142 )
143
144 set(WTF_SOURCES
145     Assertions.cpp
146     Atomics.cpp
147     BitVector.cpp
148     CompilationThread.cpp
149     CryptographicUtilities.cpp
150     CryptographicallyRandomNumber.cpp
151     CurrentTime.cpp
152     DataLog.cpp
153     DateMath.cpp
154     DecimalNumber.cpp
155     FastBitVector.cpp
156     FastMalloc.cpp
157     FilePrintStream.cpp
158     FunctionDispatcher.cpp
159     GregorianDateTime.cpp
160     HashTable.cpp
161     MD5.cpp
162     MainThread.cpp
163     MediaTime.cpp
164     MetaAllocator.cpp
165     NumberOfCores.cpp
166     OSRandomSource.cpp
167     PageBlock.cpp
168     ParallelJobsGeneric.cpp
169     PrintStream.cpp
170     RAMSize.cpp
171     RandomNumber.cpp
172     RefCountedLeakCounter.cpp
173     RefCounter.cpp
174     RunLoop.cpp
175     SHA1.cpp
176     SixCharacterHash.cpp
177     StackStats.cpp
178     StackBounds.cpp
179     StringPrintStream.cpp
180     Threading.cpp
181     WTFThreadData.cpp
182     WorkQueue.cpp
183     dtoa.cpp
184
185     dtoa/bignum-dtoa.cc
186     dtoa/bignum.cc
187     dtoa/cached-powers.cc
188     dtoa/diy-fp.cc
189     dtoa/double-conversion.cc
190     dtoa/fast-dtoa.cc
191     dtoa/fixed-dtoa.cc
192     dtoa/strtod.cc
193
194     text/AtomicString.cpp
195     text/AtomicStringTable.cpp
196     text/Base64.cpp
197     text/CString.cpp
198     text/StringBuilder.cpp
199     text/StringImpl.cpp
200     text/StringStatics.cpp
201     text/StringView.cpp
202     text/WTFString.cpp
203
204     threads/BinarySemaphore.cpp
205
206     unicode/UTF8.cpp
207 )
208
209 set(WTF_INCLUDE_DIRECTORIES
210     "${BMALLOC_DIR}"
211     "${WTF_DIR}"
212     "${WTF_DIR}/wtf"
213     "${WTF_DIR}/wtf/dtoa"
214     "${WTF_DIR}/wtf/text"
215     "${WTF_DIR}/wtf/threads"
216     "${WTF_DIR}/wtf/unicode"
217     "${THIRDPARTY_DIR}"
218     "${CMAKE_BINARY_DIR}"
219     "${DERIVED_SOURCES_DIR}"
220 )
221
222 set(WTF_LIBRARIES
223     ${CMAKE_DL_LIBS}
224 )
225
226 # FIXME: Port bmalloc to Windows. https://bugs.webkit.org/show_bug.cgi?id=143310
227 if (NOT WIN32)
228     list(APPEND WTF_LIBRARIES bmalloc)
229 endif ()
230
231 list(APPEND WTF_SOURCES
232     unicode/icu/CollatorICU.cpp
233 )
234 list(APPEND WTF_INCLUDE_DIRECTORIES
235     ${ICU_INCLUDE_DIRS}
236 )
237 list(APPEND WTF_LIBRARIES
238     ${ICU_I18N_LIBRARIES}
239     ${ICU_LIBRARIES}
240 )
241
242 if (WIN32)
243     list(APPEND WTF_SOURCES
244         OSAllocatorWin.cpp
245         ThreadSpecificWin.cpp
246         ThreadingWin.cpp
247     )
248 else ()
249     list(APPEND WTF_HEADERS
250         ThreadIdentifierDataPthreads.h
251     )
252     list(APPEND WTF_SOURCES
253         OSAllocatorPosix.cpp
254         ThreadIdentifierDataPthreads.cpp
255         ThreadingPthreads.cpp
256     )
257 endif ()
258
259 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
260
261 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
262 include_directories(${WTF_INCLUDE_DIRECTORIES})
263 add_library(WTF ${WTF_LIBRARY_TYPE} ${WTF_HEADERS} ${WTF_SOURCES})
264 target_link_libraries(WTF ${WTF_LIBRARIES})
265 set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
266 set_target_properties(WTF PROPERTIES FOLDER "JavaScriptCore")
267
268 if (WTF_OUTPUT_NAME)
269     set_target_properties(WTF PROPERTIES OUTPUT_NAME ${WTF_OUTPUT_NAME})
270 endif ()