Add CMake build system for WinCairo port.
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 16:47:56 +0000 (16:47 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Apr 2015 16:47:56 +0000 (16:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115944

Patch by Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer <paroga@webkit.org> on 2015-04-08
Reviewed by Chris Dumez.

.:

* Source/cmake/OptionsWindows.cmake:
* Source/cmake/WebKitMacros.cmake:
Make ADD_PRECOMPILED_HEADER more like http://stackoverflow.com/questions/148570/using-pre-compiled-headers-with-cmake

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:
* PlatformWinCairo.cmake:
* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::TextureMapperGL):

Source/WebKit:

* CMakeLists.txt:

Source/WTF:

* wtf/FeatureDefines.h:
* wtf/PlatformWin.cmake:

Tools:

* CMakeLists.txt:
* WinLauncher/CMakeLists.txt: Added.

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

16 files changed:
ChangeLog
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WTF/wtf/PlatformWin.cmake
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebCore/PlatformWinCairo.cmake
Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
Source/WebKit/CMakeLists.txt
Source/WebKit/ChangeLog
Source/cmake/OptionsWindows.cmake
Source/cmake/WebKitMacros.cmake
Tools/CMakeLists.txt
Tools/ChangeLog
Tools/WinLauncher/CMakeLists.txt [new file with mode: 0644]

index 25d32a3..9c931bb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
+
+        Add CMake build system for WinCairo port.
+        https://bugs.webkit.org/show_bug.cgi?id=115944
+
+        Reviewed by Chris Dumez.
+
+        * Source/cmake/OptionsWindows.cmake:
+        * Source/cmake/WebKitMacros.cmake:
+        Make ADD_PRECOMPILED_HEADER more like http://stackoverflow.com/questions/148570/using-pre-compiled-headers-with-cmake
+
 2015-04-06  Alberto Garcia  <berto@igalia.com>
 
         [GTK] Fix HPPA build
index 095062d..b0de443 100644 (file)
@@ -1,3 +1,13 @@
+2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
+
+        Add CMake build system for WinCairo port.
+        https://bugs.webkit.org/show_bug.cgi?id=115944
+
+        Reviewed by Chris Dumez.
+
+        * wtf/FeatureDefines.h:
+        * wtf/PlatformWin.cmake:
+
 2015-04-05  Antti Koivisto  <antti@apple.com>
 
         Bloom filter should support longer hashes
index 02ad0f5..f966c54 100644 (file)
@@ -268,6 +268,10 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #endif
 #endif
 
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
 #endif /* PLATFORM(WIN) && !PLATFORM(WIN_CAIRO) */
 
 /* --------- Windows CAIRO port --------- */
@@ -292,6 +296,10 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #endif
 #endif
 
+#if !defined(ENABLE_GEOLOCATION)
+#define ENABLE_GEOLOCATION 1
+#endif
+
 #endif /* PLATFORM(WIN_CAIRO) */
 
 /* --------- EFL port (Unix) --------- */
index 74c9ebf..f737b8c 100644 (file)
@@ -1,14 +1,28 @@
 list(APPEND WTF_SOURCES
+    text/cf/AtomicStringCF.cpp
+    text/cf/StringCF.cpp
+    text/cf/StringImplCF.cpp
+    text/cf/StringViewCF.cpp
+
     threads/win/BinarySemaphoreWin.cpp
 
     win/MainThreadWin.cpp
     win/RunLoopWin.cpp
+    win/WTFDLL.cpp
+    win/WorkItemWin.cpp
+    win/WorkQueueWin.cpp
 )
 
 list(APPEND WTF_LIBRARIES
     winmm
 )
 
+if (${WTF_PLATFORM_WIN_CAIRO})
+    list(APPEND WTF_LIBRARIES
+        cflite
+    )
+endif ()
+
 list(APPEND WTF_HEADERS
     "${DERIVED_SOURCES_WTF_DIR}/WTFHeaderDetection.h"
 )
index 98dfd89..b1e1a67 100644 (file)
@@ -3507,6 +3507,10 @@ WEBKIT_WRAP_SOURCELIST(${WebCoreTestSupport_IDL_FILES} ${WebCoreTestSupport_SOUR
 
 include_directories(${WebCore_INCLUDE_DIRECTORIES} ${WebCoreTestSupport_INCLUDE_DIRECTORIES})
 
+if (MSVC)
+    ADD_PRECOMPILED_HEADER("WebCorePrefix.h" "WebCorePrefix.cpp" WebCore_SOURCES)
+endif ()
+
 add_library(WebCore ${WebCore_LIBRARY_TYPE} ${WebCore_SOURCES})
 set_target_properties(WebCore PROPERTIES COMPILE_DEFINITIONS "BUILDING_WebCore")
 set_target_properties(WebCore PROPERTIES FOLDER "WebCore")
@@ -3515,6 +3519,10 @@ if (WebCore_OUTPUT_NAME)
     set_target_properties(WebCore PROPERTIES OUTPUT_NAME ${WebCore_OUTPUT_NAME})
 endif ()
 
+if (MSVC)
+    ADD_PRECOMPILED_HEADER("WebCoreTestSupportPrefix.h" "testing/js/WebCoreTestSupportPrefix.cpp" WebCoreTestSupport_SOURCES)
+endif ()
+
 add_library(WebCoreTestSupport ${WebCoreTestSupport_LIBRARY_TYPE} ${WebCoreTestSupport_SOURCES})
 target_link_libraries(WebCoreTestSupport ${WebCoreTestSupport_LIBRARIES})
 set_target_properties(WebCoreTestSupport PROPERTIES FOLDER "WebCore")
index 7d6fffb..e0a79bc 100644 (file)
@@ -1,3 +1,16 @@
+2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
+
+        Add CMake build system for WinCairo port.
+        https://bugs.webkit.org/show_bug.cgi?id=115944
+
+        Reviewed by Chris Dumez.
+
+        * CMakeLists.txt:
+        * PlatformWin.cmake:
+        * PlatformWinCairo.cmake:
+        * platform/graphics/texmap/TextureMapperGL.cpp:
+        (WebCore::TextureMapperGL::TextureMapperGL):
+
 2015-04-08  Chris Dumez  <cdumez@apple.com>
 
         Rename ActiveDOMObject::canSuspend() to canSuspendForPageCache() for clarity
index 75f074c..f4f0a38 100644 (file)
@@ -66,8 +66,6 @@ list(APPEND WebCore_SOURCES
     platform/win/WidgetWin.cpp
 )
 
-ADD_PRECOMPILED_HEADER("WebCorePrefix" WebCore_SOURCES)
-
 list(APPEND WebCore_SOURCES
     "${DERIVED_SOURCES_WEBCORE_DIR}/WebCoreHeaderDetection.h"
 )
@@ -76,6 +74,14 @@ if (${WTF_PLATFORM_WIN_CAIRO})
     include(PlatformWinCairo.cmake)
 endif ()
 
+set(WebCore_FORWARDING_HEADERS_DIRECTORIES
+    bridge/c
+
+    Modules/indexeddb
+)
+
+WEBKIT_CREATE_FORWARDING_HEADERS(WebCore DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES})
+
 # FIXME: This should test if AVF headers are available.
 # https://bugs.webkit.org/show_bug.cgi?id=135861
 add_custom_command(
index d7ddf41..4593d1e 100644 (file)
@@ -29,6 +29,7 @@ list(APPEND WebCore_SOURCES
     platform/cf/CFURLExtras.cpp
     platform/cf/FileSystemCF.cpp
     platform/cf/SharedBufferCF.cpp
+    platform/cf/URLCF.cpp
 
     platform/cf/win/CertificateCFWin.cpp
 
@@ -57,6 +58,23 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cairo/RefPtrCairo.cpp
     platform/graphics/cairo/TransformationMatrixCairo.cpp
 
+    platform/graphics/texmap/BitmapTexture.cpp
+    platform/graphics/texmap/BitmapTextureGL.cpp
+    platform/graphics/texmap/BitmapTextureImageBuffer.cpp
+    platform/graphics/texmap/BitmapTexturePool.cpp
+    platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
+    platform/graphics/texmap/TextureMapper.cpp
+    platform/graphics/texmap/TextureMapperAnimation.cpp
+    platform/graphics/texmap/TextureMapperBackingStore.cpp
+    platform/graphics/texmap/TextureMapperFPSCounter.cpp
+    platform/graphics/texmap/TextureMapperGL.cpp
+    platform/graphics/texmap/TextureMapperImageBuffer.cpp
+    platform/graphics/texmap/TextureMapperLayer.cpp
+    platform/graphics/texmap/TextureMapperShaderProgram.cpp
+    platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp
+    platform/graphics/texmap/TextureMapperTile.cpp
+    platform/graphics/texmap/TextureMapperTiledBackingStore.cpp
+
     platform/graphics/win/DIBPixelData.cpp
     platform/graphics/win/FontCacheWin.cpp
     platform/graphics/win/FontCustomPlatformDataCairo.cpp
@@ -73,14 +91,32 @@ list(APPEND WebCore_SOURCES
     platform/graphics/win/TransformationMatrixWin.cpp
     platform/graphics/win/UniscribeController.cpp
 
+    platform/image-decoders/ImageDecoder.cpp
+
+    platform/image-decoders/bmp/BMPImageDecoder.cpp
+    platform/image-decoders/bmp/BMPImageReader.cpp
+
     platform/image-decoders/cairo/ImageDecoderCairo.cpp
 
+    platform/image-decoders/gif/GIFImageDecoder.cpp
+    platform/image-decoders/gif/GIFImageReader.cpp
+
+    platform/image-decoders/ico/ICOImageDecoder.cpp
+
+    platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+
+    platform/image-decoders/png/PNGImageDecoder.cpp
+
+    platform/image-decoders/webp/WEBPImageDecoder.cpp
+
     platform/network/CredentialStorage.cpp
     platform/network/NetworkStorageSessionStub.cpp
     platform/network/SynchronousLoaderClient.cpp
 
     platform/network/curl/CookieJarCurl.cpp
     platform/network/curl/CredentialStorageCurl.cpp
+    platform/network/curl/CurlCacheEntry.cpp
+    platform/network/curl/CurlCacheManager.cpp
     platform/network/curl/CurlDownload.cpp
     platform/network/curl/DNSCurl.cpp
     platform/network/curl/FormDataStreamCurl.cpp
@@ -89,6 +125,7 @@ list(APPEND WebCore_SOURCES
     platform/network/curl/ResourceHandleCurl.cpp
     platform/network/curl/ResourceHandleManager.cpp
     platform/network/curl/SocketStreamHandleCurl.cpp
+    platform/network/curl/SSLHandle.cpp
 
     platform/network/win/DownloadBundleWin.cpp
 
index 6aee23f..60f9948 100644 (file)
@@ -246,7 +246,9 @@ TextureMapperGL::TextureMapperGL()
 {
     m_context3D = GraphicsContext3D::createForCurrentGLContext();
     m_data = new TextureMapperGLData(m_context3D.get());
+#if USE(TEXTURE_MAPPER_GL)
     m_texturePool = std::make_unique<BitmapTexturePool>(m_context3D);
+#endif
 }
 
 TextureMapperGL::ClipStack& TextureMapperGL::clipStack()
index 8abf6a5..9b2f91f 100644 (file)
@@ -2,6 +2,8 @@ set(WebKit_SOURCES
 )
 
 set(WebKit_INCLUDE_DIRECTORIES
+    "${CMAKE_BINARY_DIR}"
+    "${CMAKE_SOURCE_DIR}/Source"
     "${DERIVED_SOURCES_DIR}"
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/JavaScriptCore"
@@ -9,7 +11,6 @@ set(WebKit_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKitLegacy"
     "${JAVASCRIPTCORE_DIR}"
     "${JAVASCRIPTCORE_DIR}/disassembler"
-    "${CMAKE_SOURCE_DIR}/Source"
     "${WTF_DIR}"
 )
 
@@ -22,11 +23,15 @@ set(WebKit_LIBRARIES
 WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS()
 
 include_directories(${WebKit_INCLUDE_DIRECTORIES})
+
+if (MSVC)
+    ADD_PRECOMPILED_HEADER("WebKitPrefix.h" "win/WebKitPrefix.cpp" WebKit_SOURCES)
+endif ()
+
 add_library(WebKit ${WebKit_LIBRARY_TYPE} ${WebKit_SOURCES})
 add_dependencies(WebKit WebCore)
 target_link_libraries(WebKit ${WebKit_LIBRARIES})
 set_target_properties(WebKit PROPERTIES FOLDER "WebKit")
-set_target_properties(WebKit PROPERTIES LINK_INTERFACE_LIBRARIES "")
 
 if (WebKit_OUTPUT_NAME)
     set_target_properties(WebKit PROPERTIES OUTPUT_NAME ${WebKit_OUTPUT_NAME})
@@ -34,4 +39,4 @@ endif ()
 
 POPULATE_LIBRARY_VERSION(WEBKIT)
 set_target_properties(WebKit PROPERTIES VERSION ${WEBKIT_VERSION} SOVERSION ${WEBKIT_VERSION_MAJOR})
-install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")
\ No newline at end of file
+install(TARGETS WebKit DESTINATION "${LIB_INSTALL_DIR}")
index b3ee8c5..de6fc1f 100644 (file)
@@ -1,3 +1,12 @@
+2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
+
+        Add CMake build system for WinCairo port.
+        https://bugs.webkit.org/show_bug.cgi?id=115944
+
+        Reviewed by Chris Dumez.
+
+        * CMakeLists.txt:
+
 2015-04-07  Anders Carlsson  <andersca@apple.com>
 
         Get rid of uses of ApplicationCacheStorage::singleton() from WebKitLegacy
index 085c44a..7c7ead9 100644 (file)
@@ -3,9 +3,11 @@ add_definitions(-D_HAS_EXCEPTIONS=0 -DNOMINMAX -DUNICODE)
 #FIXME: Make sure these are the same as the Windows feature defines once we get CMake working on Windows.
 WEBKIT_OPTION_BEGIN()
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LEGACY_VENDOR_PREFIXES OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PICTURE_SIZES ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_PROMISES OFF)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_STREAM_API OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_VIEW_MODE_CSS_MEDIA OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(USE_SYSTEM_MALLOC ON)
 WEBKIT_OPTION_END()
index 84b53ac..0f71c2b 100644 (file)
@@ -23,19 +23,21 @@ macro(ADD_SOURCE_DEPENDENCIES _source _deps)
     set_source_files_properties(${_source} PROPERTIES OBJECT_DEPENDS "${_tmp}")
 endmacro()
 
-macro(ADD_PRECOMPILED_HEADER _name _output_source)
+macro(ADD_PRECOMPILED_HEADER _header _cpp _source)
     if (MSVC)
-        set_source_files_properties(${_name}.cpp
-            PROPERTIES COMPILE_FLAGS "/Yc\"${_name}.h\" /Fp\"${_name}.pch\""
-            OBJECT_OUTPUTS "${_name}.pch")
-        foreach (_file ${_input_files})
-            set_source_files_properties(${_file}
-                PROPERTIES COMPILE_FLAGS "/Yu\"${_name}.h\" /FI\"${_name}.h\" /Fp\"${_name}.pch\""
-                OBJECT_DEPENDS "${PrecompiledBinary}")
-        endforeach ()
+        get_filename_component(PrecompiledBasename ${_header} NAME_WE)
+        set(PrecompiledBinary "${CMAKE_CURRENT_BINARY_DIR}/${PrecompiledBasename}.pch")
+        set(_sources ${${_source}})
+
+        set_source_files_properties(${_cpp}
+            PROPERTIES COMPILE_FLAGS "/Yc\"${_header}\" /Fp\"${PrecompiledBinary}\""
+            OBJECT_OUTPUTS "${PrecompiledBinary}")
+        set_source_files_properties(${_sources}
+            PROPERTIES COMPILE_FLAGS "/Yu\"${_header}\" /FI\"${_header}\" /Fp\"${PrecompiledBinary}\""
+            OBJECT_DEPENDS "${PrecompiledBinary}")
+        list(APPEND ${_source} ${_cpp})
     endif ()
-    #FIXME: Add Xcode precompiled header support.
-    list(APPEND ${_output_source} ${PrecompiledSource})
+    #FIXME: Add support for Xcode.
 endmacro()
 
 # Helper macro which wraps generate-bindings.pl script.
index 237c6fb..ec6f32e 100644 (file)
@@ -27,6 +27,11 @@ elseif ("${PORT}" STREQUAL "GTK")
     endif ()
 endif ()
 
+if (WIN32)
+    add_subdirectory(DumpRenderTree)
+    add_subdirectory(WinLauncher)
+endif ()
+
 if (ENABLE_WEBKIT2 AND ENABLE_API_TESTS)
     add_subdirectory(TestWebKitAPI)
 endif ()
index 410ac05..cde4ee4 100644 (file)
@@ -1,3 +1,13 @@
+2015-04-08  Alex Christensen  <achristensen@webkit.org> and Patrick Gansterer  <paroga@webkit.org>
+
+        Add CMake build system for WinCairo port.
+        https://bugs.webkit.org/show_bug.cgi?id=115944
+
+        Reviewed by Chris Dumez.
+
+        * CMakeLists.txt:
+        * WinLauncher/CMakeLists.txt: Added.
+
 2015-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Crash in DOMObjectCache when a wrapped object owned by the cache is unreffed by the user
diff --git a/Tools/WinLauncher/CMakeLists.txt b/Tools/WinLauncher/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0f900f3
--- /dev/null
@@ -0,0 +1,48 @@
+set(WinLauncher_INCLUDE_DIRECTORIES
+    WinLauncher.vcxproj
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders"
+    "${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit"
+    "${DERIVED_SOURCES_DIR}"
+    "${WTF_DIR}"
+    "${CMAKE_SOURCE_DIR}"
+    "${CMAKE_SOURCE_DIR}/Source"
+)
+
+set(WinLauncher_SOURCES
+    AccessibilityDelegate.cpp
+    DOMDefaultImpl.cpp
+    PageLoadTestClient.cpp
+    PrintWebUIDelegate.cpp
+    ResourceLoadDelegate.cpp
+    WinLauncher.cpp
+    WinLauncherWebHost.cpp
+    WinMain.cpp
+    stdafx.cpp
+
+    WinLauncher.vcxproj/WinLauncherLib.rc
+)
+
+set(WinLauncher_LIBRARIES
+    CFLite
+    DbgHelp
+    WTF
+    WebKit
+    WebKitGUID
+    comctl32
+    comsupp
+    comsuppw
+    shlwapi
+)
+
+set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wWinMainCRTStartup")
+
+add_definitions(-D_UNICODE -DWIN_CAIRO)
+include_directories(${WinLauncher_INCLUDE_DIRECTORIES})
+add_library(WinLauncher SHARED ${WinLauncher_SOURCES})
+target_link_libraries(WinLauncher ${WinLauncher_LIBRARIES})
+set_target_properties(WinLauncher PROPERTIES FOLDER "Tools")
+
+add_executable(WinLauncherLauncher WIN32 ${TOOLS_DIR}/win/DLLLauncher/DLLLauncherMain.cpp WinLauncher.vcxproj/WinLauncher.rc)
+target_link_libraries(WinLauncherLauncher shlwapi)
+set_target_properties(WinLauncherLauncher PROPERTIES FOLDER "Tools")
+set_target_properties(WinLauncherLauncher PROPERTIES OUTPUT_NAME "WinLauncher")