[CMake] Remove WebCoreDerivedSources library target
[WebKit-https.git] / Source / WebKitLegacy / PlatformWin.cmake
index b0e9a76e156bef7cdb5fcf2b4a2b646ffcacdae5..66005ba2a5b196bbdf2017a92a56fe3d7408172a 100644 (file)
@@ -1,69 +1,67 @@
 if (${WTF_PLATFORM_WIN_CAIRO})
     add_definitions(-DUSE_CAIRO=1 -DUSE_CURL=1 -DWEBKIT_EXPORTS=1)
 if (${WTF_PLATFORM_WIN_CAIRO})
     add_definitions(-DUSE_CAIRO=1 -DUSE_CURL=1 -DWEBKIT_EXPORTS=1)
-    list(APPEND WebKit_INCLUDE_DIRECTORIES
+    list(APPEND WebKitLegacy_INCLUDE_DIRECTORIES
         ${CAIRO_INCLUDE_DIRS}
         "${WEBKIT_LIBRARIES_DIR}/include"
         ${CAIRO_INCLUDE_DIRS}
         "${WEBKIT_LIBRARIES_DIR}/include"
-        "${WEBKIT_LIBRARIES_DIR}/include/sqlite"
         "${WEBCORE_DIR}/platform/graphics/cairo"
     )
         "${WEBCORE_DIR}/platform/graphics/cairo"
     )
-    list(APPEND WebKit_SOURCES_Classes
+    list(APPEND WebKitLegacy_SOURCES_Classes
         win/WebDownloadCURL.cpp
         win/WebURLAuthenticationChallengeSenderCURL.cpp
     )
         win/WebDownloadCURL.cpp
         win/WebURLAuthenticationChallengeSenderCURL.cpp
     )
-    list(APPEND WebKit_LIBRARIES
+    list(APPEND WebKitLegacy_LIBRARIES
         ${OPENSSL_LIBRARIES}
         PRIVATE mfuuid.lib
         PRIVATE strmiids.lib
     )
 else ()
         ${OPENSSL_LIBRARIES}
         PRIVATE mfuuid.lib
         PRIVATE strmiids.lib
     )
 else ()
-    list(APPEND WebKit_SOURCES_Classes
+    list(APPEND WebKitLegacy_SOURCES_Classes
         win/WebDownloadCFNet.cpp
         win/WebURLAuthenticationChallengeSenderCFNet.cpp
     )
         win/WebDownloadCFNet.cpp
         win/WebURLAuthenticationChallengeSenderCFNet.cpp
     )
-    list(APPEND WebKit_LIBRARIES
+    list(APPEND WebKitLegacy_LIBRARIES
         PRIVATE CFNetwork${DEBUG_SUFFIX}
         PRIVATE CFNetwork${DEBUG_SUFFIX}
-        PRIVATE CoreFoundation${DEBUG_SUFFIX}
         PRIVATE CoreGraphics${DEBUG_SUFFIX}
         PRIVATE CoreText${DEBUG_SUFFIX}
         PRIVATE QuartzCore${DEBUG_SUFFIX}
         PRIVATE CoreGraphics${DEBUG_SUFFIX}
         PRIVATE CoreText${DEBUG_SUFFIX}
         PRIVATE QuartzCore${DEBUG_SUFFIX}
-        PRIVATE SQLite3${DEBUG_SUFFIX}
         PRIVATE WebKitSystemInterface${DEBUG_SUFFIX}
         PRIVATE libdispatch${DEBUG_SUFFIX}
         PRIVATE libicuin${DEBUG_SUFFIX}
         PRIVATE libicuuc${DEBUG_SUFFIX}
         PRIVATE WebKitSystemInterface${DEBUG_SUFFIX}
         PRIVATE libdispatch${DEBUG_SUFFIX}
         PRIVATE libicuin${DEBUG_SUFFIX}
         PRIVATE libicuuc${DEBUG_SUFFIX}
-        PRIVATE libxml2${DEBUG_SUFFIX}
-        PRIVATE libxslt${DEBUG_SUFFIX}
-        PRIVATE zdll${DEBUG_SUFFIX}
+        PRIVATE ${LIBXML2_LIBRARIES}
+        PRIVATE ${LIBXSLT_LIBRARIES}
+        PRIVATE ${SQLITE_LIBRARIES}
+        PRIVATE ${ZLIB_LIBRARIES}
     )
 endif ()
 
     )
 endif ()
 
-list(APPEND WebKit_LIBRARIES PRIVATE WTF${DEBUG_SUFFIX})
+list(APPEND WebKitLegacy_LIBRARIES PRIVATE WTF${DEBUG_SUFFIX})
 
 add_custom_command(
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h
-    MAIN_DEPENDENCY ${WEBKIT_DIR}/scripts/generate-webkitversion.pl
-    DEPENDS ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_DIR}/scripts/generate-webkitversion.pl --config ${WEBKIT_DIR}/mac/Configurations/Version.xcconfig --outputDir ${DERIVED_SOURCES_WEBKIT_DIR}
+    OUTPUT ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitVersion.h
+    MAIN_DEPENDENCY ${WEBKITLEGACY_DIR}/scripts/generate-webkitversion.pl
+    DEPENDS ${WEBKITLEGACY_DIR}/mac/Configurations/Version.xcconfig
+    COMMAND ${PERL_EXECUTABLE} ${WEBKITLEGACY_DIR}/scripts/generate-webkitversion.pl --config ${WEBKITLEGACY_DIR}/mac/Configurations/Version.xcconfig --outputDir ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
     VERBATIM)
     VERBATIM)
-list(APPEND WebKit_SOURCES ${DERIVED_SOURCES_WEBKIT_DIR}/WebKitVersion.h)
+list(APPEND WebKitLegacy_SOURCES ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/WebKitVersion.h)
 
 
-list(APPEND WebKit_INCLUDE_DIRECTORIES
+list(APPEND WebKitLegacy_INCLUDE_DIRECTORIES
     "${CMAKE_BINARY_DIR}/../include/private"
     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
     "${CMAKE_BINARY_DIR}/../include/private/WebCore"
     "${CMAKE_BINARY_DIR}/../include/private"
     "${CMAKE_BINARY_DIR}/../include/private/JavaScriptCore"
     "${CMAKE_BINARY_DIR}/../include/private/WebCore"
-    "${WEBKIT_DIR}/win"
-    "${WEBKIT_DIR}/win/plugins"
-    "${WEBKIT_DIR}/win/WebCoreSupport"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/include"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces"
+    "${WEBKITLEGACY_DIR}/win"
+    "${WEBKITLEGACY_DIR}/win/plugins"
+    "${WEBKITLEGACY_DIR}/win/WebCoreSupport"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/include"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces"
     "${FORWARDING_HEADERS_DIR}/ANGLE"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include/egl"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include/khr"
     "${FORWARDING_HEADERS_DIR}/ANGLE"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include/egl"
     "${FORWARDING_HEADERS_DIR}/ANGLE/include/khr"
-    "${DERIVED_SOURCES_DIR}/WebKit"
+    "${DERIVED_SOURCES_DIR}/WebKitLegacy"
 )
 
 )
 
-list(APPEND WebKit_INCLUDES
+list(APPEND WebKitLegacy_INCLUDES
     win/CFDictionaryPropertyBag.h
     win/COMEnumVariant.h
     win/COMPropertyBag.h
     win/CFDictionaryPropertyBag.h
     win/COMEnumVariant.h
     win/COMPropertyBag.h
@@ -101,7 +99,6 @@ list(APPEND WebKit_INCLUDES
     win/WebHTMLRepresentation.h
     win/WebHistory.h
     win/WebHistoryItem.h
     win/WebHTMLRepresentation.h
     win/WebHistory.h
     win/WebHistoryItem.h
-    win/WebIconDatabase.h
     win/WebJavaScriptCollector.h
     win/WebKitCOMAPI.h
     win/WebKitClassFactory.h
     win/WebJavaScriptCollector.h
     win/WebKitCOMAPI.h
     win/WebKitClassFactory.h
@@ -134,9 +131,7 @@ list(APPEND WebKit_INCLUDES
     win/WebWorkersPrivate.h
 )
 
     win/WebWorkersPrivate.h
 )
 
-list(APPEND WebKit_SOURCES_Classes
-    cf/WebCoreSupport/WebInspectorClientCF.cpp
-
+list(APPEND WebKitLegacy_SOURCES_Classes
     win/AccessibleBase.cpp
     win/AccessibleDocument.cpp
     win/AccessibleImage.cpp
     win/AccessibleBase.cpp
     win/AccessibleDocument.cpp
     win/AccessibleImage.cpp
@@ -173,7 +168,6 @@ list(APPEND WebKit_SOURCES_Classes
     win/WebHTMLRepresentation.cpp
     win/WebHistory.cpp
     win/WebHistoryItem.cpp
     win/WebHTMLRepresentation.cpp
     win/WebHistory.cpp
     win/WebHistoryItem.cpp
-    win/WebIconDatabase.cpp
     win/WebInspector.cpp
     win/WebJavaScriptCollector.cpp
     win/WebKitCOMAPI.cpp
     win/WebInspector.cpp
     win/WebJavaScriptCollector.cpp
     win/WebKitCOMAPI.cpp
@@ -220,7 +214,7 @@ list(APPEND WebKit_SOURCES_Classes
     win/storage/WebDatabaseProvider.cpp
 )
 
     win/storage/WebDatabaseProvider.cpp
 )
 
-list(APPEND WebKit_SOURCES_WebCoreSupport
+list(APPEND WebKitLegacy_SOURCES_WebCoreSupport
     win/WebCoreSupport/AcceleratedCompositingContext.cpp
     win/WebCoreSupport/EmbeddedWidget.cpp
     win/WebCoreSupport/EmbeddedWidget.h
     win/WebCoreSupport/AcceleratedCompositingContext.cpp
     win/WebCoreSupport/EmbeddedWidget.cpp
     win/WebCoreSupport/EmbeddedWidget.h
@@ -252,50 +246,60 @@ list(APPEND WebKit_SOURCES_WebCoreSupport
     win/WebCoreSupport/WebVisitedLinkStore.h
 )
 
     win/WebCoreSupport/WebVisitedLinkStore.h
 )
 
+if (USE_CF)
+    list(APPEND WebKitLegacy_SOURCES_Classes
+        cf/WebCoreSupport/WebInspectorClientCF.cpp
+    )
+
+    list(APPEND WebKitLegacy_LIBRARIES
+        ${COREFOUNDATION_LIBRARY}
+    )
+endif ()
+
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     enable_language(ASM_MASM)
     if (MSVC)
         set(MASM_EXECUTABLE ml64)
         set(MASM_FLAGS /c /Fo)
         add_custom_command(
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     enable_language(ASM_MASM)
     if (MSVC)
         set(MASM_EXECUTABLE ml64)
         set(MASM_FLAGS /c /Fo)
         add_custom_command(
-            OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
+            OUTPUT ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/PaintHooks.obj
             MAIN_DEPENDENCY win/plugins/PaintHooks.asm
             COMMAND ${MASM_EXECUTABLE} ${MASM_FLAGS}
             MAIN_DEPENDENCY win/plugins/PaintHooks.asm
             COMMAND ${MASM_EXECUTABLE} ${MASM_FLAGS}
-                ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
+                ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/PaintHooks.obj
                 ${CMAKE_CURRENT_SOURCE_DIR}/win/plugins/PaintHooks.asm
             VERBATIM)
                 ${CMAKE_CURRENT_SOURCE_DIR}/win/plugins/PaintHooks.asm
             VERBATIM)
-        list(APPEND WebKit_SOURCES
-            ${DERIVED_SOURCES_WEBKIT_DIR}/PaintHooks.obj
+        list(APPEND WebKitLegacy_SOURCES
+            ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/PaintHooks.obj
         )
     else ()
         )
     else ()
-        list(APPEND WebKit_SOURCES
+        list(APPEND WebKitLegacy_SOURCES
             win/plugins/PaintHooks.asm
         )
     endif ()
 endif ()
 
             win/plugins/PaintHooks.asm
         )
     endif ()
 endif ()
 
-list(APPEND WebKit_SOURCES ${WebKit_INCLUDES} ${WebKit_SOURCES_Classes} ${WebKit_SOURCES_WebCoreSupport})
+list(APPEND WebKitLegacy_SOURCES ${WebKitLegacy_INCLUDES} ${WebKitLegacy_SOURCES_Classes} ${WebKitLegacy_SOURCES_WebCoreSupport})
 
 
-source_group(Includes FILES ${WebKit_INCLUDES})
-source_group(Classes FILES ${WebKit_SOURCES_Classes})
-source_group(WebCoreSupport FILES ${WebKit_SOURCES_WebCoreSupport})
+source_group(Includes FILES ${WebKitLegacy_INCLUDES})
+source_group(Classes FILES ${WebKitLegacy_SOURCES_Classes})
+source_group(WebCoreSupport FILES ${WebKitLegacy_SOURCES_WebCoreSupport})
 
 # Build the COM interface:
 macro(GENERATE_INTERFACE _infile _defines _depends)
     get_filename_component(_filewe ${_infile} NAME_WE)
     add_custom_command(
 
 # Build the COM interface:
 macro(GENERATE_INTERFACE _infile _defines _depends)
     get_filename_component(_filewe ${_infile} NAME_WE)
     add_custom_command(
-        OUTPUT  ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h
+        OUTPUT  ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/${_filewe}.h
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${_depends}
         MAIN_DEPENDENCY ${_infile}
         DEPENDS ${_depends}
-        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}"
+        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}"
         VERBATIM)
         VERBATIM)
-    set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}.h PROPERTIES GENERATED TRUE)
-    set_source_files_properties(${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/${_filewe}_i.c PROPERTIES GENERATED TRUE)
+    set_source_files_properties(${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/${_filewe}.h PROPERTIES GENERATED TRUE)
+    set_source_files_properties(${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/${_filewe}_i.c PROPERTIES GENERATED TRUE)
 endmacro()
 
 set(MIDL_DEFINES /D\ \"__PRODUCTION__=01\")
 
 endmacro()
 
 set(MIDL_DEFINES /D\ \"__PRODUCTION__=01\")
 
-set(WEBKIT_IDL_DEPENDENCIES
+set(WEBKITLEGACY_IDL_DEPENDENCIES
     win/Interfaces/AccessibleComparable.idl
     win/Interfaces/DOMCSS.idl
     win/Interfaces/DOMCore.idl
     win/Interfaces/AccessibleComparable.idl
     win/Interfaces/DOMCSS.idl
     win/Interfaces/DOMCore.idl
@@ -337,7 +341,6 @@ set(WEBKIT_IDL_DEPENDENCIES
     win/Interfaces/IWebHistoryItem.idl
     win/Interfaces/IWebHistoryItemPrivate.idl
     win/Interfaces/IWebHistoryPrivate.idl
     win/Interfaces/IWebHistoryItem.idl
     win/Interfaces/IWebHistoryItemPrivate.idl
     win/Interfaces/IWebHistoryPrivate.idl
-    win/Interfaces/IWebIconDatabase.idl
     win/Interfaces/IWebInspector.idl
     win/Interfaces/IWebInspectorPrivate.idl
     win/Interfaces/IWebJavaScriptCollector.idl
     win/Interfaces/IWebInspector.idl
     win/Interfaces/IWebInspectorPrivate.idl
     win/Interfaces/IWebJavaScriptCollector.idl
@@ -388,49 +391,49 @@ set(WEBKIT_IDL_DEPENDENCIES
     win/Interfaces/Accessible2/AccessibleText.idl
     win/Interfaces/Accessible2/AccessibleText2.idl
     win/Interfaces/Accessible2/IA2CommonTypes.idl
     win/Interfaces/Accessible2/AccessibleText.idl
     win/Interfaces/Accessible2/AccessibleText2.idl
     win/Interfaces/Accessible2/IA2CommonTypes.idl
-    "${DERIVED_SOURCES_WEBKIT_DIR}/include/autoversion.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/include/autoversion.h"
 )
 
 add_custom_command(
 )
 
 add_custom_command(
-    OUTPUT ${DERIVED_SOURCES_WEBKIT_DIR}/include/autoversion.h
+    OUTPUT ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/include/autoversion.h
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
-    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_WEBKIT_DIR}
+    COMMAND ${PERL_EXECUTABLE} ${WEBKIT_LIBRARIES_DIR}/tools/scripts/auto-version.pl ${DERIVED_SOURCES_WEBKITLEGACY_DIR}
     VERBATIM)
 
     VERBATIM)
 
-GENERATE_INTERFACE(win/Interfaces/WebKit.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleApplication.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2_2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleRelation.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleStates.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/IA2CommonTypes.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleEditableText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
-GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText2.idl ${MIDL_DEFINES} "${WEBKIT_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/WebKit.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleApplication.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/Accessible2_2.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleRelation.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleStates.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/IA2CommonTypes.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleEditableText.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
+GENERATE_INTERFACE(win/Interfaces/Accessible2/AccessibleText2.idl ${MIDL_DEFINES} "${WEBKITLEGACY_IDL_DEPENDENCIES}")
 
 
-add_library(WebKitGUID STATIC
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleStates.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/IA2CommonTypes.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2.h"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleApplication_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/Accessible2_2_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleRelation_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleEditableText_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText_i.c"
-    "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/AccessibleText2_i.c"
+add_library(WebKitLegacyGUID STATIC
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/WebKit.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleApplication.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/Accessible2.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/Accessible2_2.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleRelation.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleStates.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/IA2CommonTypes.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleEditableText.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleText.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleText2.h"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/WebKit_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleApplication_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/Accessible2_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/Accessible2_2_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleRelation_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleEditableText_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleText_i.c"
+    "${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/AccessibleText2_i.c"
 )
 )
-set_target_properties(WebKitGUID PROPERTIES OUTPUT_NAME WebKitGUID${DEBUG_SUFFIX})
+set_target_properties(WebKitLegacyGUID PROPERTIES OUTPUT_NAME WebKitGUID${DEBUG_SUFFIX})
 
 
-list(APPEND WebKit_LIBRARIES
+list(APPEND WebKitLegacy_LIBRARIES
     PRIVATE Comctl32
     PRIVATE Comsupp
     PRIVATE Crypt32
     PRIVATE Comctl32
     PRIVATE Comsupp
     PRIVATE Crypt32
@@ -445,12 +448,11 @@ list(APPEND WebKit_LIBRARIES
     PRIVATE Version
     PRIVATE Winmm
     PRIVATE WebKitGUID${DEBUG_SUFFIX}
     PRIVATE Version
     PRIVATE Winmm
     PRIVATE WebKitGUID${DEBUG_SUFFIX}
-    PRIVATE WebCoreDerivedSources${DEBUG_SUFFIX}
     PRIVATE WindowsCodecs
 )
 
 if (ENABLE_GRAPHICS_CONTEXT_3D)
     PRIVATE WindowsCodecs
 )
 
 if (ENABLE_GRAPHICS_CONTEXT_3D)
-    list(APPEND WebKit_LIBRARIES
+    list(APPEND WebKitLegacy_LIBRARIES
         libANGLE${DEBUG_SUFFIX}
         libEGL${DEBUG_SUFFIX}
         libGLESv2${DEBUG_SUFFIX}
         libANGLE${DEBUG_SUFFIX}
         libEGL${DEBUG_SUFFIX}
         libGLESv2${DEBUG_SUFFIX}
@@ -463,25 +465,23 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS")
 # We need the webkit libraries to come before the system default libraries to prevent symbol conflicts with uuid.lib.
 # To do this we add system default libs as webkit libs and zero out system default libs.
 string(REPLACE " " "\;" CXX_LIBS ${CMAKE_CXX_STANDARD_LIBRARIES})
 # We need the webkit libraries to come before the system default libraries to prevent symbol conflicts with uuid.lib.
 # To do this we add system default libs as webkit libs and zero out system default libs.
 string(REPLACE " " "\;" CXX_LIBS ${CMAKE_CXX_STANDARD_LIBRARIES})
-list(APPEND WebKit_LIBRARIES ${CXX_LIBS})
+list(APPEND WebKitLegacy_LIBRARIES ${CXX_LIBS})
 set(CMAKE_CXX_STANDARD_LIBRARIES "")
 
 set(CMAKE_CXX_STANDARD_LIBRARIES "")
 
-set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:MSVCRT /NODEFAULTLIB:MSVCRTD")
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKER_FLAGS}")
 
 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
 # It fails with an unusual error - midl failed - failed to save all changes
 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
 
 # If this directory isn't created before midl runs and attempts to output WebKit.tlb,
 # It fails with an unusual error - midl failed - failed to save all changes
 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
-file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces)
+file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces)
 
 
-set(WebKitGUID_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKit/preBuild.cmd")
-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")
-file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/WebKit)
-add_custom_command(TARGET WebKitGUID PRE_BUILD COMMAND ${WebKitGUID_PRE_BUILD_COMMAND} VERBATIM)
-
-set(WebKitGUID_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKit/postBuild.cmd")
-file(WRITE "${WebKitGUID_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/*.h\" \"${FORWARDING_HEADERS_DIR}/WebKit\" >nul 2>nul")
-add_custom_command(TARGET WebKitGUID POST_BUILD COMMAND ${WebKitGUID_POST_BUILD_COMMAND} VERBATIM)
+WEBKIT_MAKE_FORWARDING_HEADERS(WebKitLegacyGUID
+    DESTINATION ${FORWARDING_HEADERS_DIR}/WebKitLegacy
+    FILES win/WebKitCOMAPI.h win/CFDictionaryPropertyBag.h
+    DERIVED_SOURCE_DIRECTORIES ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces
+    FLATTENED
+)
 
 
-set(WebKit_OUTPUT_NAME
+set(WebKitLegacy_OUTPUT_NAME
     WebKit${DEBUG_SUFFIX}
 )
     WebKit${DEBUG_SUFFIX}
 )