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