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