[Win] Add UserAgentWin.cpp
[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/UserAgentWin.cpp
109     platform/win/WCDataObject.cpp
110     platform/win/WebCoreBundleWin.cpp
111     platform/win/WebCoreInstanceHandle.cpp
112     platform/win/WebCoreTextRenderer.cpp
113     platform/win/WheelEventWin.cpp
114     platform/win/WidgetWin.cpp
115     platform/win/WindowMessageBroadcaster.cpp
116
117     rendering/RenderThemeWin.cpp
118 )
119
120 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
121     ${WEBCORE_DIR}/css/themeWin.css
122     ${WEBCORE_DIR}/css/themeWinQuirks.css
123 )
124
125 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
126     .
127     accessibility
128     animation
129     bindings
130     bridge
131     contentextensions
132     css
133     dom
134     editing
135     fileapi
136     history
137     html
138     inspector
139     loader
140     page
141     platform
142     plugins
143     rendering
144     storage
145     style
146     svg
147     websockets
148     workers
149     xml
150
151     Modules/cache
152     Modules/fetch
153     Modules/geolocation
154     Modules/indexeddb
155     Modules/mediastream
156     Modules/websockets
157
158     Modules/indexeddb/client
159     Modules/indexeddb/legacy
160     Modules/indexeddb/server
161     Modules/indexeddb/shared
162     Modules/notifications
163     Modules/webdatabase
164
165     accessibility/win
166
167     bindings/js
168
169     bridge/c
170     bridge/jsc
171
172     css/parser
173
174     html/canvas
175     html/forms
176     html/parser
177     html/shadow
178     html/track
179
180     loader/appcache
181     loader/archive
182     loader/cache
183     loader/icon
184
185
186     page/animation
187     page/csp
188     page/scrolling
189     page/win
190
191     platform/animation
192     platform/audio
193     platform/graphics
194     platform/mock
195     platform/network
196     platform/sql
197     platform/text
198     platform/win
199
200     platform/graphics/filters
201     platform/graphics/opengl
202     platform/graphics/opentype
203     platform/graphics/texmap
204     platform/graphics/transforms
205     platform/graphics/win
206
207     platform/mediastream/libwebrtc
208
209     platform/text/transcoder
210
211     rendering/line
212     rendering/shapes
213     rendering/style
214     rendering/svg
215
216     svg/animation
217     svg/graphics
218     svg/properties
219
220     svg/graphics/filters
221
222     workers/service
223 )
224
225 if (ENABLE_WEBKIT)
226     list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
227         Modules/applicationmanifest
228
229         dom/messageports
230
231         inspector/agents
232
233         platform/mediastream
234
235         workers/service/context
236         workers/service/server
237     )
238 endif ()
239
240 if (USE_CF)
241     list(APPEND WebCore_INCLUDE_DIRECTORIES
242         "${WEBCORE_DIR}/platform/cf"
243         "${WEBCORE_DIR}/platform/cf/win"
244     )
245
246     list(APPEND WebCore_SOURCES
247         loader/archive/cf/LegacyWebArchive.cpp
248
249         platform/cf/CFURLExtras.cpp
250         platform/cf/FileSystemCF.cpp
251         platform/cf/KeyedDecoderCF.cpp
252         platform/cf/KeyedEncoderCF.cpp
253         platform/cf/SharedBufferCF.cpp
254         platform/cf/URLCF.cpp
255
256         platform/cf/win/CertificateCFWin.cpp
257
258         platform/text/cf/HyphenationCF.cpp
259     )
260
261     list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
262         history/cf
263
264         loader/archive/cf
265
266         platform/cf
267
268         platform/cf/win
269     )
270 endif ()
271
272 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
273     list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
274     add_custom_command(
275         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
276         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
277         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
278         VERBATIM)
279 endif ()
280
281 if (${WTF_PLATFORM_WIN_CAIRO})
282     include(PlatformWinCairo.cmake)
283 else ()
284     include(PlatformAppleWin.cmake)
285 endif ()
286
287 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
288 file(COPY
289     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
290     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
291     DESTINATION
292     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
293 )
294 file(COPY
295     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
296     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
297     DESTINATION
298     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
299 )
300 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)
301     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
302     file(COPY
303         ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem
304         DESTINATION
305         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
306     )
307     file(RENAME
308         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem
309         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem
310     )
311 endif ()
312
313 WEBKIT_MAKE_FORWARDING_HEADERS(WebCore
314     DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES}
315     DERIVED_SOURCE_DIRECTORIES ${DERIVED_SOURCES_WEBCORE_DIR} ${DERIVED_SOURCES_PAL_DIR}
316     FLATTENED
317 )
318
319 set(WebCore_OUTPUT_NAME
320     WebCore${DEBUG_SUFFIX}
321 )
322
323 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
324 if (TARGET libEGL)
325     list(APPEND WebCore_LIBRARIES libEGL)
326 endif ()
327 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})