Make the new WTF module build on Qt
[WebKit-https.git] / Source / WTF / WTF.pro
1 # -------------------------------------------------------------------
2 # Project file for WTF
3 #
4 # See 'Tools/qmake/README' for an overview of the build system
5 # -------------------------------------------------------------------
6 TEMPLATE = lib
7 TARGET = WTF
8
9 include(WTF.pri)
10
11 CONFIG += staticlib
12
13 VPATH += $$PWD/../JavaScriptCore/wtf
14
15 HEADERS += \
16     Alignment.h \
17     AlwaysInline.h \
18     ArrayBuffer.h \
19     ArrayBufferView.h \
20     ASCIICType.h \
21     Assertions.h \
22     Atomics.h \
23     AVLTree.h \
24     Bitmap.h \
25     BitVector.h \
26     BloomFilter.h \
27     BoundsCheckedPointer.h \
28     BumpPointerAllocator.h \
29     ByteArray.h \
30     CheckedArithmetic.h \
31     Compiler.h \
32     CryptographicallyRandomNumber.h \
33     CurrentTime.h \
34     DateMath.h \
35     DecimalNumber.h \
36     Decoder.h \
37     Deque.h \
38     DisallowCType.h \
39     dtoa.h \
40     dtoa/bignum-dtoa.h \
41     dtoa/bignum.h \
42     dtoa/cached-powers.h \
43     dtoa/diy-fp.h \
44     dtoa/double-conversion.h \
45     dtoa/double.h \
46     dtoa/fast-dtoa.h \
47     dtoa/fixed-dtoa.h \
48     dtoa/strtod.h \
49     dtoa/utils.h \
50     DynamicAnnotations.h \
51     Encoder.h \
52     FastAllocBase.h \
53     FastMalloc.h \
54     FixedArray.h \
55     Float32Array.h \
56     Float64Array.h \
57     Forward.h \
58     Functional.h \
59     GetPtr.h \
60     HashCountedSet.h \
61     HashFunctions.h \
62     HashIterators.h \
63     HashMap.h \
64     HashSet.h \
65     HashTable.h \
66     HashTraits.h \
67     HexNumber.h \
68     Int16Array.h \
69     Int32Array.h \
70     Int8Array.h \
71     ListHashSet.h \
72     ListRefPtr.h \
73     Locker.h \
74     MainThread.h \
75     MallocZoneSupport.h \
76     MathExtras.h \
77     MD5.h \
78     MessageQueue.h \
79     MetaAllocator.h \
80     MetaAllocatorHandle.h \
81     Noncopyable.h \
82     NonCopyingSort.h \
83     NotFound.h \
84     NullPtr.h \
85     OSAllocator.h \
86     OSRandomSource.h \
87     OwnArrayPtr.h \
88     OwnPtr.h \
89     OwnPtrCommon.h \
90     PackedIntVector.h \
91     PageAllocation.h \
92     PageAllocationAligned.h \
93     PageBlock.h \
94     PageReservation.h \
95     ParallelJobs.h \
96     ParallelJobsGeneric.h \
97     ParallelJobsLibdispatch.h \
98     ParallelJobsOpenMP.h \
99     PassOwnArrayPtr.h \
100     PassOwnPtr.h \
101     PassRefPtr.h \
102     PassTraits.h \
103     Platform.h \
104     PossiblyNull.h \
105     qt/UtilsQt.h \
106     RandomNumber.h \
107     RandomNumberSeed.h \
108     RedBlackTree.h \
109     RefCounted.h \
110     RefCountedLeakCounter.h \
111     RefPtr.h \
112     RefPtrHashMap.h \
113     RetainPtr.h \
114     SHA1.h \
115     Spectrum.h \
116     StackBounds.h \
117     StaticConstructors.h \
118     StdLibExtras.h \
119     StringExtras.h \
120     StringHasher.h \
121     TCPackedCache.h \
122     TCSpinLock.h \
123     TCSystemAlloc.h \
124     text/ASCIIFastPath.h \
125     text/AtomicString.h \
126     text/AtomicStringHash.h \
127     text/AtomicStringImpl.h \
128     text/CString.h \
129     text/StringBuffer.h \
130     text/StringBuilder.h \
131     text/StringConcatenate.h \
132     text/StringHash.h \
133     text/StringImpl.h \
134     text/StringOperators.h \
135     text/TextPosition.h \
136     text/WTFString.h \
137     Threading.h \
138     ThreadingPrimitives.h \
139     ThreadRestrictionVerifier.h \
140     ThreadSafeRefCounted.h \
141     ThreadSpecific.h \
142     TypeTraits.h \
143     Uint16Array.h \
144     Uint32Array.h \
145     Uint8Array.h \
146     unicode/CharacterNames.h \
147     unicode/Collator.h \
148     unicode/icu/UnicodeIcu.h \
149     unicode/qt4/UnicodeQt4.h \
150     unicode/ScriptCodesFromICU.h \
151     unicode/Unicode.h \
152     unicode/UnicodeMacrosFromICU.h \
153     unicode/UTF8.h \
154     UnusedParam.h \
155     ValueCheck.h \
156     Vector.h \
157     VectorTraits.h \
158     VMTags.h \
159     WTFThreadData.h
160
161 unix: HEADERS += ThreadIdentifierDataPthreads.h
162
163 SOURCES += \
164     ArrayBuffer.cpp \
165     ArrayBufferView.cpp \
166     Assertions.cpp \
167     BitVector.cpp \
168     ByteArray.cpp \
169     CryptographicallyRandomNumber.cpp \
170     CurrentTime.cpp \
171     DateMath.cpp \
172     DecimalNumber.cpp \
173     dtoa.cpp \
174     dtoa/bignum-dtoa.cc \
175     dtoa/bignum.cc \
176     dtoa/cached-powers.cc \
177     dtoa/diy-fp.cc \
178     dtoa/double-conversion.cc \
179     dtoa/fast-dtoa.cc \
180     dtoa/fixed-dtoa.cc \
181     dtoa/strtod.cc \
182     FastMalloc.cpp \
183     gobject/GOwnPtr.cpp \
184     gobject/GRefPtr.cpp \
185     HashTable.cpp \
186     MD5.cpp \
187     MainThread.cpp \
188     MetaAllocator.cpp \
189     NullPtr.cpp \
190     OSRandomSource.cpp \
191     qt/MainThreadQt.cpp \
192     qt/StringQt.cpp \
193     PageAllocationAligned.cpp \
194     PageBlock.cpp \
195     ParallelJobsGeneric.cpp \
196     RandomNumber.cpp \
197     RefCountedLeakCounter.cpp \
198     SHA1.cpp \
199     StackBounds.cpp \
200     TCSystemAlloc.cpp \
201     Threading.cpp \
202     TypeTraits.cpp \
203     WTFThreadData.cpp \
204     text/AtomicString.cpp \
205     text/CString.cpp \
206     text/StringBuilder.cpp \
207     text/StringImpl.cpp \
208     text/StringStatics.cpp \
209     text/WTFString.cpp \
210     unicode/CollatorDefault.cpp \
211     unicode/icu/CollatorICU.cpp \
212     unicode/UTF8.cpp
213
214 unix: SOURCES += \
215     OSAllocatorPosix.cpp \
216     ThreadIdentifierDataPthreads.cpp \
217     ThreadingPthreads.cpp
218
219 win*|wince*: SOURCES += \
220     OSAllocatorWin.cpp \
221     ThreadSpecificWin.cpp \
222     ThreadingWin.cpp
223
224
225 QT += core
226 QT -= gui
227
228 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2
229 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3
230
231 *sh4* {
232     QMAKE_CXXFLAGS += -mieee -w
233     QMAKE_CFLAGS   += -mieee -w
234 }
235
236 lessThan(QT_GCC_MAJOR_VERSION, 5) {
237     # GCC 4.5 and before
238     lessThan(QT_GCC_MINOR_VERSION, 6) {
239         # Disable C++0x mode in JSC for those who enabled it in their Qt's mkspec.
240         *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
241     }
242
243     # GCC 4.6 and after.
244     greaterThan(QT_GCC_MINOR_VERSION, 5) {
245         if (!contains(QMAKE_CXXFLAGS, -std=c++0x) && !contains(QMAKE_CXXFLAGS, -std=gnu++0x)) {
246             # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr).
247             QMAKE_CFLAGS_WARN_ON += -Wno-c++0x-compat
248             QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat
249             QMAKE_CFLAGS += -Wno-c++0x-compat
250             QMAKE_CXXFLAGS += -Wno-c++0x-compat
251         }
252     }
253 }
254