[Win] Fix clean build after r195545.
[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 list(APPEND WebCore_SOURCES
44     accessibility/win/AXObjectCacheWin.cpp
45     accessibility/win/AccessibilityObjectWin.cpp
46     accessibility/win/AccessibilityObjectWrapperWin.cpp
47
48     editing/win/EditorWin.cpp
49
50     html/HTMLSelectElementWin.cpp
51
52     loader/archive/cf/LegacyWebArchive.cpp
53
54     page/win/DragControllerWin.cpp
55     page/win/EventHandlerWin.cpp
56     page/win/FrameWin.cpp
57
58     platform/Cursor.cpp
59     platform/KillRingNone.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/cf/HyphenationCF.cpp
107
108     platform/text/win/TextBreakIteratorInternalICUWin.cpp
109
110     platform/win/BString.cpp
111     platform/win/BitmapInfo.cpp
112     platform/win/ClipboardUtilitiesWin.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/MainThreadSharedTimerWin.cpp
128     platform/win/PasteboardWin.cpp
129     platform/win/PathWalker.cpp
130     platform/win/PlatformMouseEventWin.cpp
131     platform/win/PlatformScreenWin.cpp
132     platform/win/PopupMenuWin.cpp
133     platform/win/SSLKeyGeneratorWin.cpp
134     platform/win/ScrollbarThemeWin.cpp
135     platform/win/SearchPopupMenuWin.cpp
136     platform/win/SharedBufferWin.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     contentextensions
164     css
165     dom
166     editing
167     history
168     html
169     inspector
170     loader
171     page
172     platform
173     plugins
174     rendering
175     storage
176     style
177     svg
178     websockets
179     workers
180     xml
181
182     Modules/geolocation
183     Modules/indexeddb
184     Modules/indexeddb/legacy
185     Modules/indexeddb/shared
186     Modules/notifications
187     Modules/webdatabase
188
189     accessibility/win
190
191     bindings/generic
192     bindings/js
193
194     bridge/c
195     bridge/jsc
196
197     history/cf
198
199     html/forms
200     html/parser
201     html/shadow
202     html/track
203
204     loader/appcache
205     loader/archive
206     loader/cache
207     loader/icon
208
209     loader/archive/cf
210
211     page/animation
212     page/scrolling
213     page/win
214
215     platform/animation
216     platform/audio
217     platform/cf
218     platform/graphics
219     platform/mock
220     platform/network
221     platform/sql
222     platform/text
223     platform/win
224
225     platform/cf/win
226
227     platform/graphics/filters
228     platform/graphics/opengl
229     platform/graphics/opentype
230     platform/graphics/texmap
231     platform/graphics/transforms
232     platform/graphics/win
233
234     platform/text/transcoder
235
236     rendering/line
237     rendering/shapes
238     rendering/style
239     rendering/svg
240
241     svg/animation
242     svg/graphics
243     svg/properties
244
245     svg/graphics/filters
246 )
247
248 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
249     list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
250     add_custom_command(
251         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
252         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
253         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
254         VERBATIM)
255 endif ()
256
257 if (${WTF_PLATFORM_WIN_CAIRO})
258     include(PlatformWinCairo.cmake)
259 else ()
260     include(PlatformAppleWin.cmake)
261 endif ()
262
263 add_custom_command(
264     OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
265     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
266     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
267     VERBATIM)
268
269 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
270 file(COPY
271     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
272     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
273     DESTINATION
274     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
275 )
276 file(COPY
277     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
278     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
279     DESTINATION
280     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
281 )
282 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
283     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
284     file(COPY
285         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
286         DESTINATION
287         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
288     )
289 endif ()
290
291 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
292
293 set(WebCore_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
294 file(WRITE "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
295 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
296     file(APPEND "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
297 endforeach ()
298
299 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
300 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")
301
302 set(WebCore_OUTPUT_NAME
303     WebCore${DEBUG_SUFFIX}
304 )