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