[Win][Direct2D] Provide Color support for Direct2D
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
1 add_definitions(/bigobj)
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     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
8     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/KHR"
9     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
10     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/ForwardingHeaders"
11     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/API"
12     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/assembler"
13     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/builtins"
14     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecode"
15     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/bytecompiler"
16     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/dfg"
17     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/disassembler"
18     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/heap"
19     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/debugger"
20     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/interpreter"
21     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/jit"
22     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/llint"
23     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/parser"
24     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/profiler"
25     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/runtime"
26     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore/yarr"
27     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WTF"
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/spi/win"
38     "${WEBCORE_DIR}/platform/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/SmartReplaceCF.cpp
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/KillRingNone.cpp
61     platform/LocalizedStrings.cpp
62     platform/VNodeTracker.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/crypto/win/CryptoDigestWin.cpp
76
77     platform/graphics/GraphicsContext3DPrivate.cpp
78
79     platform/graphics/egl/GLContextEGL.cpp
80
81     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
82     platform/graphics/opengl/Extensions3DOpenGLES.cpp
83     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
84     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
85     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
86
87     platform/graphics/opentype/OpenTypeUtilities.cpp
88
89     platform/graphics/win/ColorDirect2D.cpp
90     platform/graphics/win/DIBPixelData.cpp
91     platform/graphics/win/FloatPointDirect2D.cpp
92     platform/graphics/win/FloatRectDirect2D.cpp
93     platform/graphics/win/FloatSizeDirect2D.cpp
94     platform/graphics/win/FontCacheWin.cpp
95     platform/graphics/win/FontPlatformDataWin.cpp
96     platform/graphics/win/FontWin.cpp
97     platform/graphics/win/FullScreenController.cpp
98     platform/graphics/win/GraphicsContextWin.cpp
99     platform/graphics/win/IconWin.cpp
100     platform/graphics/win/ImageWin.cpp
101     platform/graphics/win/IntPointWin.cpp
102     platform/graphics/win/IntRectWin.cpp
103     platform/graphics/win/IntSizeWin.cpp
104     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
105     platform/graphics/win/SimpleFontDataWin.cpp
106     platform/graphics/win/TransformationMatrixDirect2D.cpp
107     platform/graphics/win/TransformationMatrixWin.cpp
108     platform/graphics/win/UniscribeController.cpp
109
110     platform/network/win/DownloadBundleWin.cpp
111     platform/network/win/NetworkStateNotifierWin.cpp
112
113     platform/text/LocaleNone.cpp
114
115     platform/text/cf/HyphenationCF.cpp
116
117     platform/win/BString.cpp
118     platform/win/BitmapInfo.cpp
119     platform/win/ClipboardUtilitiesWin.cpp
120     platform/win/CursorWin.cpp
121     platform/win/DefWndProcWindowClass.cpp
122     platform/win/DragDataWin.cpp
123     platform/win/DragImageWin.cpp
124     platform/win/EventLoopWin.cpp
125     platform/win/FileSystemWin.cpp
126     platform/win/GDIObjectCounter.cpp
127     platform/win/GDIUtilities.cpp
128     platform/win/KeyEventWin.cpp
129     platform/win/LocalizedStringsWin.cpp
130     platform/win/LoggingWin.cpp
131     platform/win/MemoryPressureHandlerWin.cpp
132     platform/win/MIMETypeRegistryWin.cpp
133     platform/win/MainThreadSharedTimerWin.cpp
134     platform/win/PasteboardWin.cpp
135     platform/win/PathWalker.cpp
136     platform/win/PlatformMouseEventWin.cpp
137     platform/win/PlatformScreenWin.cpp
138     platform/win/PopupMenuWin.cpp
139     platform/win/SSLKeyGeneratorWin.cpp
140     platform/win/ScrollbarThemeWin.cpp
141     platform/win/SearchPopupMenuWin.cpp
142     platform/win/SharedBufferWin.cpp
143     platform/win/SoundWin.cpp
144     platform/win/StructuredExceptionHandlerSuppressor.cpp
145     platform/win/SystemInfo.cpp
146     platform/win/WCDataObject.cpp
147     platform/win/WebCoreBundleWin.cpp
148     platform/win/WebCoreInstanceHandle.cpp
149     platform/win/WebCoreTextRenderer.cpp
150     platform/win/WheelEventWin.cpp
151     platform/win/WidgetWin.cpp
152     platform/win/WindowMessageBroadcaster.cpp
153 )
154
155 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
156     ${WEBCORE_DIR}/css/themeWin.css
157     ${WEBCORE_DIR}/css/themeWinQuirks.css
158 )
159
160 list(APPEND WebCore_DERIVED_SOURCES
161     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
162 )
163
164 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
165     .
166     accessibility
167     bindings
168     bridge
169     contentextensions
170     css
171     dom
172     editing
173     fileapi
174     history
175     html
176     inspector
177     loader
178     page
179     platform
180     plugins
181     rendering
182     storage
183     style
184     svg
185     websockets
186     workers
187     xml
188
189     Modules/geolocation
190     Modules/indexeddb
191     Modules/websockets
192
193     Modules/indexeddb/client
194     Modules/indexeddb/legacy
195     Modules/indexeddb/server
196     Modules/indexeddb/shared
197     Modules/notifications
198     Modules/webdatabase
199
200     accessibility/win
201
202     bindings/generic
203     bindings/js
204
205     bridge/c
206     bridge/jsc
207
208     css/parser
209
210     history/cf
211
212     html/forms
213     html/parser
214     html/shadow
215     html/track
216
217     loader/appcache
218     loader/archive
219     loader/cache
220     loader/icon
221
222     loader/archive/cf
223
224     page/animation
225     page/csp
226     page/scrolling
227     page/win
228
229     platform/animation
230     platform/audio
231     platform/cf
232     platform/graphics
233     platform/mock
234     platform/network
235     platform/sql
236     platform/text
237     platform/win
238
239     platform/cf/win
240
241     platform/graphics/filters
242     platform/graphics/opengl
243     platform/graphics/opentype
244     platform/graphics/texmap
245     platform/graphics/transforms
246     platform/graphics/win
247
248     platform/text/transcoder
249
250     rendering/line
251     rendering/shapes
252     rendering/style
253     rendering/svg
254
255     svg/animation
256     svg/graphics
257     svg/properties
258
259     svg/graphics/filters
260 )
261
262 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
263     list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
264     add_custom_command(
265         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
266         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
267         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
268         VERBATIM)
269 endif ()
270
271 if (${WTF_PLATFORM_WIN_CAIRO})
272     include(PlatformWinCairo.cmake)
273 else ()
274     include(PlatformAppleWin.cmake)
275 endif ()
276
277 add_custom_command(
278     OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
279     WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
280     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
281     VERBATIM)
282
283 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
284 file(COPY
285     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
286     "${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js"
287     DESTINATION
288     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
289 )
290 file(COPY
291     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
292     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
293     DESTINATION
294     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
295 )
296 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/cacert.pem)
297     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
298     file(COPY
299         ${WEBKIT_LIBRARIES_DIR}/cacert.pem
300         DESTINATION
301         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
302     )
303 endif ()
304
305 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore)
306
307 set(WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/preBuild.cmd")
308 file(WRITE "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /s /d /f \"${WEBCORE_DIR}/ForwardingHeaders/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
309 foreach (_directory ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
310     file(APPEND "${WebCore_DERIVED_SOURCES_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${WEBCORE_DIR}/${_directory}/*.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebCore\" >nul 2>nul\n")
311 endforeach ()
312
313 set(WebCore_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebCore/postBuild.cmd")
314 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")
315
316 set(WebCore_OUTPUT_NAME
317     WebCore${DEBUG_SUFFIX}
318 )
319
320 list(APPEND WebCore_LIBRARIES WTF${DEBUG_SUFFIX})
321 list(APPEND WebCoreTestSupport_LIBRARIES WTF${DEBUG_SUFFIX})