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