[CMake] Remove WebCoreDerivedSources library target
[WebKit-https.git] / Source / WebKitLegacy / PlatformWin.cmake
index b30dd39a7028d09f634633a4e8242d2d8ee67fa7..66005ba2a5b196bbdf2017a92a56fe3d7408172a 100644 (file)
@@ -448,7 +448,6 @@ list(APPEND WebKitLegacy_LIBRARIES
     PRIVATE Version
     PRIVATE Winmm
     PRIVATE WebKitGUID${DEBUG_SUFFIX}
-    PRIVATE WebCoreDerivedSources${DEBUG_SUFFIX}
     PRIVATE WindowsCodecs
 )
 
@@ -476,14 +475,12 @@ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${MSVC_RUNTIME_LINKE
 file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
 file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces)
 
-set(WebKitLegacyGUID_PRE_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKitLegacy/preBuild.cmd")
-file(WRITE "${WebKitLegacyGUID_PRE_BUILD_COMMAND}" "@xcopy /y /d /f \"${CMAKE_CURRENT_SOURCE_DIR}/win/WebKitCOMAPI.h\" \"${FORWARDING_HEADERS_DIR}/WebKitLegacy\" >nul 2>nul\n@xcopy /y /d /f \"${CMAKE_CURRENT_SOURCE_DIR}/win/CFDictionaryPropertyBag.h\" \"${FORWARDING_HEADERS_DIR}/WebKitLegacy\" >nul 2>nul\n")
-file(MAKE_DIRECTORY ${FORWARDING_HEADERS_DIR}/WebKitLegacy)
-add_custom_command(TARGET WebKitLegacyGUID PRE_BUILD COMMAND ${WebKitLegacyGUID_PRE_BUILD_COMMAND} VERBATIM)
-
-set(WebKitLegacyGUID_POST_BUILD_COMMAND "${CMAKE_BINARY_DIR}/DerivedSources/WebKitLegacy/postBuild.cmd")
-file(WRITE "${WebKitLegacyGUID_POST_BUILD_COMMAND}" "@xcopy /y /d /f \"${DERIVED_SOURCES_WEBKITLEGACY_DIR}/Interfaces/*.h\" \"${FORWARDING_HEADERS_DIR}/WebKitLegacy\" >nul 2>nul")
-add_custom_command(TARGET WebKitLegacyGUID POST_BUILD COMMAND ${WebKitLegacyGUID_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(WebKitLegacy_OUTPUT_NAME
     WebKit${DEBUG_SUFFIX}