[Win] Fix build after r190295.
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
1 add_definitions(/bigobj)
2
3 list(APPEND WebCore_INCLUDE_DIRECTORIES
4     "${CMAKE_BINARY_DIR}/../include/private"
5     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
6     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
7     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/KHR"
8     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
9     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/ForwardingHeaders"
10     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/API"
11     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/assembler"
12     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/builtins"
13     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecode"
14     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecompiler"
15     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/dfg"
16     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/disassembler"
17     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/heap"
18     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/debugger"
19     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/interpreter"
20     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/jit"
21     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/llint"
22     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/parser"
23     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/profiler"
24     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/runtime"
25     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/yarr"
26     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WTF"
27     "${WEBCORE_DIR}/ForwardingHeaders"
28     "${WEBCORE_DIR}/accessibility/win"
29     "${WEBCORE_DIR}/page/win"
30     "${WEBCORE_DIR}/platform/cf"
31     "${WEBCORE_DIR}/platform/cf/win"
32     "${WEBCORE_DIR}/platform/graphics/egl"
33     "${WEBCORE_DIR}/platform/graphics/opengl"
34     "${WEBCORE_DIR}/platform/graphics/opentype"
35     "${WEBCORE_DIR}/platform/graphics/win"
36     "${WEBCORE_DIR}/platform/network/win"
37     "${WEBCORE_DIR}/platform/win"
38     "${WEBCORE_DIR}/plugins/win"
39     "${THIRDPARTY_DIR}/ANGLE/include"
40     "${THIRDPARTY_DIR}/ANGLE/include/egl"
41 )
42
43 enable_language(ASM_MASM)
44 list(APPEND WebCore_SOURCES
45     accessibility/win/AXObjectCacheWin.cpp
46     accessibility/win/AccessibilityObjectWin.cpp
47     accessibility/win/AccessibilityObjectWrapperWin.cpp
48
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/PlatformStrategies.cpp
62     platform/VNodeTracker.cpp
63
64     platform/audio/PlatformMediaSessionManager.cpp
65
66     platform/cf/FileSystemCF.cpp
67     platform/cf/SharedBufferCF.cpp
68
69     platform/cf/win/CertificateCFWin.cpp
70
71     platform/graphics/FontPlatformData.cpp
72     platform/graphics/GraphicsContext3DPrivate.cpp
73     platform/graphics/WOFFFileFormat.cpp
74
75     platform/graphics/egl/GLContextEGL.cpp
76
77     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
78     platform/graphics/opengl/Extensions3DOpenGLES.cpp
79     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
80     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
81     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
82
83     platform/graphics/opentype/OpenTypeUtilities.cpp
84
85     platform/graphics/win/DIBPixelData.cpp
86     platform/graphics/win/FontCacheWin.cpp
87     platform/graphics/win/FontPlatformDataWin.cpp
88     platform/graphics/win/FontWin.cpp
89     platform/graphics/win/FullScreenController.cpp
90     platform/graphics/win/GraphicsContextWin.cpp
91     platform/graphics/win/IconWin.cpp
92     platform/graphics/win/ImageWin.cpp
93     platform/graphics/win/IntPointWin.cpp
94     platform/graphics/win/IntRectWin.cpp
95     platform/graphics/win/IntSizeWin.cpp
96     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
97     platform/graphics/win/SimpleFontDataWin.cpp
98     platform/graphics/win/TransformationMatrixWin.cpp
99     platform/graphics/win/UniscribeController.cpp
100
101     platform/network/win/DownloadBundleWin.cpp
102     platform/network/win/NetworkStateNotifierWin.cpp
103
104     platform/text/LocaleNone.cpp
105
106     platform/text/win/TextBreakIteratorInternalICUWin.cpp
107
108     platform/win/BString.cpp
109     platform/win/BitmapInfo.cpp
110     platform/win/ClipboardUtilitiesWin.cpp
111     platform/win/ContextMenuItemWin.cpp
112     platform/win/ContextMenuWin.cpp
113     platform/win/CursorWin.cpp
114     platform/win/DefWndProcWindowClass.cpp
115     platform/win/DragDataWin.cpp
116     platform/win/DragImageWin.cpp
117     platform/win/EventLoopWin.cpp
118     platform/win/FileSystemWin.cpp
119     platform/win/GDIObjectCounter.cpp
120     platform/win/GDIUtilities.cpp
121     platform/win/KeyEventWin.cpp
122     platform/win/LanguageWin.cpp
123     platform/win/LocalizedStringsWin.cpp
124     platform/win/LoggingWin.cpp
125     platform/win/MemoryPressureHandlerWin.cpp
126     platform/win/MIMETypeRegistryWin.cpp
127     platform/win/PasteboardWin.cpp
128     platform/win/PathWalker.cpp
129     platform/win/PlatformMouseEventWin.cpp
130     platform/win/PlatformScreenWin.cpp
131     platform/win/PopupMenuWin.cpp
132     platform/win/SSLKeyGeneratorWin.cpp
133     platform/win/ScrollbarThemeWin.cpp
134     platform/win/SearchPopupMenuWin.cpp
135     platform/win/SharedBufferWin.cpp
136     platform/win/SharedTimerWin.cpp
137     platform/win/SoundWin.cpp
138     platform/win/StructuredExceptionHandlerSuppressor.cpp
139     platform/win/SystemInfo.cpp
140     platform/win/WCDataObject.cpp
141     platform/win/WebCoreBundleWin.cpp
142     platform/win/WebCoreInstanceHandle.cpp
143     platform/win/WebCoreTextRenderer.cpp
144     platform/win/WheelEventWin.cpp
145     platform/win/WidgetWin.cpp
146     platform/win/WindowMessageBroadcaster.cpp
147 )
148
149 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
150     ${WEBCORE_DIR}/css/themeWin.css
151     ${WEBCORE_DIR}/css/themeWinQuirks.css
152 )
153
154 list(APPEND WebCore_SOURCES
155     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
156 )
157
158 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
159     .
160     accessibility
161     bindings
162     bridge
163     css
164     dom
165     editing
166     history
167     html
168     inspector
169     loader
170     page
171     platform
172     plugins
173     rendering
174     storage
175     style
176     svg
177     websockets
178     workers
179     xml
180
181     Modules/geolocation
182     Modules/indexeddb
183     Modules/indexeddb/legacy
184     Modules/indexeddb/shared
185     Modules/notifications
186     Modules/webdatabase
187
188     accessibility/win
189
190     bindings/generic
191     bindings/js
192
193     bridge/c
194     bridge/jsc
195
196     history/cf
197
198     html/forms
199     html/parser
200     html/shadow
201     html/track
202
203     loader/appcache
204     loader/archive
205     loader/cache
206     loader/icon
207
208     loader/archive/cf
209
210     page/animation
211     page/scrolling
212     page/win
213
214     platform/animation
215     platform/audio
216     platform/cf
217     platform/graphics
218     platform/mock
219     platform/network
220     platform/sql
221     platform/text
222     platform/win
223
224     platform/cf/win
225
226     platform/graphics/filters
227     platform/graphics/opengl
228     platform/graphics/opentype
229     platform/graphics/texmap
230     platform/graphics/transforms
231     platform/graphics/win
232
233     platform/text/transcoder
234
235     rendering/line
236     rendering/shapes
237     rendering/style
238     rendering/svg
239
240     svg/animation
241     svg/graphics
242     svg/properties
243
244     svg/graphics/filters
245 )
246
247 if (${WTF_PLATFORM_WIN_CAIRO})
248     include(PlatformWinCairo.cmake)
249 else ()
250     include(PlatformAppleWin.cmake)
251 endif ()
252
253 add_custom_command(
254     OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
255     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
256     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
257     VERBATIM)
258
259 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
260 file(COPY
261     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
262     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
263     DESTINATION
264     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
265 )
266 file(COPY
267     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
268     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
269     DESTINATION
270     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
271 )
272 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
273     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
274     file(COPY
275         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
276         DESTINATION
277         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
278     )
279 endif ()
280
281 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
282
283 set(WebCore_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
284 file(WRITE "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
285 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
286     file(APPEND "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
287 endforeach ()
288
289 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
290 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")
291
292 set(WebCore_OUTPUT_NAME
293     WebCore${DEBUG_SUFFIX}
294 )