Make WebCore a framework in Mac CMake build
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Oct 2015 04:14:34 +0000 (04:14 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 30 Oct 2015 04:14:34 +0000 (04:14 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150702

Patch by Alex Christensen <achristensen@webkit.org> on 2015-10-29
Reviewed by Geoffrey Garen.

Source/WebCore:

* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:

Source/WebKit:

* PlatformMac.cmake:

Source/WebKit2:

* PlatformMac.cmake:

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

Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/PlatformEfl.cmake
Source/WebCore/PlatformGTK.cmake
Source/WebCore/PlatformMac.cmake
Source/WebKit/ChangeLog
Source/WebKit/PlatformMac.cmake
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformMac.cmake

index e88f8cb..700fbb7 100644 (file)
@@ -2104,7 +2104,6 @@ set(WebCore_SOURCES
     platform/FileChooser.cpp
     platform/FileStream.cpp
     platform/FileSystem.cpp
-    platform/KillRingNone.cpp
     platform/Language.cpp
     platform/Length.cpp
     platform/LengthSize.cpp
@@ -2345,7 +2344,6 @@ set(WebCore_SOURCES
 
     platform/text/BidiContext.cpp
     platform/text/DateTimeFormat.cpp
-    platform/text/Hyphenation.cpp
     platform/text/LineEnding.cpp
     platform/text/LocaleToScriptMappingDefault.cpp
     platform/text/PlatformLocale.cpp
@@ -3772,3 +3770,5 @@ endif ()
 if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND WTF_CPU_ARM AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.3"))
     set_source_files_properties(svg/SVGPathElement.cpp PROPERTIES COMPILE_FLAGS "-O2")
 endif ()
+
+WEBKIT_FRAMEWORK(WebCore)
index 3161508..bfae028 100644 (file)
@@ -1,5 +1,17 @@
 2015-10-29  Alex Christensen  <achristensen@webkit.org>
 
+        Make WebCore a framework in Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150702
+
+        Reviewed by Geoffrey Garen.
+
+        * CMakeLists.txt:
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * PlatformMac.cmake:
+
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
         CMake build fix.
 
         * editing/mac/EditorMac.mm:
index 9cc1157..a6f1c1e 100644 (file)
@@ -89,6 +89,7 @@ list(APPEND WebCore_SOURCES
 
     platform/ContextMenuItemNone.cpp
     platform/ContextMenuNone.cpp
+    platform/KillRingNone.cpp
 
     platform/audio/efl/AudioBusEfl.cpp
 
@@ -275,6 +276,7 @@ list(APPEND WebCore_SOURCES
     platform/soup/SharedBufferSoup.cpp
     platform/soup/URLSoup.cpp
 
+    platform/text/Hyphenation.cpp
     platform/text/LocaleICU.cpp
 
     platform/text/efl/TextBreakIteratorInternalICUEfl.cpp
index 918ee77..8bc1fda 100644 (file)
@@ -74,6 +74,7 @@ list(APPEND WebCore_SOURCES
     loader/soup/CachedRawResourceSoup.cpp
     loader/soup/SubresourceLoaderSoup.cpp
 
+    platform/KillRingNone.cpp
     platform/PlatformStrategies.cpp
 
     platform/audio/gstreamer/AudioDestinationGStreamer.cpp
@@ -214,6 +215,7 @@ list(APPEND WebCore_SOURCES
     platform/soup/SharedBufferSoup.cpp
     platform/soup/URLSoup.cpp
 
+    platform/text/Hyphenation.cpp
     platform/text/LocaleICU.cpp
 
     platform/text/enchant/TextCheckerEnchant.cpp
index 38e61e9..e5a3c4f 100644 (file)
@@ -1,5 +1,54 @@
-find_library(QUARTZ_FRAMEWORK Quartz)
-add_definitions(-iframework ${QUARTZ_FRAMEWORK}/Frameworks)
+set(WebCore_LIBRARY_TYPE SHARED)
+
+if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
+set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
+elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
+set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceYosemite.a)
+else ()
+set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceElCapitan.a)
+endif ()
+link_directories(../../WebKitLibraries)
+
+find_library(ACCELERATE_LIBRARY accelerate)
+find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
+find_library(AUDIOUNIT_LIBRARY AudioUnit)
+find_library(CARBON_LIBRARY Carbon)
+find_library(COCOA_LIBRARY Cocoa)
+find_library(COREAUDIO_LIBRARY CoreAudio)
+find_library(DISKARBITRATION_LIBRARY DiskArbitration)
+find_library(IOKIT_LIBRARY IOKit)
+find_library(IOSURFACE_LIBRARY IOSurface)
+find_library(OPENGL_LIBRARY OpenGL)
+find_library(QUARTZ_LIBRARY Quartz)
+find_library(QUARTZCORE_LIBRARY QuartzCore)
+find_library(SECURITY_LIBRARY Security)
+find_library(SYSTEMCONFIGURATION_LIBRARY SystemConfiguration)
+find_library(SQLITE3_LIBRARY sqlite3)
+find_library(XML2_LIBRARY XML2)
+find_package(ZLIB REQUIRED)
+
+list(APPEND WebCore_LIBRARIES
+    ${ACCELERATE_LIBRARY}
+    ${AUDIOTOOLBOX_LIBRARY}
+    ${AUDIOUNIT_LIBRARY}
+    ${CARBON_LIBRARY}
+    ${COCOA_LIBRARY}
+    ${COREAUDIO_LIBRARY}
+    ${DISKARBITRATION_LIBRARY}
+    ${IOKIT_LIBRARY}
+    ${IOSURFACE_LIBRARY}
+    ${OPENGL_LIBRARY}
+    ${QUARTZ_LIBRARY}
+    ${QUARTZCORE_LIBRARY}
+    ${SECURITY_LIBRARY}
+    ${SQLITE3_LIBRARY}
+    ${SYSTEMCONFIGURATION_LIBRARY}
+    ${WEBKITSYSTEMINTERFACE_LIBRARY}
+    ${XML2_LIBRARY}
+    ${ZLIB_LIBRARIES}
+)
+
+add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
 
 find_library(DATADETECTORSCORE_FRAMEWORK DataDetectorsCore HINTS /System/Library/PrivateFrameworks)
 if (NOT DATADETECTORSCORE_FRAMEWORK-NOTFOUND)
@@ -344,7 +393,6 @@ list(APPEND WebCore_SOURCES
     platform/graphics/cg/ImageCG.cpp
     platform/graphics/cg/ImageSourceCG.cpp
     platform/graphics/cg/ImageSourceCGMac.mm
-    platform/graphics/cg/ImageSourceCGWin.cpp
     platform/graphics/cg/IntPointCG.cpp
     platform/graphics/cg/IntRectCG.cpp
     platform/graphics/cg/IntSizeCG.cpp
@@ -489,7 +537,6 @@ list(APPEND WebCore_SOURCES
     platform/network/mac/WebCoreURLResponse.mm
 
     platform/posix/FileSystemPOSIX.cpp
-    platform/posix/SharedBufferPOSIX.cpp
 
     platform/text/cf/HyphenationCF.cpp
 
index a473feb..73b60c8 100644 (file)
@@ -1,5 +1,14 @@
 2015-10-29  Alex Christensen  <achristensen@webkit.org>
 
+        Make WebCore a framework in Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150702
+
+        Reviewed by Geoffrey Garen.
+
+        * PlatformMac.cmake:
+
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
         Fix Mac CMake build
         https://bugs.webkit.org/show_bug.cgi?id=150686
 
index 099d7dd..c916711 100644 (file)
@@ -1,53 +1,7 @@
-find_library(ACCELERATE_LIBRARY accelerate)
-find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
-find_library(AUDIOUNIT_LIBRARY AudioUnit)
-find_library(CARBON_LIBRARY Carbon)
-find_library(COCOA_LIBRARY Cocoa)
-find_library(COREAUDIO_LIBRARY CoreAudio)
-find_library(DISKARBITRATION_LIBRARY DiskArbitration)
-find_library(IOKIT_LIBRARY IOKit)
-find_library(IOSURFACE_LIBRARY IOSurface)
-find_library(OPENGL_LIBRARY OpenGL)
 find_library(QUARTZ_LIBRARY Quartz)
-find_library(QUARTZCORE_LIBRARY QuartzCore)
-find_library(SECURITY_LIBRARY Security)
-find_library(SQLITE3_LIBRARY sqlite3)
-find_library(SYSTEM_CONFIGURATION_LIBRARY SystemConfiguration)
-find_library(XML2_LIBRARY XML2)
-find_package(ZLIB REQUIRED)
-
 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
-
-if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
-elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceYosemite.a)
-else ()
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceElCapitan.a)
-endif ()
 link_directories(../../WebKitLibraries)
 
-list(APPEND WebKit_LIBRARIES
-    PRIVATE ${ACCELERATE_LIBRARY}
-    PRIVATE ${AUDIOTOOLBOX_LIBRARY}
-    PRIVATE ${AUDIOUNIT_LIBRARY}
-    PRIVATE ${CARBON_LIBRARY}
-    PRIVATE ${COCOA_LIBRARY}
-    PRIVATE ${COREAUDIO_LIBRARY}
-    PRIVATE ${DISKARBITRATION_LIBRARY}
-    PRIVATE ${IOKIT_LIBRARY}
-    PRIVATE ${IOSURFACE_LIBRARY}
-    PRIVATE ${OPENGL_LIBRARY}
-    PRIVATE ${QUARTZ_LIBRARY}
-    PRIVATE ${QUARTZCORE_LIBRARY}
-    PRIVATE ${SECURITY_LIBRARY}
-    PRIVATE ${SQLITE3_LIBRARY}
-    PRIVATE ${SYSTEM_CONFIGURATION_LIBRARY}
-    PRIVATE ${WEBKITSYSTEMINTERFACE_LIBRARY}
-    PRIVATE ${XML2_LIBRARY}
-    PRIVATE ${ZLIB_LIBRARIES}
-)
-
 list(APPEND WebKit_INCLUDE_DIRECTORIES
     "${DERIVED_SOURCES_DIR}"
     "${DERIVED_SOURCES_JAVASCRIPTCORE_DIR}"
index 2cf6370..b49231c 100644 (file)
@@ -1,5 +1,14 @@
 2015-10-29  Alex Christensen  <achristensen@webkit.org>
 
+        Make WebCore a framework in Mac CMake build
+        https://bugs.webkit.org/show_bug.cgi?id=150702
+
+        Reviewed by Geoffrey Garen.
+
+        * PlatformMac.cmake:
+
+2015-10-29  Alex Christensen  <achristensen@webkit.org>
+
         EFL build fix after r191749
 
         * CMakeLists.txt:
index 04dee82..ea203c9 100644 (file)
@@ -1,54 +1,11 @@
 add_definitions("-ObjC++ -std=c++11")
-
-if ("${CURRENT_OSX_VERSION}" MATCHES "10.9")
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceMavericks.a)
-elif ("${CURRENT_OSX_VERSION}" MATCHES "10.10")
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceYosemite.a)
-else ()
-set(WEBKITSYSTEMINTERFACE_LIBRARY libWebKitSystemInterfaceElCapitan.a)
-endif ()
 link_directories(../../WebKitLibraries)
-
-find_library(ACCELERATE_LIBRARY accelerate)
-find_library(AUDIOTOOLBOX_LIBRARY AudioToolbox)
-find_library(AUDIOUNIT_LIBRARY AudioUnit)
 find_library(CARBON_LIBRARY Carbon)
-find_library(COCOA_LIBRARY Cocoa)
-find_library(COREAUDIO_LIBRARY CoreAudio)
-find_library(DISKARBITRATION_LIBRARY DiskArbitration)
-find_library(IOKIT_LIBRARY IOKit)
-find_library(IOSURFACE_LIBRARY IOSurface)
-find_library(OPENGL_LIBRARY OpenGL)
 find_library(QUARTZ_LIBRARY Quartz)
-find_library(QUARTZCORE_LIBRARY QuartzCore)
-find_library(SECURITY_LIBRARY Security)
-find_library(SYSTEMCONFIGURATION_LIBRARY SystemConfiguration)
-find_library(SQLITE3_LIBRARY sqlite3)
-find_library(XML2_LIBRARY XML2)
-find_package(ZLIB REQUIRED)
-
 add_definitions(-iframework ${QUARTZ_LIBRARY}/Frameworks)
 add_definitions(-iframework ${CARBON_LIBRARY}/Frameworks)
 
 list(APPEND WebKit2_LIBRARIES
-    ${ACCELERATE_LIBRARY}
-    ${AUDIOTOOLBOX_LIBRARY}
-    ${AUDIOUNIT_LIBRARY}
-    ${CARBON_LIBRARY}
-    ${COCOA_LIBRARY}
-    ${COREAUDIO_LIBRARY}
-    ${DISKARBITRATION_LIBRARY}
-    ${IOKIT_LIBRARY}
-    ${IOSURFACE_LIBRARY}
-    ${OPENGL_LIBRARY}
-    ${QUARTZ_LIBRARY}
-    ${QUARTZCORE_LIBRARY}
-    ${SECURITY_LIBRARY}
-    ${SQLITE3_LIBRARY}
-    ${SYSTEMCONFIGURATION_LIBRARY}
-    ${WEBKITSYSTEMINTERFACE_LIBRARY}
-    ${XML2_LIBRARY}
-    ${ZLIB_LIBRARIES}
     WebKit
 )
 
@@ -492,7 +449,6 @@ set(WebKit2_FORWARDING_HEADERS_DIRECTORIES
     UIProcess/Cocoa
 
     UIProcess/API/C
-    UIProcess/API/Cocoa
     UIProcess/API/cpp
 
     WebProcess/WebPage
@@ -502,6 +458,18 @@ set(WebKit2_FORWARDING_HEADERS_DIRECTORIES
     WebProcess/InjectedBundle/API/mac
 )
 
+# This is needed right now to import ObjC headers instead of including them.
+# FIXME: Forwarding headers should be copies of actual headers.
+file(GLOB ObjCHeaders UIProcess/API/Cocoa/*.h)
+foreach (_file ${ObjCHeaders})
+    get_filename_component(_name ${_file} NAME)
+    if (NOT EXISTS ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit/${_name})
+        file(WRITE ${DERIVED_SOURCES_DIR}/ForwardingHeaders/WebKit/${_name} "#import <WebKit2/UIProcess/API/Cocoa/${_name}>")
+    endif ()
+endforeach ()
+
+set(WebKit2_OUTPUT_NAME WebKit)
+
 add_custom_command(
     OUTPUT ${DERIVED_SOURCES_WEBKIT2_DIR}/MessageRecorderProbes.h
     MAIN_DEPENDENCY Platform/IPC/MessageRecorderProbes.d