[CMake][WTF] Mirror XCode header directories
[WebKit-https.git] / Source / WebCore / PlatformWin.cmake
1 add_definitions(/bigobj -D__STDC_CONSTANT_MACROS)
2
3 list(APPEND WebCore_INCLUDE_DIRECTORIES
4     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
5     "${CMAKE_BINARY_DIR}/../include/private"
6     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
7     "${WEBCORE_DIR}/accessibility/win"
8     "${WEBCORE_DIR}/page/win"
9     "${WEBCORE_DIR}/platform/graphics/egl"
10     "${WEBCORE_DIR}/platform/graphics/opengl"
11     "${WEBCORE_DIR}/platform/graphics/opentype"
12     "${WEBCORE_DIR}/platform/graphics/win"
13     "${WEBCORE_DIR}/platform/mediacapabilities"
14     "${WEBCORE_DIR}/platform/network/win"
15     "${WEBCORE_DIR}/platform/win"
16     "${THIRDPARTY_DIR}/ANGLE/include"
17     "${THIRDPARTY_DIR}/ANGLE/include/egl"
18 )
19
20 list(APPEND WebCore_SOURCES
21     accessibility/win/AXObjectCacheWin.cpp
22     accessibility/win/AccessibilityObjectWin.cpp
23     accessibility/win/AccessibilityObjectWrapperWin.cpp
24
25     editing/win/EditorWin.cpp
26
27     html/HTMLSelectElementWin.cpp
28
29     page/win/DragControllerWin.cpp
30     page/win/EventHandlerWin.cpp
31     page/win/FrameWin.cpp
32
33     platform/Cursor.cpp
34     platform/LocalizedStrings.cpp
35     platform/StaticPasteboard.cpp
36
37     platform/audio/PlatformMediaSessionManager.cpp
38
39     platform/graphics/GraphicsContext3DPrivate.cpp
40
41     platform/graphics/egl/GLContextEGL.cpp
42
43     platform/graphics/opengl/Extensions3DOpenGLCommon.cpp
44     platform/graphics/opengl/Extensions3DOpenGLES.cpp
45     platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp
46     platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp
47     platform/graphics/opengl/TemporaryOpenGLSetting.cpp
48
49     platform/graphics/opentype/OpenTypeUtilities.cpp
50
51     platform/graphics/win/ColorDirect2D.cpp
52     platform/graphics/win/ComplexTextControllerDirectWrite.cpp
53     platform/graphics/win/DIBPixelData.cpp
54     platform/graphics/win/FloatPointDirect2D.cpp
55     platform/graphics/win/FloatRectDirect2D.cpp
56     platform/graphics/win/FloatSizeDirect2D.cpp
57     platform/graphics/win/FontCacheWin.cpp
58     platform/graphics/win/FontPlatformDataWin.cpp
59     platform/graphics/win/FontWin.cpp
60     platform/graphics/win/FullScreenController.cpp
61     platform/graphics/win/GraphicsContextWin.cpp
62     platform/graphics/win/IconWin.cpp
63     platform/graphics/win/ImageWin.cpp
64     platform/graphics/win/IntPointWin.cpp
65     platform/graphics/win/IntRectWin.cpp
66     platform/graphics/win/IntSizeWin.cpp
67     platform/graphics/win/MediaPlayerPrivateFullscreenWindow.cpp
68     platform/graphics/win/SimpleFontDataWin.cpp
69     platform/graphics/win/TransformationMatrixDirect2D.cpp
70     platform/graphics/win/TransformationMatrixWin.cpp
71     platform/graphics/win/UniscribeController.cpp
72
73     platform/network/win/DownloadBundleWin.cpp
74     platform/network/win/NetworkStateNotifierWin.cpp
75
76     platform/win/BString.cpp
77     platform/win/BitmapInfo.cpp
78     platform/win/ClipboardUtilitiesWin.cpp
79     platform/win/CursorWin.cpp
80     platform/win/DefWndProcWindowClass.cpp
81     platform/win/DragDataWin.cpp
82     platform/win/DragImageWin.cpp
83     platform/win/EventLoopWin.cpp
84     platform/win/GDIObjectCounter.cpp
85     platform/win/GDIUtilities.cpp
86     platform/win/KeyEventWin.cpp
87     platform/win/LocalizedStringsWin.cpp
88     platform/win/LoggingWin.cpp
89     platform/win/MIMETypeRegistryWin.cpp
90     platform/win/MainThreadSharedTimerWin.cpp
91     platform/win/PasteboardWin.cpp
92     platform/win/PlatformMouseEventWin.cpp
93     platform/win/PlatformScreenWin.cpp
94     platform/win/PopupMenuWin.cpp
95     platform/win/SSLKeyGeneratorWin.cpp
96     platform/win/ScrollbarThemeWin.cpp
97     platform/win/SearchPopupMenuDB.cpp
98     platform/win/SearchPopupMenuWin.cpp
99     platform/win/SharedBufferWin.cpp
100     platform/win/StructuredExceptionHandlerSuppressor.cpp
101     platform/win/SystemInfo.cpp
102     platform/win/UserAgentWin.cpp
103     platform/win/WCDataObject.cpp
104     platform/win/WebCoreBundleWin.cpp
105     platform/win/WebCoreInstanceHandle.cpp
106     platform/win/WebCoreTextRenderer.cpp
107     platform/win/WheelEventWin.cpp
108     platform/win/WidgetWin.cpp
109     platform/win/WindowMessageBroadcaster.cpp
110
111     rendering/RenderThemeWin.cpp
112 )
113
114 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
115     ${WEBCORE_DIR}/css/themeWin.css
116     ${WEBCORE_DIR}/css/themeWinQuirks.css
117 )
118
119 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
120     .
121     accessibility
122     animation
123     bindings
124     bridge
125     contentextensions
126     crypto
127     css
128     dom
129     editing
130     fileapi
131     history
132     html
133     inspector
134     loader
135     page
136     platform
137     plugins
138     rendering
139     replay
140     storage
141     style
142     svg
143     websockets
144     workers
145     xml
146
147     Modules/cache
148     Modules/fetch
149     Modules/geolocation
150     Modules/indexeddb
151     Modules/mediastream
152     Modules/websockets
153
154     Modules/indexeddb/client
155     Modules/indexeddb/legacy
156     Modules/indexeddb/server
157     Modules/indexeddb/shared
158     Modules/notifications
159     Modules/webdatabase
160
161     accessibility/win
162
163     bindings/js
164
165     bridge/c
166     bridge/jsc
167
168     css/parser
169
170     html/canvas
171     html/forms
172     html/parser
173     html/shadow
174     html/track
175
176     loader/appcache
177     loader/archive
178     loader/cache
179     loader/icon
180
181     page/animation
182     page/csp
183     page/scrolling
184     page/win
185
186     platform/animation
187     platform/audio
188     platform/graphics
189     platform/mediacapabilities
190     platform/mock
191     platform/network
192     platform/sql
193     platform/text
194     platform/win
195
196     platform/graphics/filters
197     platform/graphics/opengl
198     platform/graphics/opentype
199     platform/graphics/texmap
200     platform/graphics/transforms
201     platform/graphics/win
202
203     platform/mediastream/libwebrtc
204
205     platform/text/transcoder
206
207     rendering/line
208     rendering/shapes
209     rendering/style
210     rendering/svg
211
212     svg/animation
213     svg/graphics
214     svg/properties
215
216     svg/graphics/filters
217
218     workers/service
219 )
220
221 if (ENABLE_WEBKIT)
222     list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
223         Modules/applicationmanifest
224
225         dom/messageports
226
227         inspector/agents
228
229         platform/mediacapabilities
230         platform/mediastream
231
232         workers/service/context
233         workers/service/server
234     )
235 endif ()
236
237 if (USE_CF)
238     list(APPEND WebCore_INCLUDE_DIRECTORIES
239         "${WEBCORE_DIR}/platform/cf"
240         "${WEBCORE_DIR}/platform/cf/win"
241     )
242
243     list(APPEND WebCore_SOURCES
244         editing/SmartReplaceCF.cpp
245
246         loader/archive/cf/LegacyWebArchive.cpp
247
248         platform/cf/KeyedDecoderCF.cpp
249         platform/cf/KeyedEncoderCF.cpp
250         platform/cf/SharedBufferCF.cpp
251
252         platform/cf/win/CertificateCFWin.cpp
253
254         platform/text/cf/HyphenationCF.cpp
255     )
256
257     list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
258         history/cf
259
260         loader/archive/cf
261
262         platform/cf
263
264         platform/cf/win
265     )
266
267     list(APPEND WebCore_LIBRARIES ${COREFOUNDATION_LIBRARY})
268     list(APPEND WebCoreTestSupport_LIBRARIES ${COREFOUNDATION_LIBRARY})
269 else ()
270     list(APPEND WebCore_SOURCES
271         platform/generic/KeyedDecoderGeneric.cpp
272         platform/generic/KeyedEncoderGeneric.cpp
273
274         platform/text/Hyphenation.cpp
275     )
276
277     list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
278         platform/generic
279     )
280 endif ()
281
282 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
283     list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
284     add_custom_command(
285         OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj
286         DEPENDS ${WEBCORE_DIR}/platform/win/makesafeseh.asm
287         COMMAND ml /safeseh /c /Fo ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj ${WEBCORE_DIR}/platform/win/makesafeseh.asm
288         VERBATIM)
289 endif ()
290
291 if (${WTF_PLATFORM_WIN_CAIRO})
292     include(PlatformWinCairo.cmake)
293 else ()
294     include(PlatformAppleWin.cmake)
295 endif ()
296
297 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
298 file(COPY
299     "${WEBCORE_DIR}/en.lproj/Localizable.strings"
300     "${WEBCORE_DIR}/en.lproj/mediaControlsLocalizedStrings.js"
301     DESTINATION
302     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj
303 )
304 file(COPY
305     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.css"
306     "${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js"
307     DESTINATION
308     ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources
309 )
310 if (WTF_PLATFORM_WIN_CAIRO AND EXISTS ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem)
311     make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates)
312     file(COPY
313         ${WEBKIT_LIBRARIES_DIR}/etc/ssl/cert.pem
314         DESTINATION
315         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates
316     )
317     file(RENAME
318         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cert.pem
319         ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/certificates/cacert.pem
320     )
321 endif ()
322
323 set(WebCore_PRIVATE_FRAMEWORK_HEADERS
324     ${DERIVED_SOURCES_WEBCORE_DIR}/CSSPropertyNames.h
325     ${DERIVED_SOURCES_WEBCORE_DIR}/CSSValueKeywords.h
326     ${DERIVED_SOURCES_WEBCORE_DIR}/EventInterfaces.h
327     ${DERIVED_SOURCES_WEBCORE_DIR}/EventTargetInterfaces.h
328     ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLElementTypeHelpers.h
329     ${DERIVED_SOURCES_WEBCORE_DIR}/HTMLNames.h
330     ${DERIVED_SOURCES_WEBCORE_DIR}/HTTPHeaderNames.h
331     ${DERIVED_SOURCES_WEBCORE_DIR}/JSBlob.h
332     ${DERIVED_SOURCES_WEBCORE_DIR}/JSCSSStyleDeclaration.h
333     ${DERIVED_SOURCES_WEBCORE_DIR}/JSDOMBindingInternalsBuiltins.h
334     ${DERIVED_SOURCES_WEBCORE_DIR}/JSDOMWindow.h
335     ${DERIVED_SOURCES_WEBCORE_DIR}/JSDocument.h
336     ${DERIVED_SOURCES_WEBCORE_DIR}/JSElement.h
337     ${DERIVED_SOURCES_WEBCORE_DIR}/JSEventTarget.h
338     ${DERIVED_SOURCES_WEBCORE_DIR}/JSFile.h
339     ${DERIVED_SOURCES_WEBCORE_DIR}/JSHTMLElement.h
340     ${DERIVED_SOURCES_WEBCORE_DIR}/JSNode.h
341     ${DERIVED_SOURCES_WEBCORE_DIR}/JSNotification.h
342     ${DERIVED_SOURCES_WEBCORE_DIR}/JSRange.h
343     ${DERIVED_SOURCES_WEBCORE_DIR}/JSReadableStream.h
344     ${DERIVED_SOURCES_WEBCORE_DIR}/JSReadableStreamDefaultController.h
345     ${DERIVED_SOURCES_WEBCORE_DIR}/RTCPeerConnectionInternalsBuiltins.h
346     ${DERIVED_SOURCES_WEBCORE_DIR}/ReadableByteStreamInternalsBuiltins.h
347     ${DERIVED_SOURCES_WEBCORE_DIR}/ReadableStreamInternalsBuiltins.h
348     ${DERIVED_SOURCES_WEBCORE_DIR}/Settings.h
349     ${DERIVED_SOURCES_WEBCORE_DIR}/StreamInternalsBuiltins.h
350     ${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreJSBuiltinInternals.h
351     ${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreJSBuiltins.h
352     ${DERIVED_SOURCES_WEBCORE_DIR}/WebKitFontFamilyNames.h
353     ${DERIVED_SOURCES_WEBCORE_DIR}/WritableStreamInternalsBuiltins.h
354 )
355
356 WEBKIT_MAKE_FORWARDING_HEADERS(WebCore
357     FILES ${WebCore_PRIVATE_FRAMEWORK_HEADERS}
358     DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES}
359     FLATTENED
360 )
361
362 add_dependencies(WebCoreForwardingHeaders WebCoreBindings)
363
364 set(WebCore_OUTPUT_NAME
365     WebCore${DEBUG_SUFFIX}
366 )
367
368 list(APPEND WebCore_LIBRARIES WTFFramework)
369 if (TARGET libEGL)
370     list(APPEND WebCore_LIBRARIES libEGL)
371 endif ()
372 list(APPEND WebCoreTestSupport_LIBRARIES WTFFramework)