Progress towards building AppleWin with CMake
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Jul 2015 22:39:38 +0000 (22:39 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 27 Jul 2015 22:39:38 +0000 (22:39 +0000)
https://bugs.webkit.org/show_bug.cgi?id=147325

Reviewed by Martin Robinson.

.:

* Source/cmake/OptionsWindows.cmake:
Link with 64-bit libraries if building 64-bit binaries.
Don't run regular expressions on empty strings when using Ninja.
Removed DebugSuffix Visual Studio environment variables.

Source/WebCore:

* PlatformAppleWin.cmake: Added.
* PlatformWin.cmake:
* PlatformWinCairo.cmake:
Moved a lot of common directories from PlatformWinCairo to PlatformWin.

Source/WebKit:

* PlatformWin.cmake:
Removed references to non-existing files.

Source/WebKit/win:

* WebError.cpp:
* WebKitDLL.cpp:
* WebPreferences.cpp:
* WebURLResponse.cpp:
Fix some include quirks.

Source/WTF:

* wtf/PlatformWin.cmake:
Link with CoreFoundation.lib.

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

15 files changed:
ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/PlatformWin.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformAppleWin.cmake [new file with mode: 0644]
Source/WebCore/PlatformWin.cmake
Source/WebCore/PlatformWinCairo.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformWin.cmake
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebError.cpp
Source/WebKit/win/WebKitDLL.cpp
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebURLResponse.cpp
Source/cmake/OptionsWindows.cmake

index a1c3c00..fbf018f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Progress towards building AppleWin with CMake
+        https://bugs.webkit.org/show_bug.cgi?id=147325
+
+        Reviewed by Martin Robinson.
+
+        * Source/cmake/OptionsWindows.cmake:
+        Link with 64-bit libraries if building 64-bit binaries.
+        Don't run regular expressions on empty strings when using Ninja.
+        Removed DebugSuffix Visual Studio environment variables.
+
 2015-07-23  Alex Christensen  <achristensen@webkit.org>
 
         Remove compile and runtime flags for promises.
index 9006951..7d797ef 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Progress towards building AppleWin with CMake
+        https://bugs.webkit.org/show_bug.cgi?id=147325
+
+        Reviewed by Martin Robinson.
+
+        * wtf/PlatformWin.cmake:
+        Link with CoreFoundation.lib.
+
 2015-07-25  Carlos Alberto Lopez Perez  <clopez@igalia.com>
 
         REGRESSION (bmalloc): WebKit performance tests don't report memory stats.
index 361cf6c..0af86d2 100644 (file)
@@ -19,6 +19,10 @@ if (${WTF_PLATFORM_WIN_CAIRO})
     list(APPEND WTF_LIBRARIES
         cflite
     )
+else ()
+    list(APPEND WTF_LIBRARIES
+        CoreFoundation
+    )
 endif ()
 
 list(APPEND WTF_HEADERS
index 2edb315..39ce2fd 100644 (file)
@@ -1,3 +1,15 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Progress towards building AppleWin with CMake
+        https://bugs.webkit.org/show_bug.cgi?id=147325
+
+        Reviewed by Martin Robinson.
+
+        * PlatformAppleWin.cmake: Added.
+        * PlatformWin.cmake:
+        * PlatformWinCairo.cmake:
+        Moved a lot of common directories from PlatformWinCairo to PlatformWin.
+
 2015-07-27  Tim Horton  <timothy_horton@apple.com>
 
         Fix the build after r187383
diff --git a/Source/WebCore/PlatformAppleWin.cmake b/Source/WebCore/PlatformAppleWin.cmake
new file mode 100644 (file)
index 0000000..43cf492
--- /dev/null
@@ -0,0 +1,94 @@
+list(APPEND WebCore_INCLUDE_DIRECTORIES
+    "$ENV{WEBKIT_LIBRARIES}/include"
+    "$ENV{WEBKIT_LIBRARIES}/include/zlib"
+    "${WEBCORE_DIR}/loader/archive/cf"
+    "${WEBCORE_DIR}/platform/graphics/ca"
+    "${WEBCORE_DIR}/platform/graphics/ca/win"
+    "${WEBCORE_DIR}/platform/graphics/cg"
+    "${WEBCORE_DIR}/platform/network/cf"
+    "${WEBCORE_DIR}/platform/spi/cf"
+    "${WEBCORE_DIR}/platform/spi/cg"
+)
+
+list(APPEND WebCore_SOURCES
+    editing/SmartReplaceCF.cpp
+
+    platform/cf/URLCF.cpp
+
+    platform/graphics/ca/GraphicsLayerCA.cpp
+    platform/graphics/ca/LayerFlushScheduler.cpp
+    platform/graphics/ca/LayerPool.cpp
+    platform/graphics/ca/PlatformCALayer.cpp
+    platform/graphics/ca/TileController.cpp
+    platform/graphics/ca/TileCoverageMap.cpp
+    platform/graphics/ca/TileGrid.cpp
+    platform/graphics/ca/TransformationMatrixCA.cpp
+
+    platform/graphics/ca/win/CACFLayerTreeHost.cpp
+    platform/graphics/ca/win/LayerChangesFlusher.cpp
+    platform/graphics/ca/win/PlatformCAAnimationWin.cpp
+    platform/graphics/ca/win/PlatformCAFiltersWin.cpp
+    platform/graphics/ca/win/PlatformCALayerWin.cpp
+    platform/graphics/ca/win/PlatformCALayerWinInternal.cpp
+    platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp
+
+    platform/graphics/cg/BitmapImageCG.cpp
+    platform/graphics/cg/ColorCG.cpp
+    platform/graphics/cg/FloatPointCG.cpp
+    platform/graphics/cg/FloatRectCG.cpp
+    platform/graphics/cg/FloatSizeCG.cpp
+    platform/graphics/cg/GradientCG.cpp
+    platform/graphics/cg/GraphicsContext3DCG.cpp
+    platform/graphics/cg/GraphicsContextCG.cpp
+    platform/graphics/cg/IOSurfacePool.cpp
+    platform/graphics/cg/ImageBufferCG.cpp
+    platform/graphics/cg/ImageBufferDataCG.cpp
+    platform/graphics/cg/ImageCG.cpp
+    platform/graphics/cg/ImageSourceCG.cpp
+    platform/graphics/cg/ImageSourceCGWin.cpp
+    platform/graphics/cg/IntPointCG.cpp
+    platform/graphics/cg/IntRectCG.cpp
+    platform/graphics/cg/IntSizeCG.cpp
+    platform/graphics/cg/PDFDocumentImage.cpp
+    platform/graphics/cg/PathCG.cpp
+    platform/graphics/cg/PatternCG.cpp
+    platform/graphics/cg/SubimageCacheWithTimer.cpp
+    platform/graphics/cg/TransformationMatrixCG.cpp
+
+    platform/graphics/win/FontCGWin.cpp
+    platform/graphics/win/FontCustomPlatformData.cpp
+    platform/graphics/win/FontPlatformDataCGWin.cpp
+    platform/graphics/win/GlyphPageTreeNodeCGWin.cpp
+    platform/graphics/win/GraphicsContextCGWin.cpp
+    platform/graphics/win/ImageCGWin.cpp
+    platform/graphics/win/SimpleFontDataCGWin.cpp
+
+    platform/network/cf/AuthenticationCF.cpp
+    platform/network/cf/CookieJarCFNet.cpp
+    platform/network/cf/CookieStorageCFNet.cpp
+    platform/network/cf/CredentialStorageCFNet.cpp
+    platform/network/cf/DNSCFNet.cpp
+    platform/network/cf/FormDataStreamCFNet.cpp
+    platform/network/cf/LoaderRunLoopCF.cpp
+    platform/network/cf/NetworkStorageSessionCFNet.cpp
+    platform/network/cf/ProxyServerCFNet.cpp
+    platform/network/cf/ResourceErrorCF.cpp
+    platform/network/cf/ResourceHandleCFNet.cpp
+    platform/network/cf/ResourceRequestCFNet.cpp
+    platform/network/cf/ResourceResponseCFNet.cpp
+    platform/network/cf/SocketStreamHandleCFNet.cpp
+
+    platform/win/DragImageCGWin.cpp
+)
+
+list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
+    platform/graphics/ca
+    platform/graphics/cg
+
+    platform/graphics/ca/win
+
+    platform/network/cf
+
+    platform/spi/cf
+    platform/spi/cg
+)
index b5cb15f..5e9584b 100644 (file)
@@ -1,8 +1,11 @@
 list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/accessibility/win"
     "${WEBCORE_DIR}/page/win"
+    "${WEBCORE_DIR}/platform/cf"
+    "${WEBCORE_DIR}/platform/cf/win"
     "${WEBCORE_DIR}/platform/graphics/opentype"
     "${WEBCORE_DIR}/platform/graphics/win"
+    "${WEBCORE_DIR}/platform/network/win"
     "${WEBCORE_DIR}/platform/win"
     "${WEBCORE_DIR}/plugins/win"
 )
@@ -28,11 +31,14 @@ list(APPEND WebCore_SOURCES
     platform/graphics/opentype/OpenTypeUtilities.cpp
 
     platform/graphics/win/DIBPixelData.cpp
+    platform/graphics/win/FontWin.cpp
+    platform/graphics/win/GraphicsContextWin.cpp
     platform/graphics/win/IconWin.cpp
     platform/graphics/win/ImageWin.cpp
     platform/graphics/win/IntPointWin.cpp
     platform/graphics/win/IntRectWin.cpp
     platform/graphics/win/IntSizeWin.cpp
+    platform/graphics/win/SimpleFontDataWin.cpp
 
     platform/network/win/NetworkStateNotifierWin.cpp
 
@@ -75,16 +81,88 @@ list(APPEND WebCore_SOURCES
     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
 )
 
-if (${WTF_PLATFORM_WIN_CAIRO})
-    include(PlatformWinCairo.cmake)
-endif ()
-
 set(WebCore_FORWARDING_HEADERS_DIRECTORIES
+    accessibility
+    bindings
+    bridge
+    css
+    dom
+    editing
+    history
+    html
+    inspector
+    loader
+    page
+    platform
+    plugins
+    rendering
+    storage
+    svg
+    websockets
+    workers
+    xml
+
+    Modules/geolocation
     Modules/indexeddb
+    Modules/notifications
+    Modules/webdatabase
+
+    accessibility/win
+
+    bindings/generic
+    bindings/js
 
     bridge/c
+    bridge/jsc
+
+    history/cf
+
+    html/forms
+    html/parser
+
+    loader/appcache
+    loader/archive
+    loader/cache
+    loader/icon
+
+    loader/archive/cf
+
+    page/animation
+    page/win
+
+    platform/animation
+    platform/cf
+    platform/graphics
+    platform/mock
+    platform/network
+    platform/sql
+    platform/text
+    platform/win
+
+    platform/cf/win
+
+    platform/graphics/opentype
+    platform/graphics/transforms
+    platform/graphics/win
+
+    platform/text/transcoder
+
+    rendering/style
+    rendering/svg
+
+    svg/animation
+    svg/graphics
+    svg/properties
+
+    svg/graphics/filters
 )
 
+if (${WTF_PLATFORM_WIN_CAIRO})
+    include(PlatformWinCairo.cmake)
+else ()
+    include(PlatformAppleWin.cmake)
+endif ()
+
 WEBKIT_CREATE_FORWARDING_HEADERS(WebCore DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
 
 # FIXME: This should test if AVF headers are available.
index 6b59aac..2da37ef 100644 (file)
@@ -10,7 +10,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/platform/cf"
     "${WEBCORE_DIR}/platform/graphics/cairo"
     "${WEBCORE_DIR}/platform/network/curl"
-    "${WEBCORE_DIR}/platform/network/win"
 )
 
 list(APPEND WebCore_SOURCES
@@ -184,83 +183,8 @@ list(APPEND WebCoreTestSupport_LIBRARIES
     shlwapi
 )
 
-set(WebCore_FORWARDING_HEADERS_DIRECTORIES
-    accessibility
-    bindings
-    bridge
-    css
-    dom
-    editing
-    history
-    html
-    inspector
-    loader
-    page
-    platform
-    plugins
-    rendering
-    storage
-    svg
-    websockets
-    workers
-    xml
-
-    Modules/geolocation
-    Modules/notifications
-    Modules/webdatabase
-
-    accessibility/win
-
-    bindings/generic
-    bindings/js
-
-    bridge/jsc
-
-    history/cf
-
-    html/forms
-    html/parser
-
-    loader/appcache
-    loader/archive
-    loader/cache
-    loader/icon
-
-    loader/archive/cf
-
-    page/animation
-    page/win
-
-    platform/animation
-    platform/cf
-    platform/graphics
-    platform/mock
-    platform/network
-    platform/sql
-    platform/text
-    platform/win
-
-    platform/cf/win
-
+list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
     platform/graphics/cairo
-    platform/graphics/opentype
-    platform/graphics/transforms
-    platform/graphics/win
-
-    platform/graphics/ca/win
 
     platform/network/curl
-
-    platform/text/transcoder
-
-    rendering/style
-    rendering/svg
-
-    svg/animation
-    svg/graphics
-    svg/properties
-
-    svg/graphics/filters
 )
-
-WEBKIT_CREATE_FORWARDING_HEADERS(WebCore DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
index 2100e2a..035babf 100644 (file)
@@ -1,3 +1,13 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Progress towards building AppleWin with CMake
+        https://bugs.webkit.org/show_bug.cgi?id=147325
+
+        Reviewed by Martin Robinson.
+
+        * PlatformWin.cmake:
+        Removed references to non-existing files.
+
 2015-07-22  Alex Christensen  <achristensen@webkit.org>
 
         Fix quirks in CMake build on Mac and Windows
index c332907..d35389e 100644 (file)
@@ -275,7 +275,6 @@ set(WEBKIT_IDL_DEPENDENCIES
     win/Interfaces/IWebBackForwardList.idl
     win/Interfaces/IWebBackForwardListPrivate.idl
     win/Interfaces/IWebCache.idl
-    win/Interfaces/IWebCookieManager.idl
     win/Interfaces/IWebCoreStatistics.idl
     win/Interfaces/IWebDataSource.idl
     win/Interfaces/IWebDatabaseManager.idl
@@ -311,7 +310,6 @@ set(WEBKIT_IDL_DEPENDENCIES
     win/Interfaces/IWebMutableURLRequest.idl
     win/Interfaces/IWebMutableURLRequestPrivate.idl
     win/Interfaces/IWebNavigationData.idl
-    win/Interfaces/IWebNetworkConfiguration.idl
     win/Interfaces/IWebNotification.idl
     win/Interfaces/IWebNotificationCenter.idl
     win/Interfaces/IWebNotificationObserver.idl
@@ -325,8 +323,6 @@ set(WEBKIT_IDL_DEPENDENCIES
     win/Interfaces/IWebResourceLoadDelegatePrivate2.idl
     win/Interfaces/IWebScriptObject.idl
     win/Interfaces/IWebScriptWorld.idl
-    win/Interfaces/IWebScrollBarDelegatePrivate.idl
-    win/Interfaces/IWebScrollBarPrivate.idl
     win/Interfaces/IWebSecurityOrigin.idl
     win/Interfaces/IWebSerializedJSValue.idl
     win/Interfaces/IWebSerializedJSValuePrivate.idl
@@ -413,6 +409,7 @@ set(CMAKE_CXX_STANDARD_LIBRARIES "")
 # 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)
 
 set(WebKit_FORWARDING_HEADERS
     "${DERIVED_SOURCES_WEBKIT_DIR}/Interfaces/WebKit.h"
index 6a61d5f..52ae609 100644 (file)
@@ -1,3 +1,16 @@
+2015-07-27  Alex Christensen  <achristensen@webkit.org>
+
+        Progress towards building AppleWin with CMake
+        https://bugs.webkit.org/show_bug.cgi?id=147325
+
+        Reviewed by Martin Robinson.
+
+        * WebError.cpp:
+        * WebKitDLL.cpp:
+        * WebPreferences.cpp:
+        * WebURLResponse.cpp:
+        Fix some include quirks.
+
 2015-07-27  Per Arne Vollan  <peavo@outlook.com>
 
         [Curl] Crash in CurlDownload::didReceiveHeader when downloading file.
index 08ec78e..7226137 100644 (file)
 
 #include <WebCore/BString.h>
 
+#if USE(CG)
+#include <CoreGraphics/CoreGraphics.h>
+#endif
+
 #if USE(CFNETWORK)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
index 541de04..2734818 100644 (file)
 
 #include "WebKitDLL.h"
 
+#if USE(CG)
+#include <CoreGraphics/CoreGraphics.h>
+#endif
+
 #include "ForEachCoClass.h"
 #include "resource.h"
 #include "WebKit.h"
index b913031..00c4074 100644 (file)
 #include "WebNotificationCenter.h"
 #include "WebPreferenceKeysPrivate.h"
 
+#if USE(CG)
+#include <CoreGraphics/CoreGraphics.h>
+#include <WebCore/CACFLayerTreeHost.h>
+#include <WebKitSystemInterface/WebKitSystemInterface.h>
+#endif
+
 #include <CoreFoundation/CoreFoundation.h>
 #include <WebCore/COMPtr.h>
 #include <WebCore/FileSystem.h>
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
 
-#if USE(CG)
-#include <CoreGraphics/CoreGraphics.h>
-#include <WebCore/CACFLayerTreeHost.h>
-#include <WebKitSystemInterface/WebKitSystemInterface.h>
-#endif
-
 using namespace WebCore;
 using std::numeric_limits;
 
index e1dbb75..def206d 100644 (file)
 #include "COMPropertyBag.h"
 #include "MarshallingHelpers.h"
 
+#if USE(CG)
+#include <CoreGraphics/CoreGraphics.h>
+#endif
+
 #if USE(CFNETWORK)
 #include <WebKitSystemInterface/WebKitSystemInterface.h>
 #endif
index 895979e..69ba250 100644 (file)
@@ -12,7 +12,12 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC PUBLIC ON)
 WEBKIT_OPTION_END()
 
 include_directories("$ENV{WEBKIT_LIBRARIES}/include")
-link_directories("$ENV{WEBKIT_LIBRARIES}/lib$(PlatformArchitecture)")
+if (${MSVC_CXX_ARCHITECTURE_ID} STREQUAL "X86")
+    link_directories("$ENV{WEBKIT_LIBRARIES}/lib32")
+else ()
+    link_directories("$ENV{WEBKIT_LIBRARIES}/lib64")
+endif ()
+
 if (MSVC)
     add_definitions(
         /wd4018 /wd4068 /wd4099 /wd4100 /wd4127 /wd4138 /wd4146 /wd4180 /wd4189 /wd4201 /wd4244 /wd4251 /wd4267 /wd4275 /wd4288
@@ -20,11 +25,13 @@ if (MSVC)
         /wd4706 /wd4800 /wd4819 /wd4951 /wd4952 /wd4996 /wd6011 /wd6031 /wd6211 /wd6246 /wd6255 /wd6387
         /MP
     )
-    string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
-    string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
+    if (NOT ${CMAKE_CXX_FLAGS} STREQUAL "")
+        string(REGEX REPLACE "/EH[a-z]+" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable C++ exceptions
+        string(REGEX REPLACE "/GR" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) # Disable RTTI
+    endif ()
 endif ()
 
 set(PORT Win)
 set(JavaScriptCore_LIBRARY_TYPE SHARED)
 set(WTF_LIBRARY_TYPE SHARED)
-set(ICU_LIBRARIES libicuuc$(DebugSuffix) libicuin$(DebugSuffix))
+set(ICU_LIBRARIES libicuuc libicuin)