Polish code for r189579.
[WebKit-https.git] / Source / WebKit / PlatformWin.cmake
1 if (${WTF_PLATFORM_WIN_CAIRO})
2     add_definitions(-DUSE_CAIRO=1 -DUSE_CURL=1 -DWEBKIT_EXPORTS=1)
3     list(APPEND WebKit_INCLUDE_DIRECTORIES
4         "${WEBKIT_LIBRARIES_DIR}/include"
5         "${WEBKIT_LIBRARIES_DIR}/include/cairo"
6         "${WEBKIT_LIBRARIES_DIR}/include/sqlite"
7         "${WEBCORE_DIR}/platform/graphics/cairo"
8     )
9     list(APPEND WebKit_SOURCES_Classes
10         win/WebDownloadCURL.cpp
11         win/WebURLAuthenticationChallengeSenderCURL.cpp
12     )
13     list(APPEND WebKit_LIBRARIES
14         PRIVATE libeay32.lib
15         PRIVATE mfuuid.lib
16         PRIVATE ssleay32.lib
17         PRIVATE strmiids.lib
18     )
19 else ()
20     list(APPEND WebKit_SOURCES_Classes
21         win/WebDownloadCFNet.cpp
22         win/WebURLAuthenticationChallengeSenderCFNet.cpp
23     )
24     list(APPEND WebKit_LIBRARIES
25         PRIVATE ASL${DEBUG_SUFFIX}
26         PRIVATE AVFoundationCF${DEBUG_SUFFIX}
27         PRIVATE CFNetwork${DEBUG_SUFFIX}
28         PRIVATE CoreAudioToolbox${DEBUG_SUFFIX}
29         PRIVATE CoreFoundation${DEBUG_SUFFIX}
30         PRIVATE CoreGraphics${DEBUG_SUFFIX}
31         PRIVATE CoreMedia${DEBUG_SUFFIX}
32         PRIVATE CoreText${DEBUG_SUFFIX}
33         PRIVATE CoreVideo${DEBUG_SUFFIX}
34         PRIVATE MediaAccessibility${DEBUG_SUFFIX}
35         PRIVATE QuartzCore${DEBUG_SUFFIX}
36         PRIVATE SQLite3${DEBUG_SUFFIX}
37         PRIVATE WebKitSystemInterface${DEBUG_SUFFIX}
38         PRIVATE WebKitQuartzCoreAdditions${DEBUG_SUFFIX}
39         PRIVATE libdispatch${DEBUG_SUFFIX}
40         PRIVATE libexslt${DEBUG_SUFFIX}
41         PRIVATE libicuin${DEBUG_SUFFIX}
42         PRIVATE libicuuc${DEBUG_SUFFIX}
43         PRIVATE libxml2${DEBUG_SUFFIX}
44         PRIVATE libxslt${DEBUG_SUFFIX}
45         PRIVATE zdll${DEBUG_SUFFIX}
46     )
47 endif ()
48
49 add_custom_command(
50     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h
51     MAIN_DEPENDENCY ${WEBKIT_DIR}/scripts/generate-webkitversion.pl
52     DEPENDS ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig
53     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/scripts/generate-webkitversion.pl --config ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig --outputDir ${DERIVED_SOURCES_WEBKIT_DIR}
54     VERBATIM)
55 list(APPEND WebKit_SOURCES ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h)
56
57 list(APPEND WebKit_INCLUDE_DIRECTORIES
58     "${CMAKE_BINARY_DIR}/../include/private"
59     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
60     "${CMAKE_BINARY_DIR}/../include/private/WebCore"
61     Storage
62     win
63     win/plugins
64     win/WebCoreSupport
65     WebKit.vcxproj/WebKit
66     "${WEBKIT_DIR}/.."
67     "${DERIVED_SOURCES_WEBKIT_DIR}/include"
68     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces"
69     "${DERIVED_SOURCES_DIR}"
70     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE"
71     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include"
72     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/egl"
73     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/ANGLE/include/khr"
74     "${DERIVED_SOURCES_DIR}/WebKit"
75 )
76
77 list(APPEND WebKit_INCLUDES
78     win/CFDictionaryPropertyBag.h
79     win/COMEnumVariant.h
80     win/COMPropertyBag.h
81     win/COMVariantSetter.h
82     win/CodeAnalysisConfig.h
83     win/DOMCSSClasses.h
84     win/DOMCoreClasses.h
85     win/DOMEventsClasses.h
86     win/DOMHTMLClasses.h
87     win/DefaultDownloadDelegate.h
88     win/DefaultPolicyDelegate.h
89     win/ForEachCoClass.h
90     win/FullscreenVideoController.h
91     win/MarshallingHelpers.h
92     win/MemoryStream.h
93     win/ProgIDMacros.h
94     win/WebActionPropertyBag.h
95     win/WebArchive.h
96     win/WebBackForwardList.h
97     win/WebCache.h
98     win/WebCachedFramePlatformData.h
99     win/WebCoreStatistics.h
100     win/WebDataSource.h
101     win/WebDatabaseManager.h
102     win/WebDocumentLoader.h
103     win/WebDownload.h
104     win/WebDropSource.h
105     win/WebElementPropertyBag.h
106     win/WebError.h
107     win/WebFrame.h
108     win/WebFramePolicyListener.h
109     win/WebGeolocationPolicyListener.h
110     win/WebGeolocationPosition.h
111     win/WebHTMLRepresentation.h
112     win/WebHistory.h
113     win/WebHistoryItem.h
114     win/WebIconDatabase.h
115     win/WebJavaScriptCollector.h
116     win/WebKitCOMAPI.h
117     win/WebKitClassFactory.h
118     win/WebKitDLL.h
119     win/WebKitGraphics.h
120     win/WebKitLogging.h
121     win/WebKitStatistics.h
122     win/WebKitStatisticsPrivate.h
123     win/WebKitSystemBits.h
124     win/WebLocalizableStrings.h
125     win/WebMutableURLRequest.h
126     win/WebNavigationData.h
127     win/WebNotification.h
128     win/WebNotificationCenter.h
129     win/WebPreferenceKeysPrivate.h
130     win/WebPreferences.h
131     win/WebResource.h
132     win/WebScriptObject.h
133     win/WebScriptWorld.h
134     win/WebSecurityOrigin.h
135     win/WebSerializedJSValue.h
136     win/WebTextRenderer.h
137     win/WebURLAuthenticationChallenge.h
138     win/WebURLAuthenticationChallengeSender.h
139     win/WebURLCredential.h
140     win/WebURLProtectionSpace.h
141     win/WebURLResponse.h
142     win/WebUserContentURLPattern.h
143     win/WebView.h
144     win/WebWorkersPrivate.h
145 )
146
147 list(APPEND WebKit_SOURCES_Classes
148     Storage/StorageAreaImpl.cpp
149     Storage/StorageAreaSync.cpp
150     Storage/StorageNamespaceImpl.cpp
151     Storage/StorageSyncManager.cpp
152     Storage/StorageThread.cpp
153     Storage/StorageTracker.cpp
154     Storage/WebDatabaseProvider.cpp
155     Storage/WebStorageNamespaceProvider.cpp
156
157     cf/WebCoreSupport/WebInspectorClientCF.cpp
158
159     win/AccessibleBase.cpp
160     win/AccessibleDocument.cpp
161     win/AccessibleImage.cpp
162     win/AccessibleTextImpl.cpp
163     win/CFDictionaryPropertyBag.cpp
164     win/DOMCSSClasses.cpp
165     win/DOMCoreClasses.cpp
166     win/DOMEventsClasses.cpp
167     win/DOMHTMLClasses.cpp
168     win/DefaultDownloadDelegate.cpp
169     win/DefaultPolicyDelegate.cpp
170     win/ForEachCoClass.cpp
171     win/FullscreenVideoController.cpp
172     win/MarshallingHelpers.cpp
173     win/MemoryStream.cpp
174     win/WebActionPropertyBag.cpp
175     win/WebArchive.cpp
176     win/WebBackForwardList.cpp
177     win/WebCache.cpp
178     win/WebCoreStatistics.cpp
179     win/WebDataSource.cpp
180     win/WebDatabaseManager.cpp
181     win/WebDocumentLoader.cpp
182     win/WebDownload.cpp
183     win/WebDropSource.cpp
184     win/WebElementPropertyBag.cpp
185     win/WebError.cpp
186     win/WebFrame.cpp
187     win/WebFramePolicyListener.cpp
188     win/WebGeolocationPolicyListener.cpp
189     win/WebGeolocationPosition.cpp
190     win/WebHTMLRepresentation.cpp
191     win/WebHistory.cpp
192     win/WebHistoryItem.cpp
193     win/WebIconDatabase.cpp
194     win/WebInspector.cpp
195     win/WebJavaScriptCollector.cpp
196     win/WebKitCOMAPI.cpp
197     win/WebKitClassFactory.cpp
198     win/WebKitDLL.cpp
199     win/WebKitLogging.cpp
200     win/WebKitMessageLoop.cpp
201     win/WebKitStatistics.cpp
202     win/WebKitSystemBits.cpp
203     win/WebLocalizableStrings.cpp
204     win/WebMutableURLRequest.cpp
205     win/WebNavigationData.cpp
206     win/WebNodeHighlight.cpp
207     win/WebNotification.cpp
208     win/WebNotificationCenter.cpp
209     win/WebPreferences.cpp
210     win/WebResource.cpp
211     win/WebScriptObject.cpp
212     win/WebScriptWorld.cpp
213     win/WebSecurityOrigin.cpp
214     win/WebSerializedJSValue.cpp
215     win/WebTextRenderer.cpp
216     win/WebURLAuthenticationChallenge.cpp
217     win/WebURLAuthenticationChallengeSender.cpp
218     win/WebURLCredential.cpp
219     win/WebURLProtectionSpace.cpp
220     win/WebURLResponse.cpp
221     win/WebUserContentURLPattern.cpp
222     win/WebView.cpp
223     win/WebWorkersPrivate.cpp
224
225     win/plugins/PluginDatabase.cpp
226     win/plugins/PluginDatabaseWin.cpp
227     win/plugins/PluginDebug.cpp
228     win/plugins/PluginMainThreadScheduler.cpp
229     win/plugins/PluginMessageThrottlerWin.cpp
230     win/plugins/PluginPackage.cpp
231     win/plugins/PluginPackageWin.cpp
232     win/plugins/PluginStream.cpp
233     win/plugins/PluginView.cpp
234     win/plugins/PluginViewWin.cpp
235     win/plugins/npapi.cpp
236 )
237
238 list(APPEND WebKit_SOURCES_WebCoreSupport
239     win/WebCoreSupport/AcceleratedCompositingContext.cpp
240     win/WebCoreSupport/EmbeddedWidget.cpp
241     win/WebCoreSupport/EmbeddedWidget.h
242     win/WebCoreSupport/WebChromeClient.cpp
243     win/WebCoreSupport/WebChromeClient.h
244     win/WebCoreSupport/WebContextMenuClient.cpp
245     win/WebCoreSupport/WebContextMenuClient.h
246     win/WebCoreSupport/WebDesktopNotificationsDelegate.cpp
247     win/WebCoreSupport/WebDesktopNotificationsDelegate.h
248     win/WebCoreSupport/WebDragClient.cpp
249     win/WebCoreSupport/WebDragClient.h
250     win/WebCoreSupport/WebEditorClient.cpp
251     win/WebCoreSupport/WebEditorClient.h
252     win/WebCoreSupport/WebFrameLoaderClient.cpp
253     win/WebCoreSupport/WebFrameLoaderClient.h
254     win/WebCoreSupport/WebFrameNetworkingContext.cpp
255     win/WebCoreSupport/WebFrameNetworkingContext.h
256     win/WebCoreSupport/WebGeolocationClient.cpp
257     win/WebCoreSupport/WebGeolocationClient.h
258     win/WebCoreSupport/WebInspectorClient.cpp
259     win/WebCoreSupport/WebInspectorClient.h
260     win/WebCoreSupport/WebInspectorDelegate.cpp
261     win/WebCoreSupport/WebInspectorDelegate.h
262     win/WebCoreSupport/WebPlatformStrategies.cpp
263     win/WebCoreSupport/WebPlatformStrategies.h
264     win/WebCoreSupport/WebVisitedLinkStore.cpp
265     win/WebCoreSupport/WebVisitedLinkStore.h
266 )
267
268 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
269     enable_language(ASM_MASM)
270     list(APPEND WebKit_SOURCES
271         win/plugins/PaintHooks.asm
272     )
273 endif ()
274
275 list(APPEND WebKit_SOURCES ${WebKit_INCLUDES} ${WebKit_SOURCES_Classes} ${WebKit_SOURCES_WebCoreSupport})
276
277 source_group(Includes FILES ${WebKit_INCLUDES})
278 source_group(Classes FILES ${WebKit_SOURCES_Classes})
279 source_group(WebCoreSupport FILES ${WebKit_SOURCES_WebCoreSupport})
280
281 # Build the COM interface:
282 macro(GENERATE_INTERFACE _infile _defines _depends)
283     get_filename_component(_filewe ${_infile} NAME_WE)
284     add_custom_command(
285         OUTPUT  ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h
286         MAIN_DEPENDENCY ${_infile}
287         DEPENDS ${_depends}
288         COMMAND midl.exe /I "${CMAKE_CURRENT_SOURCE_DIR}/win/Interfaces" /I "${CMAKE_CURRENT_SOURCE_DIR}/win/Interfaces/Accessible2" /I "${DERIVED_SOURCES_WEBKIT_DIR}/include" /I "${CMAKE_CURRENT_SOURCE_DIR}/win" /WX /char signed /env win32 /tlb "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_filewe}.tlb" /out "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces" /h "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h" /iid "${_filewe}_i.c" ${_defines} "${CMAKE_CURRENT_SOURCE_DIR}/${_infile}"
289         VERBATIM)
290     set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h PROPERTIES GENERATED TRUE)
291     set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}_i.c PROPERTIES GENERATED TRUE)
292 endmacro()
293
294 set(MIDL_DEFINES /D\ \"__PRODUCTION__=01\")
295
296 set(WEBKIT_IDL_DEPENDENCIES
297     win/Interfaces/AccessibleComparable.idl
298     win/Interfaces/DOMCSS.idl
299     win/Interfaces/DOMCore.idl
300     win/Interfaces/DOMEvents.idl
301     win/Interfaces/DOMExtensions.idl
302     win/Interfaces/DOMHTML.idl
303     win/Interfaces/DOMPrivate.idl
304     win/Interfaces/DOMRange.idl
305     win/Interfaces/DOMWindow.idl
306     win/Interfaces/IGEN_DOMObject.idl
307     win/Interfaces/IWebArchive.idl
308     win/Interfaces/IWebBackForwardList.idl
309     win/Interfaces/IWebBackForwardListPrivate.idl
310     win/Interfaces/IWebCache.idl
311     win/Interfaces/IWebCoreStatistics.idl
312     win/Interfaces/IWebDataSource.idl
313     win/Interfaces/IWebDatabaseManager.idl
314     win/Interfaces/IWebDesktopNotificationsDelegate.idl
315     win/Interfaces/IWebDocument.idl
316     win/Interfaces/IWebDownload.idl
317     win/Interfaces/IWebEditingDelegate.idl
318     win/Interfaces/IWebEmbeddedView.idl
319     win/Interfaces/IWebError.idl
320     win/Interfaces/IWebErrorPrivate.idl
321     win/Interfaces/IWebFormDelegate.idl
322     win/Interfaces/IWebFrame.idl
323     win/Interfaces/IWebFrameLoadDelegate.idl
324     win/Interfaces/IWebFrameLoadDelegatePrivate.idl
325     win/Interfaces/IWebFrameLoadDelegatePrivate2.idl
326     win/Interfaces/IWebFramePrivate.idl
327     win/Interfaces/IWebFrameView.idl
328     win/Interfaces/IWebGeolocationPolicyListener.idl
329     win/Interfaces/IWebGeolocationPosition.idl
330     win/Interfaces/IWebGeolocationProvider.idl
331     win/Interfaces/IWebHTMLRepresentation.idl
332     win/Interfaces/IWebHTTPURLResponse.idl
333     win/Interfaces/IWebHistory.idl
334     win/Interfaces/IWebHistoryDelegate.idl
335     win/Interfaces/IWebHistoryItem.idl
336     win/Interfaces/IWebHistoryItemPrivate.idl
337     win/Interfaces/IWebHistoryPrivate.idl
338     win/Interfaces/IWebIconDatabase.idl
339     win/Interfaces/IWebInspector.idl
340     win/Interfaces/IWebInspectorPrivate.idl
341     win/Interfaces/IWebJavaScriptCollector.idl
342     win/Interfaces/IWebKitStatistics.idl
343     win/Interfaces/IWebMutableURLRequest.idl
344     win/Interfaces/IWebMutableURLRequestPrivate.idl
345     win/Interfaces/IWebNavigationData.idl
346     win/Interfaces/IWebNotification.idl
347     win/Interfaces/IWebNotificationCenter.idl
348     win/Interfaces/IWebNotificationObserver.idl
349     win/Interfaces/IWebPolicyDelegate.idl
350     win/Interfaces/IWebPolicyDelegatePrivate.idl
351     win/Interfaces/IWebPreferences.idl
352     win/Interfaces/IWebPreferencesPrivate.idl
353     win/Interfaces/IWebResource.idl
354     win/Interfaces/IWebResourceLoadDelegate.idl
355     win/Interfaces/IWebResourceLoadDelegatePrivate.idl
356     win/Interfaces/IWebResourceLoadDelegatePrivate2.idl
357     win/Interfaces/IWebScriptObject.idl
358     win/Interfaces/IWebScriptWorld.idl
359     win/Interfaces/IWebSecurityOrigin.idl
360     win/Interfaces/IWebSerializedJSValue.idl
361     win/Interfaces/IWebSerializedJSValuePrivate.idl
362     win/Interfaces/IWebTextRenderer.idl
363     win/Interfaces/IWebUIDelegate.idl
364     win/Interfaces/IWebUIDelegate2.idl
365     win/Interfaces/IWebUIDelegatePrivate.idl
366     win/Interfaces/IWebURLAuthenticationChallenge.idl
367     win/Interfaces/IWebURLRequest.idl
368     win/Interfaces/IWebURLResponse.idl
369     win/Interfaces/IWebURLResponsePrivate.idl
370     win/Interfaces/IWebUndoManager.idl
371     win/Interfaces/IWebUndoTarget.idl
372     win/Interfaces/IWebUserContentURLPattern.idl
373     win/Interfaces/IWebView.idl
374     win/Interfaces/IWebViewPrivate.idl
375     win/Interfaces/IWebWorkersPrivate.idl
376     win/Interfaces/JavaScriptCoreAPITypes.idl
377     win/Interfaces/WebKit.idl
378     win/Interfaces/WebScrollbarTypes.idl
379
380     win/Interfaces/Accessible2/Accessible2.idl
381     win/Interfaces/Accessible2/Accessible2_2.idl
382     win/Interfaces/Accessible2/AccessibleApplication.idl
383     win/Interfaces/Accessible2/AccessibleEditableText.idl
384     win/Interfaces/Accessible2/AccessibleRelation.idl
385     win/Interfaces/Accessible2/AccessibleStates.idl
386     win/Interfaces/Accessible2/AccessibleText.idl
387     win/Interfaces/Accessible2/AccessibleText2.idl
388     win/Interfaces/Accessible2/IA2CommonTypes.idl
389     "${DERIVED_SOURCES_WEBKIT_DIR}/autoversion.h"
390 )
391
392 add_custom_command(
393     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/autoversion.h
394     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
395     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_WEBKIT_DIR}
396     VERBATIM)
397
398 GENERATE_INTERFACE(win/Interfaces/WebKit.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
399 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleApplication.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
400 GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
401 GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2_2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
402 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleRelation.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
403 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleStates.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
404 GENERATE_INTERFACE(win/Interfaces/Accessible2/IA2CommonTypes.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
405 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleEditableText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
406 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
407 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
408
409 add_library(WebKitGUID STATIC
410     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit.h"
411     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication.h"
412     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2.h"
413     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2.h"
414     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation.h"
415     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleStates.h"
416     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/IA2CommonTypes.h"
417     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText.h"
418     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText.h"
419     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2.h"
420     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit_i.c"
421     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication_i.c"
422     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_i.c"
423     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2_i.c"
424     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation_i.c"
425     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText_i.c"
426     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText_i.c"
427     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2_i.c"
428 )
429 set_target_properties(WebKitGUID PROPERTIES OUTPUT_NAME WebKitGUID${DEBUG_SUFFIX})
430 set_target_properties(WebKitGUID PROPERTIES FOLDER "WebKit")
431
432 list(APPEND WebKit_LIBRARIES
433     PRIVATE Comctl32
434     PRIVATE Comsupp
435     PRIVATE Crypt32
436     PRIVATE Iphlpapi
437     PRIVATE Rpcrt4
438     PRIVATE Shlwapi
439     PRIVATE Usp10
440     PRIVATE Version
441     PRIVATE Winmm
442     PRIVATE WebKitGUID${DEBUG_SUFFIX}
443 )
444
445 if (ENABLE_GRAPHICS_CONTEXT_3D)
446     list(APPEND WebKit_LIBRARIES
447         libANGLE${DEBUG_SUFFIX}
448         libEGL${DEBUG_SUFFIX}
449         libGLESv2${DEBUG_SUFFIX}
450     )
451 endif ()
452
453 set(WebKit_LIBRARY_TYPE SHARED)
454
455 # We need the webkit libraries to come before the system default libraries to prevent symbol conflicts with uuid.lib.
456 # To do this we add system default libs as webkit libs and zero out system default libs.
457 string(REPLACE " " "\;" CXX_LIBS ${CMAKE_CXX_STANDARD_LIBRARIES})
458 list(APPEND WebKit_LIBRARIES ${CXX_LIBS})
459 set(CMAKE_CXX_STANDARD_LIBRARIES "")
460
461 if (${WTF_PLATFORM_WIN_CAIRO})
462     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT /NODEFAULTLIB:LIBCMTD")
463 else ()
464     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
465 endif ()
466
467 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
468 # It fails with an unusual error - midl failed - failed to save all changes
469 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
470 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces)
471
472 set(WebKitGUID_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKit/postBuild.cmd")
473 file(WRITE "${WebKitGUID_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit\" >nul 2>nul\n@xcopy /y /d /f \"${CMAKE_CURRENT_SOURCE_DIR}/win/WebKitCOMAPI.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit\" >nul 2>nul\n@xcopy /y /d /f \"${CMAKE_CURRENT_SOURCE_DIR}/win/CFDictionaryPropertyBag.h\" \"${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit\" >nul 2>nul\n")
474 file(MAKE_DIRECTORY ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit)
475 add_custom_command(TARGET WebKitGUID POST_BUILD COMMAND ${WebKitGUID_POST_BUILD_COMMAND} VERBATIM)