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