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