Move USE_AVFOUNDATION definition on Windows to wtf/Platform.h
[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     "${FORWARDING_HEADERS_DIR}/ANGLE"
8     "${FORWARDING_HEADERS_DIR}/ANGLE/include/KHR"
9     "${FORWARDING_HEADERS_DIR}/JavaScriptCore"
10     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/ForwardingHeaders"
11     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/API"
12     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/assembler"
13     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/builtins"
14     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/bytecode"
15     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/bytecompiler"
16     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/dfg"
17     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/disassembler"
18     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/domjit"
19     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/heap"
20     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/debugger"
21     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/interpreter"
22     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/jit"
23     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/llint"
24     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/parser"
25     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/profiler"
26     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/runtime"
27     "${FORWARDING_HEADERS_DIR}/JavaScriptCore/yarr"
28     "${FORWARDING_HEADERS_DIR}/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/LocalizedStrings.cpp
62     platform/StaticPasteboard.cpp
63
64     platform/audio/PlatformMediaSessionManager.cpp
65
66     platform/cf/CFURLExtras.cpp
67     platform/cf/FileSystemCF.cpp
68     platform/cf/KeyedDecoderCF.cpp
69     platform/cf/KeyedEncoderCF.cpp
70     platform/cf/SharedBufferCF.cpp
71     platform/cf/URLCF.cpp
72
73     platform/cf/win/CertificateCFWin.cpp
74
75     platform/graphics/GraphicsContext3DPrivate.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/ColorDirect2D.cpp
88     platform/graphics/win/ComplexTextControllerDirectWrite.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/MIMETypeRegistryWin.cpp
131     platform/win/MainThreadSharedTimerWin.cpp
132     platform/win/PasteboardWin.cpp
133     platform/win/PathWalker.cpp
134     platform/win/PlatformMouseEventWin.cpp
135     platform/win/PlatformScreenWin.cpp
136     platform/win/PopupMenuWin.cpp
137     platform/win/SSLKeyGeneratorWin.cpp
138     platform/win/ScrollbarThemeWin.cpp
139     platform/win/SearchPopupMenuWin.cpp
140     platform/win/SharedBufferWin.cpp
141     platform/win/StructuredExceptionHandlerSuppressor.cpp
142     platform/win/SystemInfo.cpp
143     platform/win/WCDataObject.cpp
144     platform/win/WebCoreBundleWin.cpp
145     platform/win/WebCoreInstanceHandle.cpp
146     platform/win/WebCoreTextRenderer.cpp
147     platform/win/WheelEventWin.cpp
148     platform/win/WidgetWin.cpp
149     platform/win/WindowMessageBroadcaster.cpp
150 )
151
152 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
153     ${WEBCORE_DIR}/css/themeWin.css
154     ${WEBCORE_DIR}/css/themeWinQuirks.css
155 )
156
157 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
158     .
159     accessibility
160     bindings
161     bridge
162     contentextensions
163     css
164     dom
165     editing
166     fileapi
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/mediastream
185     Modules/websockets
186
187     Modules/indexeddb/client
188     Modules/indexeddb/legacy
189     Modules/indexeddb/server
190     Modules/indexeddb/shared
191     Modules/notifications
192     Modules/webdatabase
193
194     accessibility/win
195
196     bindings/js
197
198     bridge/c
199     bridge/jsc
200
201     css/parser
202
203     history/cf
204
205     html/forms
206     html/parser
207     html/shadow
208     html/track
209
210     loader/appcache
211     loader/archive
212     loader/cache
213     loader/icon
214
215     loader/archive/cf
216
217     page/animation
218     page/csp
219     page/scrolling
220     page/win
221
222     platform/animation
223     platform/audio
224     platform/cf
225     platform/graphics
226     platform/mock
227     platform/network
228     platform/sql
229     platform/text
230     platform/win
231
232     platform/cf/win
233
234     platform/graphics/filters
235     platform/graphics/opengl
236     platform/graphics/opentype
237     platform/graphics/texmap
238     platform/graphics/transforms
239     platform/graphics/win
240
241     platform/mediastream/libwebrtc
242
243     platform/text/transcoder
244
245     rendering/line
246     rendering/shapes
247     rendering/style
248     rendering/svg
249
250     svg/animation
251     svg/graphics
252     svg/properties
253
254     svg/graphics/filters
255 )
256
257 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
258     list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
259     add_custom_command(
260         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
261         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
262         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
263         VERBATIM)
264 endif ()
265
266 if (${WTF_PLATFORM_WIN_CAIRO})
267     include(PlatformWinCairo.cmake)
268 else ()
269     include(PlatformAppleWin.cmake)
270 endif ()
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 ${FORWARDING_HEADERS_DIR}/WebCore)
295
296 set(WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
297 file(WRITE "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${FORWARDING_HEADERS_DIR}/WebCore\" >nul 2>nul\n")
298 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
299     file(APPEND "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${FORWARDING_HEADERS_DIR}/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\" \"${FORWARDING_HEADERS_DIR}/WebCore\" >nul 2>nul\n")
304
305 set(WebCore_OUTPUT_NAME
306     WebCore${DEBUG_SUFFIX}
307 )
308
309 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
310 if (TARGET libEGL)
311     list(APPEND WebCore_LIBRARIES libEGL)
312 endif ()
313 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})