[WinCairo] Fix build with AllInOnes disabled
[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     "${FORWARDING_HEADERS_DIR}/ANGLE"
8     "${FORWARDING_HEADERS_DIR}/ANGLE/include/KHR"
9     "${FORWARDING_HEADERS_DIR}/JavaScriptCore"
10     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/ForwardingHeaders"
11     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/API"
12     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/assembler"
13     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/builtins"
14     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/bytecode"
15     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/bytecompiler"
16     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/dfg"
17     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/disassembler"
18     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/domjit"
19     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/heap"
20     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/debugger"
21     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/interpreter"
22     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/jit"
23     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/llint"
24     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/parser"
25     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/profiler"
26     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/runtime"
27     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/yarr"
28     "${FORWARDING_HEADERS_DIR}/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/LocalizedStrings.cpp
62     platform/StaticPasteboard.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/graphics/GraphicsContext3DPrivate.cpp
76
77     platform/graphics/egl/GLContextEGL.cpp
78
79     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
80     platform/graphics/opengl/Extensions3DOpenGLES.cpp
81     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
82     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
83     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
84
85     platform/graphics/opentype/OpenTypeUtilities.cpp
86
87     platform/graphics/win/ColorDirect2D.cpp
88     platform/graphics/win/ComplexTextControllerDirectWrite.cpp
89     platform/graphics/win/DIBPixelData.cpp
90     platform/graphics/win/FloatPointDirect2D.cpp
91     platform/graphics/win/FloatRectDirect2D.cpp
92     platform/graphics/win/FloatSizeDirect2D.cpp
93     platform/graphics/win/FontCacheWin.cpp
94     platform/graphics/win/FontPlatformDataWin.cpp
95     platform/graphics/win/FontWin.cpp
96     platform/graphics/win/FullScreenController.cpp
97     platform/graphics/win/GraphicsContextWin.cpp
98     platform/graphics/win/IconWin.cpp
99     platform/graphics/win/ImageWin.cpp
100     platform/graphics/win/IntPointWin.cpp
101     platform/graphics/win/IntRectWin.cpp
102     platform/graphics/win/IntSizeWin.cpp
103     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
104     platform/graphics/win/SimpleFontDataWin.cpp
105     platform/graphics/win/TransformationMatrixDirect2D.cpp
106     platform/graphics/win/TransformationMatrixWin.cpp
107     platform/graphics/win/UniscribeController.cpp
108
109     platform/network/win/DownloadBundleWin.cpp
110     platform/network/win/NetworkStateNotifierWin.cpp
111
112     platform/text/LocaleNone.cpp
113
114     platform/text/cf/HyphenationCF.cpp
115
116     platform/win/BString.cpp
117     platform/win/BitmapInfo.cpp
118     platform/win/ClipboardUtilitiesWin.cpp
119     platform/win/CursorWin.cpp
120     platform/win/DefWndProcWindowClass.cpp
121     platform/win/DragDataWin.cpp
122     platform/win/DragImageWin.cpp
123     platform/win/EventLoopWin.cpp
124     platform/win/FileSystemWin.cpp
125     platform/win/GDIObjectCounter.cpp
126     platform/win/GDIUtilities.cpp
127     platform/win/KeyEventWin.cpp
128     platform/win/LocalizedStringsWin.cpp
129     platform/win/LoggingWin.cpp
130     platform/win/MIMETypeRegistryWin.cpp
131     platform/win/MainThreadSharedTimerWin.cpp
132     platform/win/PasteboardWin.cpp
133     platform/win/PathWalker.cpp
134     platform/win/PlatformMouseEventWin.cpp
135     platform/win/PlatformScreenWin.cpp
136     platform/win/PopupMenuWin.cpp
137     platform/win/SSLKeyGeneratorWin.cpp
138     platform/win/ScrollbarThemeWin.cpp
139     platform/win/SearchPopupMenuWin.cpp
140     platform/win/SharedBufferWin.cpp
141     platform/win/StructuredExceptionHandlerSuppressor.cpp
142     platform/win/SystemInfo.cpp
143     platform/win/WCDataObject.cpp
144     platform/win/WebCoreBundleWin.cpp
145     platform/win/WebCoreInstanceHandle.cpp
146     platform/win/WebCoreTextRenderer.cpp
147     platform/win/WheelEventWin.cpp
148     platform/win/WidgetWin.cpp
149     platform/win/WindowMessageBroadcaster.cpp
150
151     rendering/RenderThemeWin.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 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
160     .
161     accessibility
162     bindings
163     bridge
164     contentextensions
165     css
166     dom
167     editing
168     fileapi
169     history
170     html
171     inspector
172     loader
173     page
174     platform
175     plugins
176     rendering
177     storage
178     style
179     svg
180     websockets
181     workers
182     xml
183
184     Modules/geolocation
185     Modules/indexeddb
186     Modules/mediastream
187     Modules/websockets
188
189     Modules/indexeddb/client
190     Modules/indexeddb/legacy
191     Modules/indexeddb/server
192     Modules/indexeddb/shared
193     Modules/notifications
194     Modules/webdatabase
195
196     accessibility/win
197
198     bindings/js
199
200     bridge/c
201     bridge/jsc
202
203     css/parser
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/mediastream/libwebrtc
244
245     platform/text/transcoder
246
247     rendering/line
248     rendering/shapes
249     rendering/style
250     rendering/svg
251
252     svg/animation
253     svg/graphics
254     svg/properties
255
256     svg/graphics/filters
257 )
258
259 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
260     list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
261     add_custom_command(
262         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
263         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
264         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
265         VERBATIM)
266 endif ()
267
268 if (${WTF_PLATFORM_WIN_CAIRO})
269     include(PlatformWinCairo.cmake)
270 else ()
271     include(PlatformAppleWin.cmake)
272 endif ()
273
274 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
275 file(COPY
276     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
277     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
278     DESTINATION
279     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
280 )
281 file(COPY
282     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
283     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
284     DESTINATION
285     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
286 )
287 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
288     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
289     file(COPY
290         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
291         DESTINATION
292         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
293     )
294 endif ()
295
296 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/WebCore)
297
298 set(WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
299 file(WRITE "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${FORWARDING_HEADERS_DIR}/WebCore\" >nul 2>nul\n")
300 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
301     file(APPEND "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${FORWARDING_HEADERS_DIR}/WebCore\" >nul 2>nul\n")
302 endforeach ()
303
304 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
305 file(WRITE "${WebCore_POST_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${DERIVED_SOURCES_WEBCORE_DIR}/*.h\" \"${FORWARDING_HEADERS_DIR}/WebCore\" >nul 2>nul\n")
306
307 set(WebCore_OUTPUT_NAME
308     WebCore${DEBUG_SUFFIX}
309 )
310
311 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
312 if (TARGET libEGL)
313     list(APPEND WebCore_LIBRARIES libEGL)
314 endif ()
315 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})