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