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