[Mac] Gather some rudimentary statistics during resource load
[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/KeyedDecoderCF.cpp
68     platform/cf/KeyedEncoderCF.cpp
69     platform/cf/SharedBufferCF.cpp
70
71     platform/cf/win/CertificateCFWin.cpp
72
73     platform/graphics/FontPlatformData.cpp
74     platform/graphics/GraphicsContext3DPrivate.cpp
75     platform/graphics/WOFFFileFormat.cpp
76
77     platform/graphics/egl/GLContextEGL.cpp
78
79     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
80     platform/graphics/opengl/Extensions3DOpenGLES.cpp
81     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
82     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
83     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
84
85     platform/graphics/opentype/OpenTypeUtilities.cpp
86
87     platform/graphics/win/DIBPixelData.cpp
88     platform/graphics/win/FontCacheWin.cpp
89     platform/graphics/win/FontPlatformDataWin.cpp
90     platform/graphics/win/FontWin.cpp
91     platform/graphics/win/FullScreenController.cpp
92     platform/graphics/win/GraphicsContextWin.cpp
93     platform/graphics/win/IconWin.cpp
94     platform/graphics/win/ImageWin.cpp
95     platform/graphics/win/IntPointWin.cpp
96     platform/graphics/win/IntRectWin.cpp
97     platform/graphics/win/IntSizeWin.cpp
98     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
99     platform/graphics/win/SimpleFontDataWin.cpp
100     platform/graphics/win/TransformationMatrixWin.cpp
101     platform/graphics/win/UniscribeController.cpp
102
103     platform/network/win/DownloadBundleWin.cpp
104     platform/network/win/NetworkStateNotifierWin.cpp
105
106     platform/text/LocaleNone.cpp
107
108     platform/text/cf/HyphenationCF.cpp
109
110     platform/text/win/TextBreakIteratorInternalICUWin.cpp
111
112     platform/win/BString.cpp
113     platform/win/BitmapInfo.cpp
114     platform/win/ClipboardUtilitiesWin.cpp
115     platform/win/CursorWin.cpp
116     platform/win/DefWndProcWindowClass.cpp
117     platform/win/DragDataWin.cpp
118     platform/win/DragImageWin.cpp
119     platform/win/EventLoopWin.cpp
120     platform/win/FileSystemWin.cpp
121     platform/win/GDIObjectCounter.cpp
122     platform/win/GDIUtilities.cpp
123     platform/win/KeyEventWin.cpp
124     platform/win/LanguageWin.cpp
125     platform/win/LocalizedStringsWin.cpp
126     platform/win/LoggingWin.cpp
127     platform/win/MemoryPressureHandlerWin.cpp
128     platform/win/MIMETypeRegistryWin.cpp
129     platform/win/MainThreadSharedTimerWin.cpp
130     platform/win/PasteboardWin.cpp
131     platform/win/PathWalker.cpp
132     platform/win/PlatformMouseEventWin.cpp
133     platform/win/PlatformScreenWin.cpp
134     platform/win/PopupMenuWin.cpp
135     platform/win/SSLKeyGeneratorWin.cpp
136     platform/win/ScrollbarThemeWin.cpp
137     platform/win/SearchPopupMenuWin.cpp
138     platform/win/SharedBufferWin.cpp
139     platform/win/SoundWin.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
151 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
152     ${WEBCORE_DIR}/css/themeWin.css
153     ${WEBCORE_DIR}/css/themeWinQuirks.css
154 )
155
156 list(APPEND WebCore_SOURCES
157     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
158 )
159
160 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
161     .
162     accessibility
163     bindings
164     bridge
165     contentextensions
166     css
167     dom
168     editing
169     history
170     html
171     inspector
172     loader
173     page
174     platform
175     plugins
176     rendering
177     storage
178     style
179     svg
180     websockets
181     workers
182     xml
183
184     Modules/geolocation
185     Modules/indexeddb
186     Modules/indexeddb/legacy
187     Modules/indexeddb/shared
188     Modules/notifications
189     Modules/webdatabase
190
191     accessibility/win
192
193     bindings/generic
194     bindings/js
195
196     bridge/c
197     bridge/jsc
198
199     history/cf
200
201     html/forms
202     html/parser
203     html/shadow
204     html/track
205
206     loader/appcache
207     loader/archive
208     loader/cache
209     loader/icon
210
211     loader/archive/cf
212
213     page/animation
214     page/csp
215     page/scrolling
216     page/win
217
218     platform/animation
219     platform/audio
220     platform/cf
221     platform/graphics
222     platform/mock
223     platform/network
224     platform/sql
225     platform/text
226     platform/win
227
228     platform/cf/win
229
230     platform/graphics/filters
231     platform/graphics/opengl
232     platform/graphics/opentype
233     platform/graphics/texmap
234     platform/graphics/transforms
235     platform/graphics/win
236
237     platform/text/transcoder
238
239     rendering/line
240     rendering/shapes
241     rendering/style
242     rendering/svg
243
244     svg/animation
245     svg/graphics
246     svg/properties
247
248     svg/graphics/filters
249 )
250
251 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
252     list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
253     add_custom_command(
254         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
255         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
256         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
257         VERBATIM)
258 endif ()
259
260 if (${WTF_PLATFORM_WIN_CAIRO})
261     include(PlatformWinCairo.cmake)
262 else ()
263     include(PlatformAppleWin.cmake)
264 endif ()
265
266 add_custom_command(
267     OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
268     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
269     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
270     VERBATIM)
271
272 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
273 file(COPY
274     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
275     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
276     DESTINATION
277     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
278 )
279 file(COPY
280     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
281     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
282     DESTINATION
283     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
284 )
285 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
286     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
287     file(COPY
288         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
289         DESTINATION
290         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
291     )
292 endif ()
293
294 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
295
296 set(WebCore_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
297 file(WRITE "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
298 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
299     file(APPEND "${WebCore_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
300 endforeach ()
301
302 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
303 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")
304
305 set(WebCore_OUTPUT_NAME
306     WebCore${DEBUG_SUFFIX}
307 )