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