9c1f1a851afe4dbc9be12cb35bb400271b463202
[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     )
33 endif ()
34
35 list(APPEND WebKit_LIBRARIES PRIVATE WTF${DEBUG_SUFFIX})
36
37 add_custom_command(
38     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h
39     MAIN_DEPENDENCY ${WEBKIT_DIR}/scripts/generate-webkitversion.pl
40     DEPENDS ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig
41     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/scripts/generate-webkitversion.pl --config ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig --outputDir ${DERIVED_SOURCES_WEBKIT_DIR}
42     VERBATIM)
43 list(APPEND WebKit_SOURCES ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h)
44
45 list(APPEND WebKit_INCLUDE_DIRECTORIES
46     "${CMAKE_BINARY_DIR}/../include/private"
47     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
48     "${CMAKE_BINARY_DIR}/../include/private/WebCore"
49     "${WEBKIT_DIR}/win"
50     "${WEBKIT_DIR}/win/plugins"
51     "${WEBKIT_DIR}/win/WebCoreSupport"
52     "${DERIVED_SOURCES_WEBKIT_DIR}/include"
53     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces"
54     "${FORWARDING_HEADERS_DIR}/ANGLE"
55     "${FORWARDING_HEADERS_DIR}/ANGLE/include"
56     "${FORWARDING_HEADERS_DIR}/ANGLE/include/egl"
57     "${FORWARDING_HEADERS_DIR}/ANGLE/include/khr"
58     "${DERIVED_SOURCES_DIR}/WebKit"
59 )
60
61 list(APPEND WebKit_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 WebKit_SOURCES_Classes
132     cf/WebCoreSupport/WebInspectorClientCF.cpp
133
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 WebKit_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 (CMAKE_SIZEOF_VOID_P EQUAL 8)
249     enable_language(ASM_MASM)
250     if (MSVC)
251         set(MASM_EXECUTABLE ml64)
252         set(MASM_FLAGS /c /Fo)
253         add_custom_command(
254             OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
255             MAIN_DEPENDENCY win/plugins/PaintHooks.asm
256             COMMAND ${MASM_EXECUTABLE} ${MASM_FLAGS}
257                 ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
258                 ${CMAKE_CURRENT_SOURCE_DIR}/win/plugins/PaintHooks.asm
259             VERBATIM)
260         list(APPEND WebKit_SOURCES
261             ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
262         )
263     else ()
264         list(APPEND WebKit_SOURCES
265             win/plugins/PaintHooks.asm
266         )
267     endif ()
268 endif ()
269
270 list(APPEND WebKit_SOURCES ${WebKit_INCLUDES} ${WebKit_SOURCES_Classes} ${WebKit_SOURCES_WebCoreSupport})
271
272 source_group(Includes FILES ${WebKit_INCLUDES})
273 source_group(Classes FILES ${WebKit_SOURCES_Classes})
274 source_group(WebCoreSupport FILES ${WebKit_SOURCES_WebCoreSupport})
275
276 # Build the COM interface:
277 macro(GENERATE_INTERFACE _infile _defines _depends)
278     get_filename_component(_filewe ${_infile} NAME_WE)
279     add_custom_command(
280         OUTPUT  ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h
281         MAIN_DEPENDENCY ${_infile}
282         DEPENDS ${_depends}
283         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}"
284         VERBATIM)
285     set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h PROPERTIES GENERATED TRUE)
286     set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}_i.c PROPERTIES GENERATED TRUE)
287 endmacro()
288
289 set(MIDL_DEFINES /D\ \"__PRODUCTION__=01\")
290
291 set(WEBKIT_IDL_DEPENDENCIES
292     win/Interfaces/AccessibleComparable.idl
293     win/Interfaces/DOMCSS.idl
294     win/Interfaces/DOMCore.idl
295     win/Interfaces/DOMEvents.idl
296     win/Interfaces/DOMExtensions.idl
297     win/Interfaces/DOMHTML.idl
298     win/Interfaces/DOMPrivate.idl
299     win/Interfaces/DOMRange.idl
300     win/Interfaces/DOMWindow.idl
301     win/Interfaces/IGEN_DOMObject.idl
302     win/Interfaces/IWebArchive.idl
303     win/Interfaces/IWebBackForwardList.idl
304     win/Interfaces/IWebBackForwardListPrivate.idl
305     win/Interfaces/IWebCache.idl
306     win/Interfaces/IWebCoreStatistics.idl
307     win/Interfaces/IWebDataSource.idl
308     win/Interfaces/IWebDatabaseManager.idl
309     win/Interfaces/IWebDesktopNotificationsDelegate.idl
310     win/Interfaces/IWebDocument.idl
311     win/Interfaces/IWebDownload.idl
312     win/Interfaces/IWebEditingDelegate.idl
313     win/Interfaces/IWebEmbeddedView.idl
314     win/Interfaces/IWebError.idl
315     win/Interfaces/IWebErrorPrivate.idl
316     win/Interfaces/IWebFormDelegate.idl
317     win/Interfaces/IWebFrame.idl
318     win/Interfaces/IWebFrameLoadDelegate.idl
319     win/Interfaces/IWebFrameLoadDelegatePrivate.idl
320     win/Interfaces/IWebFrameLoadDelegatePrivate2.idl
321     win/Interfaces/IWebFramePrivate.idl
322     win/Interfaces/IWebFrameView.idl
323     win/Interfaces/IWebGeolocationPolicyListener.idl
324     win/Interfaces/IWebGeolocationPosition.idl
325     win/Interfaces/IWebGeolocationProvider.idl
326     win/Interfaces/IWebHTMLRepresentation.idl
327     win/Interfaces/IWebHTTPURLResponse.idl
328     win/Interfaces/IWebHistory.idl
329     win/Interfaces/IWebHistoryDelegate.idl
330     win/Interfaces/IWebHistoryItem.idl
331     win/Interfaces/IWebHistoryItemPrivate.idl
332     win/Interfaces/IWebHistoryPrivate.idl
333     win/Interfaces/IWebInspector.idl
334     win/Interfaces/IWebInspectorPrivate.idl
335     win/Interfaces/IWebJavaScriptCollector.idl
336     win/Interfaces/IWebKitStatistics.idl
337     win/Interfaces/IWebMutableURLRequest.idl
338     win/Interfaces/IWebMutableURLRequestPrivate.idl
339     win/Interfaces/IWebNavigationData.idl
340     win/Interfaces/IWebNotification.idl
341     win/Interfaces/IWebNotificationCenter.idl
342     win/Interfaces/IWebNotificationObserver.idl
343     win/Interfaces/IWebPolicyDelegate.idl
344     win/Interfaces/IWebPolicyDelegatePrivate.idl
345     win/Interfaces/IWebPreferences.idl
346     win/Interfaces/IWebPreferencesPrivate.idl
347     win/Interfaces/IWebResource.idl
348     win/Interfaces/IWebResourceLoadDelegate.idl
349     win/Interfaces/IWebResourceLoadDelegatePrivate.idl
350     win/Interfaces/IWebResourceLoadDelegatePrivate2.idl
351     win/Interfaces/IWebScriptObject.idl
352     win/Interfaces/IWebScriptWorld.idl
353     win/Interfaces/IWebSecurityOrigin.idl
354     win/Interfaces/IWebSerializedJSValue.idl
355     win/Interfaces/IWebSerializedJSValuePrivate.idl
356     win/Interfaces/IWebTextRenderer.idl
357     win/Interfaces/IWebUIDelegate.idl
358     win/Interfaces/IWebUIDelegate2.idl
359     win/Interfaces/IWebUIDelegatePrivate.idl
360     win/Interfaces/IWebURLAuthenticationChallenge.idl
361     win/Interfaces/IWebURLRequest.idl
362     win/Interfaces/IWebURLResponse.idl
363     win/Interfaces/IWebURLResponsePrivate.idl
364     win/Interfaces/IWebUndoManager.idl
365     win/Interfaces/IWebUndoTarget.idl
366     win/Interfaces/IWebUserContentURLPattern.idl
367     win/Interfaces/IWebView.idl
368     win/Interfaces/IWebViewPrivate.idl
369     win/Interfaces/IWebWorkersPrivate.idl
370     win/Interfaces/JavaScriptCoreAPITypes.idl
371     win/Interfaces/WebKit.idl
372     win/Interfaces/WebScrollbarTypes.idl
373
374     win/Interfaces/Accessible2/Accessible2.idl
375     win/Interfaces/Accessible2/Accessible2_2.idl
376     win/Interfaces/Accessible2/AccessibleApplication.idl
377     win/Interfaces/Accessible2/AccessibleEditableText.idl
378     win/Interfaces/Accessible2/AccessibleRelation.idl
379     win/Interfaces/Accessible2/AccessibleStates.idl
380     win/Interfaces/Accessible2/AccessibleText.idl
381     win/Interfaces/Accessible2/AccessibleText2.idl
382     win/Interfaces/Accessible2/IA2CommonTypes.idl
383     "${DERIVED_SOURCES_WEBKIT_DIR}/include/autoversion.h"
384 )
385
386 add_custom_command(
387     OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/include/autoversion.h
388     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
389     COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_WEBKIT_DIR}
390     VERBATIM)
391
392 GENERATE_INTERFACE(win/Interfaces/WebKit.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
393 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleApplication.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
394 GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
395 GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2_2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
396 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleRelation.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
397 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleStates.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
398 GENERATE_INTERFACE(win/Interfaces/Accessible2/IA2CommonTypes.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
399 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleEditableText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
400 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
401 GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
402
403 add_library(WebKitGUID STATIC
404     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit.h"
405     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication.h"
406     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2.h"
407     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2.h"
408     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation.h"
409     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleStates.h"
410     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/IA2CommonTypes.h"
411     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText.h"
412     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText.h"
413     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2.h"
414     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit_i.c"
415     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication_i.c"
416     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_i.c"
417     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2_i.c"
418     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation_i.c"
419     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText_i.c"
420     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText_i.c"
421     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2_i.c"
422 )
423 set_target_properties(WebKitGUID PROPERTIES OUTPUT_NAME WebKitGUID${DEBUG_SUFFIX})
424
425 list(APPEND WebKit_LIBRARIES
426     PRIVATE Comctl32
427     PRIVATE Comsupp
428     PRIVATE Crypt32
429     PRIVATE D2d1
430     PRIVATE Dwrite
431     PRIVATE dxguid
432     PRIVATE Iphlpapi
433     PRIVATE Psapi
434     PRIVATE Rpcrt4
435     PRIVATE Shlwapi
436     PRIVATE Usp10
437     PRIVATE Version
438     PRIVATE Winmm
439     PRIVATE WebKitGUID${DEBUG_SUFFIX}
440     PRIVATE WebCoreDerivedSources${DEBUG_SUFFIX}
441     PRIVATE WindowsCodecs
442 )
443
444 if (ENABLE_GRAPHICS_CONTEXT_3D)
445     list(APPEND WebKit_LIBRARIES
446         libANGLE${DEBUG_SUFFIX}
447         libEGL${DEBUG_SUFFIX}
448         libGLESv2${DEBUG_SUFFIX}
449     )
450 endif ()
451
452 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
453 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
454
455 # We need the webkit libraries to come before the system default libraries to prevent symbol conflicts with uuid.lib.
456 # To do this we add system default libs as webkit libs and zero out system default libs.
457 string(REPLACE " " "\;" CXX_LIBS ${CMAKE_CXX_STANDARD_LIBRARIES})
458 list(APPEND WebKit_LIBRARIES ${CXX_LIBS})
459 set(CMAKE_CXX_STANDARD_LIBRARIES "")
460
461 set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
462
463 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
464 # It fails with an unusual error - midl failed - failed to save all changes
465 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
466 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces)
467
468 set(WebKitGUID_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKit/preBuild.cmd")
469 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")
470 file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/WebKit)
471 add_custom_command(TARGET WebKitGUID PRE_BUILD COMMAND ${WebKitGUID_PRE_BUILD_COMMAND} VERBATIM)
472
473 set(WebKitGUID_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKit/postBuild.cmd")
474 file(WRITE "${WebKitGUID_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/*.h\" \"${FORWARDING_HEADERS_DIR}/WebKit\" >nul 2>nul")
475 add_custom_command(TARGET WebKitGUID POST_BUILD COMMAND ${WebKitGUID_POST_BUILD_COMMAND} VERBATIM)
476
477 set(WebKit_OUTPUT_NAME
478     WebKit${DEBUG_SUFFIX}
479 )