[Win][IndexedDB] Fix build errors.
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
1 add_definitions(/bigobj)
2
3 list(APPEND WebCore_INCLUDE_DIRECTORIES
4     "${CMAKE_BINARY_DIR}/../include/private"
5     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
6     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
7     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/KHR"
8     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
9     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/ForwardingHeaders"
10     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/API"
11     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/assembler"
12     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/builtins"
13     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecode"
14     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecompiler"
15     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/dfg"
16     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/disassembler"
17     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/heap"
18     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/debugger"
19     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/interpreter"
20     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/jit"
21     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/llint"
22     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/parser"
23     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/profiler"
24     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/runtime"
25     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/yarr"
26     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WTF"
27     "${WEBCORE_DIR}/ForwardingHeaders"
28     "${WEBCORE_DIR}/accessibility/win"
29     "${WEBCORE_DIR}/page/win"
30     "${WEBCORE_DIR}/platform/cf"
31     "${WEBCORE_DIR}/platform/cf/win"
32     "${WEBCORE_DIR}/platform/graphics/egl"
33     "${WEBCORE_DIR}/platform/graphics/opengl"
34     "${WEBCORE_DIR}/platform/graphics/opentype"
35     "${WEBCORE_DIR}/platform/graphics/win"
36     "${WEBCORE_DIR}/platform/network/win"
37     "${WEBCORE_DIR}/platform/win"
38     "${WEBCORE_DIR}/plugins/win"
39     "${THIRDPARTY_DIR}/ANGLE/include"
40     "${THIRDPARTY_DIR}/ANGLE/include/egl"
41 )
42
43 list(APPEND WebCore_SOURCES
44     accessibility/win/AXObjectCacheWin.cpp
45     accessibility/win/AccessibilityObjectWin.cpp
46     accessibility/win/AccessibilityObjectWrapperWin.cpp
47
48     editing/SmartReplaceCF.cpp
49     editing/win/EditorWin.cpp
50
51     html/HTMLSelectElementWin.cpp
52
53     loader/archive/cf/LegacyWebArchive.cpp
54
55     page/win/DragControllerWin.cpp
56     page/win/EventHandlerWin.cpp
57     page/win/FrameWin.cpp
58
59     platform/Cursor.cpp
60     platform/KillRingNone.cpp
61     platform/LocalizedStrings.cpp
62     platform/VNodeTracker.cpp
63
64     platform/audio/PlatformMediaSessionManager.cpp
65
66     platform/cf/CFURLExtras.cpp
67     platform/cf/FileSystemCF.cpp
68     platform/cf/KeyedDecoderCF.cpp
69     platform/cf/KeyedEncoderCF.cpp
70     platform/cf/SharedBufferCF.cpp
71     platform/cf/URLCF.cpp
72
73     platform/cf/win/CertificateCFWin.cpp
74
75     platform/crypto/win/CryptoDigestWin.cpp
76
77     platform/graphics/FontPlatformData.cpp
78     platform/graphics/GraphicsContext3DPrivate.cpp
79
80     platform/graphics/egl/GLContextEGL.cpp
81
82     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
83     platform/graphics/opengl/Extensions3DOpenGLES.cpp
84     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
85     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
86     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
87
88     platform/graphics/opentype/OpenTypeUtilities.cpp
89
90     platform/graphics/win/DIBPixelData.cpp
91     platform/graphics/win/FontCacheWin.cpp
92     platform/graphics/win/FontPlatformDataWin.cpp
93     platform/graphics/win/FontWin.cpp
94     platform/graphics/win/FullScreenController.cpp
95     platform/graphics/win/GraphicsContextWin.cpp
96     platform/graphics/win/IconWin.cpp
97     platform/graphics/win/ImageWin.cpp
98     platform/graphics/win/IntPointWin.cpp
99     platform/graphics/win/IntRectWin.cpp
100     platform/graphics/win/IntSizeWin.cpp
101     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
102     platform/graphics/win/SimpleFontDataWin.cpp
103     platform/graphics/win/TransformationMatrixWin.cpp
104     platform/graphics/win/UniscribeController.cpp
105
106     platform/network/win/DownloadBundleWin.cpp
107     platform/network/win/NetworkStateNotifierWin.cpp
108
109     platform/text/LocaleNone.cpp
110
111     platform/text/cf/HyphenationCF.cpp
112
113     platform/text/win/TextBreakIteratorInternalICUWin.cpp
114
115     platform/win/BString.cpp
116     platform/win/BitmapInfo.cpp
117     platform/win/ClipboardUtilitiesWin.cpp
118     platform/win/CursorWin.cpp
119     platform/win/DefWndProcWindowClass.cpp
120     platform/win/DragDataWin.cpp
121     platform/win/DragImageWin.cpp
122     platform/win/EventLoopWin.cpp
123     platform/win/FileSystemWin.cpp
124     platform/win/GDIObjectCounter.cpp
125     platform/win/GDIUtilities.cpp
126     platform/win/KeyEventWin.cpp
127     platform/win/LanguageWin.cpp
128     platform/win/LocalizedStringsWin.cpp
129     platform/win/LoggingWin.cpp
130     platform/win/MemoryPressureHandlerWin.cpp
131     platform/win/MIMETypeRegistryWin.cpp
132     platform/win/MainThreadSharedTimerWin.cpp
133     platform/win/PasteboardWin.cpp
134     platform/win/PathWalker.cpp
135     platform/win/PlatformMouseEventWin.cpp
136     platform/win/PlatformScreenWin.cpp
137     platform/win/PopupMenuWin.cpp
138     platform/win/SSLKeyGeneratorWin.cpp
139     platform/win/ScrollbarThemeWin.cpp
140     platform/win/SearchPopupMenuWin.cpp
141     platform/win/SharedBufferWin.cpp
142     platform/win/SoundWin.cpp
143     platform/win/StructuredExceptionHandlerSuppressor.cpp
144     platform/win/SystemInfo.cpp
145     platform/win/WCDataObject.cpp
146     platform/win/WebCoreBundleWin.cpp
147     platform/win/WebCoreInstanceHandle.cpp
148     platform/win/WebCoreTextRenderer.cpp
149     platform/win/WheelEventWin.cpp
150     platform/win/WidgetWin.cpp
151     platform/win/WindowMessageBroadcaster.cpp
152 )
153
154 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
155     ${WEBCORE_DIR}/css/themeWin.css
156     ${WEBCORE_DIR}/css/themeWinQuirks.css
157 )
158
159 list(APPEND WebCore_DERIVED_SOURCES
160     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
161 )
162
163 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
164     .
165     accessibility
166     bindings
167     bridge
168     contentextensions
169     css
170     dom
171     editing
172     history
173     html
174     inspector
175     loader
176     page
177     platform
178     plugins
179     rendering
180     storage
181     style
182     svg
183     websockets
184     workers
185     xml
186
187     Modules/geolocation
188     Modules/indexeddb
189
190     Modules/indexeddb/client
191     Modules/indexeddb/legacy
192     Modules/indexeddb/server
193     Modules/indexeddb/shared
194     Modules/notifications
195     Modules/webdatabase
196
197     accessibility/win
198
199     bindings/generic
200     bindings/js
201
202     bridge/c
203     bridge/jsc
204
205     history/cf
206
207     html/forms
208     html/parser
209     html/shadow
210     html/track
211
212     loader/appcache
213     loader/archive
214     loader/cache
215     loader/icon
216
217     loader/archive/cf
218
219     page/animation
220     page/csp
221     page/scrolling
222     page/win
223
224     platform/animation
225     platform/audio
226     platform/cf
227     platform/graphics
228     platform/mock
229     platform/network
230     platform/sql
231     platform/text
232     platform/win
233
234     platform/cf/win
235
236     platform/graphics/filters
237     platform/graphics/opengl
238     platform/graphics/opentype
239     platform/graphics/texmap
240     platform/graphics/transforms
241     platform/graphics/win
242
243     platform/text/transcoder
244
245     rendering/line
246     rendering/shapes
247     rendering/style
248     rendering/svg
249
250     svg/animation
251     svg/graphics
252     svg/properties
253
254     svg/graphics/filters
255 )
256
257 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
258     list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
259     add_custom_command(
260         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
261         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
262         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
263         VERBATIM)
264 endif ()
265
266 if (${WTF_PLATFORM_WIN_CAIRO})
267     include(PlatformWinCairo.cmake)
268 else ()
269     include(PlatformAppleWin.cmake)
270 endif ()
271
272 add_custom_command(
273     OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
274     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
275     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
276     VERBATIM)
277
278 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
279 file(COPY
280     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
281     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
282     DESTINATION
283     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
284 )
285 file(COPY
286     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
287     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
288     DESTINATION
289     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
290 )
291 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
292     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
293     file(COPY
294         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
295         DESTINATION
296         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
297     )
298 endif ()
299
300 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
301
302 set(WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
303 file(WRITE "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
304 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
305     file(APPEND "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
306 endforeach ()
307
308 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
309 file(WRITE "${WebCore_POST_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${DERIVED_SOURCES_WEBCORE_DIR}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
310
311 set(WebCore_OUTPUT_NAME
312     WebCore${DEBUG_SUFFIX}
313 )
314
315 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
316 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})