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