[Win][PAL] Move WebCoreHeaderDetection.h to PAL
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Sep 2017 15:44:12 +0000 (15:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 18 Sep 2017 15:44:12 +0000 (15:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176990

Patch by Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> on 2017-09-18
Reviewed by Alex Christensen.

.:

Create DerivedSources directory for PAL if WebCore build is enabled.

* Source/cmake/WebKitCommon.cmake:
* Source/cmake/WebKitFS.cmake:

Source/WebCore:

* PlatformWin.cmake:
Stop generating WebCoreHeaderDetection.h in WebCore.

* config.h:
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
* platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
Include PALHeaderDetection.h instead of WebCoreHeaderDetection.h

Source/WebCore/PAL:

* AVFoundationSupport.py: Renamed from Source/WebCore/AVFoundationSupport.py.
(lookFor):
(fileContains):

* pal/PlatformWin.cmake:
Add a custom target PAL_PreBuild to generate PALHeaderDetection.h

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222148 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/PAL/AVFoundationSupport.py [moved from Source/WebCore/AVFoundationSupport.py with 100% similarity]
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/PlatformWin.cmake
Source/WebCore/PlatformWin.cmake
Source/WebCore/config.h
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp
Source/WebCore/platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
Source/cmake/WebKitCommon.cmake
Source/cmake/WebKitFS.cmake

index f99085b..6ed92f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-09-18  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
+
+        [Win][PAL] Move WebCoreHeaderDetection.h to PAL
+        https://bugs.webkit.org/show_bug.cgi?id=176990
+
+        Reviewed by Alex Christensen.
+
+        Create DerivedSources directory for PAL if WebCore build is enabled.
+
+        * Source/cmake/WebKitCommon.cmake:
+        * Source/cmake/WebKitFS.cmake:
+
 2017-09-15  Konstantin Tokarev  <annulen@yandex.ru>
 
         Consider enabling -Wno-expansion-to-defined for gcc 7
index 47b80d0..b0a417e 100644 (file)
@@ -1,3 +1,18 @@
+2017-09-18  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
+
+        [Win][PAL] Move WebCoreHeaderDetection.h to PAL
+        https://bugs.webkit.org/show_bug.cgi?id=176990
+
+        Reviewed by Alex Christensen.
+
+        * PlatformWin.cmake:
+        Stop generating WebCoreHeaderDetection.h in WebCore.
+
+        * config.h:
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
+        Include PALHeaderDetection.h instead of WebCoreHeaderDetection.h
+
 2017-09-18  Basuke Suzuki  <Basuke.Suzuki@sony.com>
 
         [Curl] Create classes dedicated to handle SSL related tasks
index 2523b68..62995fa 100644 (file)
@@ -1,3 +1,17 @@
+2017-09-18  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
+
+        [Win][PAL] Move WebCoreHeaderDetection.h to PAL
+        https://bugs.webkit.org/show_bug.cgi?id=176990
+
+        Reviewed by Alex Christensen.
+
+        * AVFoundationSupport.py: Renamed from Source/WebCore/AVFoundationSupport.py.
+        (lookFor):
+        (fileContains):
+
+        * pal/PlatformWin.cmake:
+        Add a custom target PAL_PreBuild to generate PALHeaderDetection.h
+
 2017-09-15  Tim Horton  <timothy_horton@apple.com>
 
         Fix the macOS CMake build
index 6e13855..e8b1bb6 100644 (file)
@@ -29,3 +29,12 @@ foreach (_directory ${PAL_FORWARDING_HEADERS_DIRECTORIES})
         file(COPY ${_file} DESTINATION ${FORWARDING_HEADERS_DIR}/WebCore/pal/${_directory})
     endforeach ()
 endforeach ()
+
+# Generate PALHeaderDetection.h by PAL_PreBuild
+add_custom_target(PAL_PreBuild SOURCES "${DERIVED_SOURCES_PAL_DIR}/PALHeaderDetection.h")
+add_custom_command(
+    OUTPUT "${DERIVED_SOURCES_PAL_DIR}/PALHeaderDetection.h"
+    WORKING_DIRECTORY "${DERIVED_SOURCES_PAL_DIR}"
+    COMMAND ${PYTHON_EXECUTABLE} ${PAL_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > PALHeaderDetection.h
+    VERBATIM)
+add_dependencies(PAL PAL_PreBuild)
index d3ca315..250b890 100644 (file)
@@ -36,6 +36,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/win"
     "${THIRDPARTY_DIR}/ANGLE/include"
     "${THIRDPARTY_DIR}/ANGLE/include/egl"
+    "${DERIVED_SOURCES_PAL_DIR}"
 )
 
 list(APPEND WebCore_SOURCES
@@ -140,10 +141,6 @@ list(APPEND WebCore_USER_AGENT_STYLE_SHEETS
     ${WEBCORE_DIR}/css/themeWinQuirks.css
 )
 
-list(APPEND WebCore_DERIVED_SOURCES
-    "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
-)
-
 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     .
     accessibility
@@ -287,12 +284,6 @@ else ()
     include(PlatformAppleWin.cmake)
 endif ()
 
-add_custom_command(
-    OUTPUT "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
-    WORKING_DIRECTORY "${DERIVED_SOURCES_WEBCORE_DIR}"
-    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/AVFoundationSupport.py ${WEBKIT_LIBRARIES_DIR} > WebCoreHeaderDetection.h
-    VERBATIM)
-
 make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/WebKit.resources/en.lproj)
 file(COPY
     "${WEBCORE_DIR}/English.lproj/Localizable.strings"
index e0b51d4..d3dee99 100644 (file)
@@ -30,7 +30,7 @@
 #endif
 
 #if PLATFORM(WIN)
-#include "WebCoreHeaderDetection.h"
+#include <PALHeaderDetection.h>
 #endif
 
 #include "PlatformExportMacros.h"
index f0f9623..ca1da9f 100644 (file)
@@ -37,7 +37,6 @@
 #include "PlatformCALayerWinInternal.h"
 #include "TextRun.h"
 #include "TileController.h"
-#include "WebCoreHeaderDetection.h"
 #include "WebTiledBackingLayerWin.h"
 #include <QuartzCore/CoreAnimationCF.h>
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
index 584ff91..3f43a05 100644 (file)
@@ -34,7 +34,6 @@
 #include "PlatformCALayer.h"
 #include "TileController.h"
 #include "TiledBacking.h"
-#include "WebCoreHeaderDetection.h"
 #include <QuartzCore/CACFLayer.h>
 #include <wtf/MainThread.h>
 
index 79717b4..f919af7 100644 (file)
@@ -63,6 +63,7 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     # -----------------------------------------------------------------------------
 
     if (ENABLE_WEBCORE)
+        file(MAKE_DIRECTORY ${DERIVED_SOURCES_PAL_DIR})
         file(MAKE_DIRECTORY ${DERIVED_SOURCES_WEBCORE_DIR})
     endif ()
 
index a5d585c..be96f16 100644 (file)
@@ -31,6 +31,7 @@ endif ()
 
 set(DERIVED_SOURCES_DIR "${CMAKE_BINARY_DIR}/DerivedSources")
 set(DERIVED_SOURCES_JAVASCRIPTCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/JavaScriptCore")
+set(DERIVED_SOURCES_PAL_DIR "${CMAKE_BINARY_DIR}/DerivedSources/PAL")
 set(DERIVED_SOURCES_WEBCORE_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebCore")
 set(DERIVED_SOURCES_WEBDRIVER_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebDriver")
 set(DERIVED_SOURCES_WEBKITLEGACY_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WebKitLegacy")