Add PassRef and createRefCounted so we can improve creation of RefCounted objects
[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     BitArray.h
7     BitVector.h
8     Bitmap.h
9     BoundsCheckedPointer.h
10     BumpPointerAllocator.h
11     ByteOrder.h
12     CompilationThread.h
13     Compiler.h
14     Compression.h
15     CryptographicallyRandomNumber.h
16     CurrentTime.h
17     DataLog.h
18     DateMath.h
19     DecimalNumber.h
20     Decoder.h
21     DeferrableRefCounted.h
22     Deque.h
23     DisallowCType.h
24     DoublyLinkedList.h
25     DynamicAnnotations.h
26     Encoder.h
27     FastMalloc.h
28     FeatureDefines.h
29     FilePrintStream.h
30     FixedArray.h
31     FlipBytes.h
32     Forward.h
33     FunctionDispatcher.h
34     Functional.h
35     GetPtr.h
36     GregorianDateTime.h
37     HashCountedSet.h
38     HashFunctions.h
39     HashIterators.h
40     HashMap.h
41     HashSet.h
42     HashTable.h
43     HashTraits.h
44     HexNumber.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     PageAllocationAligned.h
63     PageBlock.h
64     PageReservation.h
65     ParallelJobs.h
66     ParallelJobsGeneric.h
67     ParallelJobsLibdispatch.h
68     ParallelJobsOpenMP.h
69     PassOwnPtr.h
70     PassRef.h
71     PassRefPtr.h
72     Platform.h
73     PossiblyNull.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     RefPtr.h
85     RefPtrHashMap.h
86     RetainPtr.h
87     SHA1.h
88     SaturatedArithmetic.h
89     SegmentedVector.h
90     StackBounds.h
91     StaticConstructors.h
92     StdLibExtras.h
93     StringExtras.h
94     StringHasher.h
95     StringPrintStream.h
96     TCPackedCache.h
97     TCPageMap.h
98     TCSpinLock.h
99     TCSystemAlloc.h
100     ThreadIdentifierDataPthreads.h
101     ThreadRestrictionVerifier.h
102     ThreadSafeRefCounted.h
103     ThreadSpecific.h
104     Threading.h
105     ThreadingPrimitives.h
106     VMTags.h
107     ValueCheck.h
108     Vector.h
109     VectorTraits.h
110     WTFThreadData.h
111     WeakPtr.h
112     dtoa.h
113
114     dtoa/bignum-dtoa.h
115     dtoa/bignum.h
116     dtoa/cached-powers.h
117     dtoa/diy-fp.h
118     dtoa/double-conversion.h
119     dtoa/double.h
120     dtoa/fast-dtoa.h
121     dtoa/fixed-dtoa.h
122     dtoa/strtod.h
123     dtoa/utils.h
124
125     text/AtomicString.h
126     text/AtomicStringImpl.h
127     text/AtomicStringTable.h
128     text/Base64.h
129     text/CString.h
130     text/IntegerToStringConversion.h
131     text/StringBuffer.h
132     text/StringHash.h
133     text/StringImpl.h
134     text/WTFString.h
135
136     threads/BinarySemaphore.h
137
138     unicode/CharacterNames.h
139     unicode/Collator.h
140     unicode/UTF8.h
141     unicode/Unicode.h
142 )
143
144 set(WTF_SOURCES
145     Assertions.cpp
146     Atomics.cpp
147     BitVector.cpp
148     CompilationThread.cpp
149     Compression.cpp
150     CryptographicallyRandomNumber.cpp
151     CurrentTime.cpp
152     DataLog.cpp
153     DateMath.cpp
154     DecimalNumber.cpp
155     DynamicAnnotations.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     PageAllocationAligned.cpp
168     PageBlock.cpp
169     ParallelJobsGeneric.cpp
170     PrintStream.cpp
171     RAMSize.cpp
172     RandomNumber.cpp
173     RefCountedLeakCounter.cpp
174     SHA1.cpp
175     SixCharacterHash.cpp
176     StackBounds.cpp
177     StringPrintStream.cpp
178     TCSystemAlloc.cpp
179     Threading.cpp
180     WTFThreadData.cpp
181     dtoa.cpp
182
183     dtoa/bignum-dtoa.cc
184     dtoa/bignum.cc
185     dtoa/cached-powers.cc
186     dtoa/diy-fp.cc
187     dtoa/double-conversion.cc
188     dtoa/fast-dtoa.cc
189     dtoa/fixed-dtoa.cc
190     dtoa/strtod.cc
191
192     text/AtomicString.cpp
193     text/AtomicStringTable.cpp
194     text/Base64.cpp
195     text/CString.cpp
196     text/StringBuilder.cpp
197     text/StringImpl.cpp
198     text/StringStatics.cpp
199     text/WTFString.cpp
200
201     threads/BinarySemaphore.cpp
202
203     unicode/UTF8.cpp
204 )
205
206 set(WTF_INCLUDE_DIRECTORIES
207     "${WTF_DIR}"
208     "${WTF_DIR}/wtf"
209     "${WTF_DIR}/wtf/dtoa"
210     "${WTF_DIR}/wtf/threads"
211     "${WTF_DIR}/wtf/unicode"
212     "${THIRDPARTY_DIR}"
213     "${CMAKE_BINARY_DIR}"
214 )
215
216 set(WTF_LIBRARIES
217     ${CMAKE_DL_LIBS}
218 )
219
220 if (WTF_USE_ICU_UNICODE)
221     list(APPEND WTF_HEADERS
222         unicode/icu/UnicodeIcu.h
223     )
224     list(APPEND WTF_SOURCES
225         unicode/icu/CollatorICU.cpp
226     )
227     list(APPEND WTF_INCLUDE_DIRECTORIES
228         ${ICU_INCLUDE_DIRS}
229     )
230     list(APPEND WTF_LIBRARIES
231         ${ICU_I18N_LIBRARIES}
232         ${ICU_LIBRARIES}
233     )
234 elseif (WTF_USE_WCHAR_UNICODE)
235     list(APPEND WTF_HEADERS
236         unicode/wchar/UnicodeWchar.h
237     )
238     list(APPEND WTF_SOURCES
239         unicode/CollatorDefault.cpp
240
241         unicode/wchar/UnicodeWchar.cpp
242     )
243 endif ()
244
245 if (WIN32)
246     list(APPEND WTF_SOURCES
247         OSAllocatorWin.cpp
248         ThreadSpecificWin.cpp
249         ThreadingWin.cpp
250     )
251 else ()
252     list(APPEND WTF_HEADERS
253         ThreadIdentifierDataPthreads.h
254     )
255     list(APPEND WTF_SOURCES
256         OSAllocatorPosix.cpp
257         ThreadIdentifierDataPthreads.cpp
258         ThreadingPthreads.cpp
259     )
260 endif ()
261
262 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
263
264 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
265 include_directories(${WTF_INCLUDE_DIRECTORIES})
266 add_library(WTF STATIC ${WTF_HEADERS} ${WTF_SOURCES})
267 target_link_libraries(WTF ${WTF_LIBRARIES})
268 set_target_properties(WTF PROPERTIES COMPILE_DEFINITIONS "BUILDING_WTF")
269 set_target_properties(WTF PROPERTIES FOLDER "JavaScriptCore")
270
271 if (WTF_OUTPUT_NAME)
272     set_target_properties(WTF PROPERTIES OUTPUT_NAME ${WTF_OUTPUT_NAME})
273 endif ()