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