[CMake] Share build system options across ports
[WebKit-https.git] / Source / WTF / wtf / CMakeLists.txt
1 SET(WTF_HEADERS
2     ASCIICType.h
3     AVLTree.h
4     Alignment.h
5     AlwaysInline.h
6     Assertions.h
7     Atomics.h
8     BitVector.h
9     Bitmap.h
10     BoundsCheckedPointer.h
11     BumpPointerAllocator.h
12     ByteArray.h
13     Compiler.h
14     Complex.h
15     CryptographicallyRandomNumber.h
16     CurrentTime.h
17     DateMath.h
18     DataLog.h
19     DecimalNumber.h
20     Decoder.h
21     Deque.h
22     DisallowCType.h
23     DoublyLinkedList.h
24     DynamicAnnotations.h
25     Encoder.h
26     FastAllocBase.h
27     FastMalloc.h
28     FixedArray.h
29     Forward.h
30     GetPtr.h
31     HashCountedSet.h
32     HashFunctions.h
33     HashIterators.h
34     HashMap.h
35     HashSet.h
36     HashTable.h
37     HashTraits.h
38     HexNumber.h
39     ListHashSet.h
40     ListRefPtr.h
41     Locker.h
42     MD5.h
43     MainThread.h
44     MallocZoneSupport.h
45     MathExtras.h
46     MessageQueue.h
47     MetaAllocator.h
48     MetaAllocatorHandle.h
49     NonCopyingSort.h
50     ThreadRestrictionVerifier.h
51     Noncopyable.h
52     NotFound.h
53     NullPtr.h
54     NumberOfCores.h
55     OSAllocator.h
56     OSRandomSource.h
57     OwnArrayPtr.h
58     OwnPtr.h
59     OwnPtrCommon.h
60     PageAllocation.h
61     PageAllocationAligned.h
62     PageBlock.h
63     PageReservation.h
64     PassOwnArrayPtr.h
65     PassOwnPtr.h
66     PassRefPtr.h
67     PassTraits.h
68     ParallelJobs.h
69     ParallelJobsGeneric.h
70     ParallelJobsLibdispatch.h
71     ParallelJobsOpenMP.h
72     Platform.h
73     PossiblyNull.h
74     RandomNumber.h
75     RandomNumberSeed.h
76     RedBlackTree.h
77     RefCounted.h
78     RefCountedLeakCounter.h
79     RefPtr.h
80     RefPtrHashMap.h
81     RetainPtr.h
82     SegmentedVector.h
83     SHA1.h
84     StackBounds.h
85     StaticConstructors.h
86     StdLibExtras.h
87     StringExtras.h
88     StringHasher.h
89     TCPackedCache.h
90     TCPageMap.h
91     TCSpinLock.h
92     TCSystemAlloc.h
93     ThreadIdentifierDataPthreads.h
94     ThreadSafeRefCounted.h
95     ThreadSpecific.h
96     Threading.h
97     ThreadingPrimitives.h
98     TypeTraits.h
99     UnusedParam.h
100     VMTags.h
101     ValueCheck.h
102     Vector.h
103     VectorTraits.h
104     WTFThreadData.h
105     dtoa.h
106
107     dtoa/bignum-dtoa.h
108     dtoa/bignum.h
109     dtoa/cached-powers.h
110     dtoa/diy-fp.h
111     dtoa/double-conversion.h
112     dtoa/double.h
113     dtoa/fast-dtoa.h
114     dtoa/fixed-dtoa.h
115     dtoa/strtod.h
116     dtoa/utils.h
117
118     text/AtomicString.h
119     text/AtomicStringImpl.h
120     text/CString.h
121     text/StringBuffer.h
122     text/StringHash.h
123     text/StringImpl.h
124     text/WTFString.h
125
126     threads/BinarySemaphore.h
127
128     unicode/CharacterNames.h
129     unicode/Collator.h
130     unicode/UTF8.h
131     unicode/Unicode.h
132 )
133
134 SET(WTF_SOURCES
135     ArrayBuffer.cpp
136     ArrayBufferView.cpp
137     Assertions.cpp
138     BitVector.cpp
139     ByteArray.cpp
140     CryptographicallyRandomNumber.cpp
141     CurrentTime.cpp
142     DateMath.cpp
143     DataLog.cpp
144     DecimalNumber.cpp
145     DynamicAnnotations.cpp
146     FastMalloc.cpp
147     HashTable.cpp
148     MD5.cpp
149     MainThread.cpp
150     MetaAllocator.cpp
151     OSRandomSource.cpp
152     NumberOfCores.cpp
153     PageAllocationAligned.cpp
154     PageBlock.cpp
155     ParallelJobsGeneric.cpp
156     RandomNumber.cpp
157     RefCountedLeakCounter.cpp
158     SHA1.cpp
159     StackBounds.cpp
160     StringExtras.cpp
161     Threading.cpp
162     TypeTraits.cpp
163     WTFThreadData.cpp
164     dtoa.cpp
165
166     dtoa/bignum-dtoa.cc
167     dtoa/bignum.cc
168     dtoa/cached-powers.cc
169     dtoa/diy-fp.cc
170     dtoa/double-conversion.cc
171     dtoa/fast-dtoa.cc
172     dtoa/fixed-dtoa.cc
173     dtoa/strtod.cc
174
175     text/AtomicString.cpp
176     text/CString.cpp
177     text/StringBuilder.cpp
178     text/StringImpl.cpp
179     text/StringStatics.cpp
180     text/WTFString.cpp
181
182     threads/BinarySemaphore.cpp
183
184     unicode/UTF8.cpp
185 )
186
187 SET(WTF_INCLUDE_DIRECTORIES
188     "${WTF_DIR}"
189     "${WTF_DIR}/wtf"
190     "${WTF_DIR}/wtf/unicode"
191     "${WTF_DIR}/wtf/dtoa"
192     "${THIRDPARTY_DIR}"
193     "${CMAKE_BINARY_DIR}"
194 )
195
196 IF (USE_SYSTEM_MALLOC)
197     ADD_DEFINITIONS(-DUSE_SYSTEM_MALLOC=1)
198 ELSE ()
199     LIST(APPEND WTF_SOURCES
200         TCSystemAlloc.cpp
201     )
202 ENDIF()
203
204 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
205
206 WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
207 INCLUDE_DIRECTORIES(${WTF_INCLUDE_DIRECTORIES})
208 ADD_DEFINITIONS(-DBUILDING_WTF)
209 ADD_LIBRARY(${WTF_LIBRARY_NAME} STATIC ${WTF_HEADERS} ${WTF_SOURCES})
210 TARGET_LINK_LIBRARIES(${WTF_LIBRARY_NAME} ${WTF_LIBRARIES})
211
212 IF (WTF_LINK_FLAGS)
213     ADD_TARGET_PROPERTIES(${WTF_LIBRARY_NAME} LINK_FLAGS "${WTF_LINK_FLAGS}")
214 ENDIF ()