[CMake] Make USE_CF conditional within Windows
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 00:36:53 +0000 (00:36 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 1 Sep 2017 00:36:53 +0000 (00:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176173

Reviewed by Alex Christensen.

.:

* Source/cmake/OptionsAppleWin.cmake:
* Source/cmake/OptionsWinCairo.cmake:

Source/JavaScriptCore:

* PlatformWin.cmake:

Source/WebCore:

No new tests. No change in behavior.

* PlatformWin.cmake:
* WebCorePrefix.h:
* testing/js/WebCoreTestSupportPrefix.h:

Source/WebKitLegacy:

* PlatformWin.cmake:

Source/WTF:

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

Tools:

* DumpRenderTree/config.h:
* MiniBrowser/win/CMakeLists.txt:
* MiniBrowser/win/stdafx.h:
* TestWebKitAPI/PlatformWin.cmake:

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

19 files changed:
ChangeLog
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/PlatformWin.cmake
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h
Source/WTF/wtf/PlatformWin.cmake
Source/WebCore/ChangeLog
Source/WebCore/PlatformWin.cmake
Source/WebCore/WebCorePrefix.h
Source/WebCore/testing/js/WebCoreTestSupportPrefix.h
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/PlatformWin.cmake
Source/cmake/OptionsAppleWin.cmake
Source/cmake/OptionsWinCairo.cmake
Tools/ChangeLog
Tools/DumpRenderTree/config.h
Tools/MiniBrowser/win/CMakeLists.txt
Tools/MiniBrowser/win/stdafx.h
Tools/TestWebKitAPI/PlatformWin.cmake

index 2d9f7aae65c43189f8cc9d773e54e8a840e0ce0b..2b6a444d02639c1a2b9863bed018e1da67631076 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        * Source/cmake/OptionsAppleWin.cmake:
+        * Source/cmake/OptionsWinCairo.cmake:
+
 2017-08-30  Don Olmstead  <don.olmstead@sony.com>
 
         [CMake][WinCairo] Use find_package for libpng and libjpeg
index f9ae6e306b224b02c198e62fa8128b7a7c2f1f02..995898c744928c5082064d0741488903b2771e9b 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        * PlatformWin.cmake:
+
 2017-08-31  Saam Barati  <sbarati@apple.com>
 
         useSeparatedWXHeap should never be true when not on iOS
index 5ae400451300678901c1e0f23d16ea9681a82de1..b348eaeafba634db6dab5ca0a7b7228e0d38056e 100644 (file)
@@ -1,19 +1,23 @@
 list(APPEND JavaScriptCore_SOURCES
     API/JSStringRefBSTR.cpp
-    API/JSStringRefCF.cpp
 )
 
 list(APPEND JavaScriptCore_INCLUDE_DIRECTORIES
     ${CMAKE_BINARY_DIR}/../include/private
 )
 
-if (WTF_PLATFORM_WIN_CAIRO)
+if (USE_CF)
+    list(APPEND JavaScriptCore_SOURCES
+        API/JSStringRefCF.cpp
+    )
+
     list(APPEND JavaScriptCore_LIBRARIES
-        CFLite
+        ${COREFOUNDATION_LIBRARY}
     )
-else ()
+endif ()
+
+if (NOT WTF_PLATFORM_WIN_CAIRO)
     list(APPEND JavaScriptCore_LIBRARIES
-        CoreFoundation${DEBUG_SUFFIX}
         ${ICU_LIBRARIES}
         winmm
     )
index 27c4204257f8ae87b7e61fdfb1f4164d20ff2251..670d89c78c90250ff0fa09652adce60182ffb369 100644 (file)
@@ -1,3 +1,13 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        * wtf/Platform.h:
+        * wtf/PlatformWin.cmake:
+
 2017-08-31  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r221445.
index 06434af5f9d4a807433261381b93c29cb907f9f7..cd7a7af1a715370c11134c6b3ce7bac63cef36d3 100644 (file)
 
 #endif /* PLATFORM(IOS) */
 
-#if PLATFORM(WIN) && !USE(WINGDI)
-#define USE_CF 1
-#endif
-
 #if PLATFORM(WIN) && !USE(WINGDI) && !PLATFORM(WIN_CAIRO)
 #define USE_CFURLCONNECTION 1
 #endif
index 0b91634d560750e128aaa65d4926fe267b39964a..780ef825cba54ca1e61b4ed33102d4b1443c4d5a 100644 (file)
@@ -7,11 +7,6 @@ list(APPEND WTF_SOURCES
 
     text/win/TextBreakIteratorInternalICUWin.cpp
 
-    text/cf/AtomicStringImplCF.cpp
-    text/cf/StringCF.cpp
-    text/cf/StringImplCF.cpp
-    text/cf/StringViewCF.cpp
-
     win/CPUTimeWin.cpp
     win/MainThreadWin.cpp
     win/MemoryFootprintWin.cpp
@@ -24,14 +19,15 @@ list(APPEND WTF_HEADERS
     "${DERIVED_SOURCES_WTF_DIR}/AVFoundationHeaderDetection.h"
 )
 
-if (${WTF_PLATFORM_WIN_CAIRO})
-    list(APPEND WTF_LIBRARIES
-        cflite
-    )
-else ()
-    list(APPEND WTF_LIBRARIES
-        CoreFoundation${DEBUG_SUFFIX}
+if (USE_CF)
+    list(APPEND WTF_SOURCES
+        text/cf/AtomicStringImplCF.cpp
+        text/cf/StringCF.cpp
+        text/cf/StringImplCF.cpp
+        text/cf/StringViewCF.cpp
     )
+
+    list(APPEND WTF_LIBRARIES ${COREFOUNDATION_LIBRARY})
 endif ()
 
 add_custom_command(
index d1fdc81c9b4564eec172335d1d697ae949895ef7..e5592721a7eba51081bfc0c7026714a138e81926 100644 (file)
@@ -1,3 +1,16 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        No new tests. No change in behavior.
+
+        * PlatformWin.cmake:
+        * WebCorePrefix.h:
+        * testing/js/WebCoreTestSupportPrefix.h:
+
 2017-08-31  Sam Weinig  <sam@webkit.org>
 
         Implement DOMMatrix2DInit for setTransform()/addPath()
index ddc8172b229c2ca82c75b2255b5daec5f78bff7a..9a4b4dafeecf94c4bd65099c93ae2d7fae88f2b5 100644 (file)
@@ -28,8 +28,6 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES
     "${FORWARDING_HEADERS_DIR}/WTF"
     "${WEBCORE_DIR}/accessibility/win"
     "${WEBCORE_DIR}/page/win"
-    "${WEBCORE_DIR}/platform/cf"
-    "${WEBCORE_DIR}/platform/cf/win"
     "${WEBCORE_DIR}/platform/graphics/egl"
     "${WEBCORE_DIR}/platform/graphics/opengl"
     "${WEBCORE_DIR}/platform/graphics/opentype"
@@ -50,8 +48,6 @@ list(APPEND WebCore_SOURCES
 
     html/HTMLSelectElementWin.cpp
 
-    loader/archive/cf/LegacyWebArchive.cpp
-
     page/win/DragControllerWin.cpp
     page/win/EventHandlerWin.cpp
     page/win/FrameWin.cpp
@@ -62,15 +58,6 @@ list(APPEND WebCore_SOURCES
 
     platform/audio/PlatformMediaSessionManager.cpp
 
-    platform/cf/CFURLExtras.cpp
-    platform/cf/FileSystemCF.cpp
-    platform/cf/KeyedDecoderCF.cpp
-    platform/cf/KeyedEncoderCF.cpp
-    platform/cf/SharedBufferCF.cpp
-    platform/cf/URLCF.cpp
-
-    platform/cf/win/CertificateCFWin.cpp
-
     platform/graphics/GraphicsContext3DPrivate.cpp
 
     platform/graphics/egl/GLContextEGL.cpp
@@ -110,8 +97,6 @@ list(APPEND WebCore_SOURCES
 
     platform/text/LocaleNone.cpp
 
-    platform/text/cf/HyphenationCF.cpp
-
     platform/win/BString.cpp
     platform/win/BitmapInfo.cpp
     platform/win/ClipboardUtilitiesWin.cpp
@@ -201,8 +186,6 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
 
     css/parser
 
-    history/cf
-
     html/forms
     html/parser
     html/shadow
@@ -213,7 +196,6 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     loader/cache
     loader/icon
 
-    loader/archive/cf
 
     page/animation
     page/csp
@@ -222,7 +204,6 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
 
     platform/animation
     platform/audio
-    platform/cf
     platform/graphics
     platform/mock
     platform/network
@@ -230,8 +211,6 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     platform/text
     platform/win
 
-    platform/cf/win
-
     platform/graphics/filters
     platform/graphics/opengl
     platform/graphics/opentype
@@ -255,6 +234,38 @@ set(WebCore_FORWARDING_HEADERS_DIRECTORIES
     svg/graphics/filters
 )
 
+if (USE_CF)
+    list(APPEND WebCore_INCLUDE_DIRECTORIES
+        "${WEBCORE_DIR}/platform/cf"
+        "${WEBCORE_DIR}/platform/cf/win"
+    )
+
+    list(APPEND WebCore_SOURCES
+        loader/archive/cf/LegacyWebArchive.cpp
+
+        platform/cf/CFURLExtras.cpp
+        platform/cf/FileSystemCF.cpp
+        platform/cf/KeyedDecoderCF.cpp
+        platform/cf/KeyedEncoderCF.cpp
+        platform/cf/SharedBufferCF.cpp
+        platform/cf/URLCF.cpp
+
+        platform/cf/win/CertificateCFWin.cpp
+
+        platform/text/cf/HyphenationCF.cpp
+    )
+
+    list(APPEND WebCore_FORWARDING_HEADERS_DIRECTORIES
+        history/cf
+
+        loader/archive/cf
+
+        platform/cf
+
+        platform/cf/win
+    )
+endif ()
+
 if (CMAKE_SIZEOF_VOID_P EQUAL 4)
     list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/makesafeseh.obj)
     add_custom_command(
index ebfacc6eed4f1a204b675b6028dc6b8116971663..61a59a5d144ac5637242941515dd1fd240eccc0d 100644 (file)
@@ -92,7 +92,9 @@
 #include <sys/resource.h>
 #endif
 
+#if USE(CF)
 #include <CoreFoundation/CoreFoundation.h>
+#endif
 
 #if OS(WINDOWS)
 #ifndef CF_IMPLICIT_BRIDGING_ENABLED
 #define CF_IMPLICIT_BRIDGING_DISABLED
 #endif
 
+#if USE(CF)
 #include <CoreFoundation/CFBase.h>
+#endif
 
 #ifndef CF_ENUM
 #define CF_ENUM(_type, _name) _type _name; enum
 #endif
 
 #if PLATFORM(WIN_CAIRO)
-#include <ConditionalMacros.h>
 #include <windows.h>
 #else
 
index ad6959bf62407eadec4163fc9b37b3c8348e3d6b..fe3a7f5c60af9b05e9617abff10518b044f100ab 100644 (file)
 #include <sys/time.h>
 #endif
 
+#if USE(CF)
 #include <CoreFoundation/CoreFoundation.h>
+#endif
+
 #if PLATFORM(WIN_CAIRO)
-#include <ConditionalMacros.h>
 #include <windows.h>
 #else
 
index 6dbe3dcc414d52e06e11c5fb0af70b7cf2da3585..5dcf5193015dfcccf5c596ed44c5cba83791b117 100644 (file)
@@ -1,3 +1,12 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        * PlatformWin.cmake:
+
 2017-08-30  Andy Estes  <aestes@apple.com>
 
         [Mac] Upstream Carbon-related WebKitSystemInterface functions
index 9c1f1a851afe4dbc9be12cb35bb400271b463202..c0a547ffbdf5481b025dea3a4ec54632774c4fab 100644 (file)
@@ -21,7 +21,6 @@ else ()
     )
     list(APPEND WebKit_LIBRARIES
         PRIVATE CFNetwork${DEBUG_SUFFIX}
-        PRIVATE CoreFoundation${DEBUG_SUFFIX}
         PRIVATE CoreGraphics${DEBUG_SUFFIX}
         PRIVATE CoreText${DEBUG_SUFFIX}
         PRIVATE QuartzCore${DEBUG_SUFFIX}
@@ -129,8 +128,6 @@ list(APPEND WebKit_INCLUDES
 )
 
 list(APPEND WebKit_SOURCES_Classes
-    cf/WebCoreSupport/WebInspectorClientCF.cpp
-
     win/AccessibleBase.cpp
     win/AccessibleDocument.cpp
     win/AccessibleImage.cpp
@@ -245,6 +242,16 @@ list(APPEND WebKit_SOURCES_WebCoreSupport
     win/WebCoreSupport/WebVisitedLinkStore.h
 )
 
+if (USE_CF)
+    list(APPEND WebKit_SOURCES_Classes
+        cf/WebCoreSupport/WebInspectorClientCF.cpp
+    )
+
+    list(APPEND WebKit_LIBRARIES
+        ${COREFOUNDATION_LIBRARY}
+    )
+endif ()
+
 if (CMAKE_SIZEOF_VOID_P EQUAL 8)
     enable_language(ASM_MASM)
     if (MSVC)
index d3154897979e56c7c35a8b014d033ccdf229a1dc..47b8deecfef15b88c5d393c6d60f8947b2eb328b 100644 (file)
@@ -1,11 +1,13 @@
 include(OptionsWin)
 
-set(USE_CG 1)
+SET_AND_EXPOSE_TO_BUILD(USE_CF ON)
+SET_AND_EXPOSE_TO_BUILD(USE_CFURLCONNECTION ON)
+
 set(USE_CA 1)
-set(USE_CFURLCONNECTION 1)
 set(USE_ICU_UNICODE 1)
 
 # Libraries where find_package does not work
+set(COREFOUNDATION_LIBRARY CoreFoundation${DEBUG_SUFFIX})
 set(LIBXML2_LIBRARIES libxml2${DEBUG_SUFFIX})
 set(LIBXSLT_LIBRARIES libxslt${DEBUG_SUFFIX})
 set(SQLITE_LIBRARIES SQLite3${DEBUG_SUFFIX})
index b27dba485788b010ce6fb68b04e083cd9614836c..3ccde45dc4a1b218156a8942a8a431b9710fa5c5 100644 (file)
@@ -16,12 +16,14 @@ if (ENABLE_XSLT)
 endif ()
 
 SET_AND_EXPOSE_TO_BUILD(USE_CAIRO ON)
+SET_AND_EXPOSE_TO_BUILD(USE_CF ON)
 
-set(USE_CF 1)
 set(USE_CURL 1)
 set(USE_ICU_UNICODE 1)
 set(USE_TEXTURE_MAPPER_GL 1)
 
 set(ENABLE_GRAPHICS_CONTEXT_3D 1)
 
+set(COREFOUNDATION_LIBRARY CFlite)
+
 add_definitions(-DWTF_PLATFORM_WIN_CAIRO=1)
index 184ffe6265490ccc07ae7b78ee0475253a10f18c..1065e2b40096ff3138afeff975dd75686022ee9f 100644 (file)
@@ -1,3 +1,15 @@
+2017-08-31  Don Olmstead  <don.olmstead@sony.com>
+
+        [CMake] Make USE_CF conditional within Windows
+        https://bugs.webkit.org/show_bug.cgi?id=176173
+
+        Reviewed by Alex Christensen.
+
+        * DumpRenderTree/config.h:
+        * MiniBrowser/win/CMakeLists.txt:
+        * MiniBrowser/win/stdafx.h:
+        * TestWebKitAPI/PlatformWin.cmake:
+
 2017-08-31  Filip Pizlo  <fpizlo@apple.com>
 
         WSL should support makeptr (\)
index 78d85009ddc064f848492928fdca9cd4dd81b065..d43e48dc6eb5d9720f2c67ce9aa882494cadb908 100644 (file)
 #endif
 
 #if PLATFORM(WIN)
-#define USE_CF 1 
 #if PLATFORM(WIN_CAIRO)
 #define USE_CURL 1
 #else
 #define USE_CG 1
-#define USE_CFURLCONNECTION 1
 #endif
 
 #undef _WINSOCKAPI_
index ffe2593d7fd45e4e2b46d01866dc249d99a428a9..e4eca5e55797315a6f1bb2a01f6df5a80c957b86 100644 (file)
@@ -30,13 +30,9 @@ set(MiniBrowser_LIBRARIES
     shlwapi
 )
 
-if (WTF_PLATFORM_WIN_CAIRO)
+if (USE_CF)
     list(APPEND MiniBrowser_LIBRARIES
-        CFLite
-    )
-else ()
-    list(APPEND MiniBrowser_LIBRARIES
-        CoreFoundation
+        ${COREFOUNDATION_LIBRARY}
     )
 endif ()
 
index 0e0c74916a9f0ea1e4fd6863e9ddcee0c18ff073..c78d4c1e5b8fb5226fdaefae3fe63c2b6fbf5fca 100644 (file)
 
 #pragma once
 
+#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H && defined(BUILDING_WITH_CMAKE)
+#include "cmakeconfig.h"
+#endif
+
 #define WIN32_LEAN_AND_MEAN        // Exclude rarely-used stuff from Windows headers
 
 // Needed for limit defines, like INTMAX_MAX, which is used by the std C++ library
index f203950edd46f641fa36167ff140a6d399a46dac..6ab56ffd3e210f501cb5d9f161b5fac58cbaed54 100644 (file)
@@ -86,7 +86,6 @@ else ()
     list(APPEND test_webcore_LIBRARIES
         ASL${DEBUG_SUFFIX}
         CFNetwork${DEBUG_SUFFIX}
-        CoreFoundation${DEBUG_SUFFIX}
         CoreGraphics${DEBUG_SUFFIX}
         CoreText${DEBUG_SUFFIX}
         QuartzCore${DEBUG_SUFFIX}
@@ -99,6 +98,12 @@ else ()
     )
 endif ()
 
+if (USE_CF)
+    list(APPEND test_webcore_LIBRARIES
+        ${COREFOUNDATION_LIBRARY}
+    )
+endif ()
+
 add_library(TestWTFLib SHARED
     ${test_main_SOURCES}
     ${TestWTF_SOURCES}