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