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