Skip to content
Permalink
Browse files
[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

.:

Add variables for the paths to copied framework headers. This is done to be
explicit rather than relying on ${FORWARDING_HEADERS_DIR}.

Currently all ports but WinCairo will default to ${FORWARDING_HEADERS_DIR}.
WinCairo overrides them to provide a directory structure that looks more
like what happens in an XCode build. This is meant as an intermediate step
towards making all CMake ports behave like this.

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:

Source/JavaScriptCore:

* CMakeLists.txt:
* shell/PlatformWin.cmake:

Source/WebCore:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WebCore/PAL:

* pal/CMakeLists.txt:

Source/WebKit:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WebKitLegacy:

* CMakeLists.txt:
* PlatformWin.cmake:

Source/WTF:

* wtf/CMakeLists.txt:

Tools:

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


Canonical link: https://commits.webkit.org/211001@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
donny-dont committed Apr 9, 2019
1 parent c3db596 commit 62cb315a034d5c7e4757fde9c4671c7d2f89fd48
Showing 25 changed files with 160 additions and 29 deletions.
@@ -1,3 +1,22 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

Add variables for the paths to copied framework headers. This is done to be
explicit rather than relying on ${FORWARDING_HEADERS_DIR}.

Currently all ports but WinCairo will default to ${FORWARDING_HEADERS_DIR}.
WinCairo overrides them to provide a directory structure that looks more
like what happens in an XCode build. This is meant as an intermediate step
towards making all CMake ports behave like this.

* Source/cmake/OptionsWinCairo.cmake:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:

2019-04-08 Xan Lopez <xan@igalia.com>

[CMake] Detect SSE2 at compile time
@@ -7,7 +7,8 @@ list(APPEND JavaScriptCore_UNIFIED_SOURCE_LIST_FILES
)

set(JavaScriptCore_INCLUDE_DIRECTORIES
"${FORWARDING_HEADERS_DIR}"
"${WTF_FRAMEWORK_HEADERS_DIR}"
"${JavaScriptCore_FRAMEWORK_HEADERS_DIR}"
)

set(JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES
@@ -300,9 +301,9 @@ add_executable(LLIntOffsetsExtractor
)

target_link_libraries(LLIntSettingsExtractor WTF)
add_dependencies(LLIntSettingsExtractor JavaScriptCoreForwardingHeaders)
add_dependencies(LLIntSettingsExtractor JavaScriptCoreFrameworkHeaders)
target_link_libraries(LLIntOffsetsExtractor WTF)
add_dependencies(LLIntOffsetsExtractor JavaScriptCoreForwardingHeaders)
add_dependencies(LLIntOffsetsExtractor JavaScriptCoreFrameworkHeaders)

# The build system will execute asm.rb every time LLIntOffsetsExtractor's mtime is newer than
# LLIntAssembly.h's mtime. The problem we have here is: asm.rb has some built-in optimization
@@ -1274,12 +1275,15 @@ if (COMPILER_IS_GCC_OR_CLANG)
endif ()

WEBKIT_MAKE_FORWARDING_HEADERS(JavaScriptCore
TARGET_NAME JavaScriptCoreFrameworkHeaders
DESTINATION ${JavaScriptCore_FRAMEWORK_HEADERS_DIR}/JavaScriptCore
FILES ${JavaScriptCore_PUBLIC_FRAMEWORK_HEADERS}
FLATTENED
)

WEBKIT_MAKE_FORWARDING_HEADERS(JavaScriptCore
TARGET_NAME JavaScriptCorePrivateForwardingHeaders
TARGET_NAME JavaScriptCorePrivateFrameworkHeaders
DESTINATION ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}/JavaScriptCore
FILES ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS}
FLATTENED
)
@@ -1,3 +1,13 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* CMakeLists.txt:
* shell/PlatformWin.cmake:

2019-04-08 Yusuke Suzuki <ysuzuki@apple.com>

[JSC] isRope jump in StringSlice should not jump over register allocations
@@ -1,4 +1,4 @@
include_directories(./ PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES})
include_directories(./ PRIVATE ${JavaScriptCore_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_INCLUDE_DIRECTORIES} ${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR})
include_directories(SYSTEM ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})
add_library(jscLib SHARED ${JSC_SOURCES})

@@ -1,3 +1,12 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* wtf/CMakeLists.txt:

2019-04-08 Guillaume Emont <guijemont@igalia.com>

Enable DFG on MIPS
@@ -502,7 +502,8 @@ WEBKIT_WRAP_SOURCELIST(${WTF_SOURCES})
WEBKIT_FRAMEWORK(WTF)

WEBKIT_MAKE_FORWARDING_HEADERS(WTF
DESTINATION ${FORWARDING_HEADERS_DIR}/wtf
TARGET_NAME WTFFrameworkHeaders
DESTINATION ${WTF_FRAMEWORK_HEADERS_DIR}/wtf
FILES ${WTF_PUBLIC_HEADERS}
)

@@ -17,6 +17,8 @@ list(APPEND WebCore_UNIFIED_SOURCE_LIST_FILES

set(WebCore_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
"${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
"${PAL_FRAMEWORK_HEADERS_DIR}"
"${WEBCORE_DIR}"
"${WEBCORE_DIR}/Modules/airplay"
"${WEBCORE_DIR}/Modules/applepay"
@@ -1,3 +1,13 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* CMakeLists.txt:
* PlatformWin.cmake:

2019-04-08 Chris Fleizach <cfleizach@apple.com>

AX: Automatically compute accessibility labels for Apple Pay buttons
@@ -1,3 +1,12 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* pal/CMakeLists.txt:

2019-04-08 Justin Fan <justin_fan@apple.com>

[Web GPU] Fix Web GPU experimental feature on iOS
@@ -50,6 +50,7 @@ WEBKIT_WRAP_SOURCELIST(${PAL_SOURCES})
WEBKIT_FRAMEWORK(PAL)

WEBKIT_MAKE_FORWARDING_HEADERS(PAL
DESTINATION ${FORWARDING_HEADERS_DIR}/pal
TARGET_NAME PALFrameworkHeaders
DESTINATION ${PAL_FRAMEWORK_HEADERS_DIR}/pal
FILES ${PAL_PUBLIC_HEADERS}
)
@@ -354,12 +354,14 @@ set(WebCore_PRIVATE_FRAMEWORK_HEADERS
)

WEBKIT_MAKE_FORWARDING_HEADERS(WebCore
TARGET_NAME WebCorePrivateFrameworkHeaders
DESTINATION ${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}/WebCore
FILES ${WebCore_PRIVATE_FRAMEWORK_HEADERS}
DIRECTORIES ${WebCore_FORWARDING_HEADERS_DIRECTORIES}
FLATTENED
)

add_dependencies(WebCoreForwardingHeaders WebCoreBindings)
add_dependencies(WebCorePrivateFrameworkHeaders WebCoreBindings)

set(WebCore_OUTPUT_NAME
WebCore${DEBUG_SUFFIX}
@@ -3,6 +3,8 @@ include(WebKitCommon)
set_property(DIRECTORY . PROPERTY FOLDER "WebKit")

set(WebKit_INCLUDE_DIRECTORIES
"${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
"${WebKit_FRAMEWORK_HEADERS_DIR}"
"${WEBKIT_DIR}"
"${WEBKIT_DIR}/NetworkProcess"
"${WEBKIT_DIR}/NetworkProcess/Classifier"
@@ -1,3 +1,13 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* CMakeLists.txt:
* PlatformWin.cmake:

2019-04-08 Wenson Hsieh <wenson_hsieh@apple.com>

[iOS] Do not allow starting selection drags when selection views are not visible
@@ -217,6 +217,8 @@ if (${WTF_PLATFORM_WIN_CAIRO})
endif ()

WEBKIT_MAKE_FORWARDING_HEADERS(WebKit
TARGET_NAME WebKitFrameworkHeaders
DESTINATION ${WebKit_FRAMEWORK_HEADERS_DIR}/WebKit
DIRECTORIES ${WebKit_FORWARDING_HEADERS_DIRECTORIES}
FLATTENED
)
@@ -21,7 +21,7 @@ set(WebKitLegacy_INCLUDE_DIRECTORIES
"${CMAKE_BINARY_DIR}"
"${WEBKITLEGACY_DIR}/Storage"
"${WEBKITLEGACY_DIR}/WebCoreSupport"
"${FORWARDING_HEADERS_DIR}"
"${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}"
)

set(WebKitLegacy_SYSTEM_INCLUDE_DIRECTORIES
@@ -1,3 +1,13 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

* CMakeLists.txt:
* PlatformWin.cmake:

2019-04-05 Commit Queue <commit-queue@webkit.org>

Unreviewed, rolling out r243833.
@@ -486,7 +486,8 @@ set(WebKitLegacyGUID_PRIVATE_FRAMEWORK_HEADERS
)

WEBKIT_MAKE_FORWARDING_HEADERS(WebKitLegacyGUID
DESTINATION ${FORWARDING_HEADERS_DIR}/WebKitLegacy
TARGET_NAME WebKitLegacyFrameworkHeaders
DESTINATION ${WebKitLegacy_FRAMEWORK_HEADERS_DIR}/WebKitLegacy
FILES ${WebKitLegacyGUID_PRIVATE_FRAMEWORK_HEADERS}
FLATTENED
)
@@ -37,3 +37,13 @@ set(COREFOUNDATION_LIBRARY CFlite)
SET_AND_EXPOSE_TO_BUILD(ENABLE_DEVELOPER_MODE ${DEVELOPER_MODE})

add_definitions(-DWTF_PLATFORM_WIN_CAIRO=1)

# Override headers directories
set(WTF_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WTF/Headers)
set(JavaScriptCore_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/JavaScriptCore/Headers)
set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/JavaScriptCore/PrivateHeaders)
set(PAL_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/PAL/Headers)
set(WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebCore/PrivateHeaders)
set(WebKitLegacy_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKitLegacy/Headers)
set(WebKit_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKit/Headers)
set(WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR ${CMAKE_BINARY_DIR}/WebKit/PrivateHeaders)
@@ -41,6 +41,15 @@ set(DERIVED_SOURCES_WTF_DIR "${CMAKE_BINARY_DIR}/DerivedSources/WTF")

set(FORWARDING_HEADERS_DIR ${DERIVED_SOURCES_DIR}/ForwardingHeaders)

set(WTF_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(JavaScriptCore_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(PAL_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(WebKitLegacy_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(WebKit_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})
set(WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR ${FORWARDING_HEADERS_DIR})

file(MAKE_DIRECTORY ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR})
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Source/JavaScriptCore/runtime)

@@ -239,12 +239,7 @@ function(WEBKIT_MAKE_FORWARDING_HEADERS framework)
set(multiValueArgs DIRECTORIES FILES)
cmake_parse_arguments(opt "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
set(headers ${opt_FILES})
if (opt_DESTINATION)
set(destination ${opt_DESTINATION})
else ()
set(destination ${FORWARDING_HEADERS_DIR}/${framework})
endif ()
file(MAKE_DIRECTORY ${destination})
file(MAKE_DIRECTORY ${opt_DESTINATION})
foreach (dir IN LISTS opt_DIRECTORIES)
file(GLOB files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${dir}/*.h)
list(APPEND headers ${files})
@@ -258,11 +253,11 @@ function(WEBKIT_MAKE_FORWARDING_HEADERS framework)
endif ()
if (opt_FLATTENED)
get_filename_component(header_filename ${header} NAME)
set(fwd_header ${destination}/${header_filename})
set(fwd_header ${opt_DESTINATION}/${header_filename})
else ()
get_filename_component(header_dir ${header} DIRECTORY)
file(MAKE_DIRECTORY ${destination}/${header_dir})
set(fwd_header ${destination}/${header})
file(MAKE_DIRECTORY ${opt_DESTINATION}/${header_dir})
set(fwd_header ${opt_DESTINATION}/${header})
endif ()
add_custom_command(OUTPUT ${fwd_header}
COMMAND ${CMAKE_COMMAND} -E copy ${src_header} ${fwd_header}
@@ -1,3 +1,15 @@
2019-04-08 Don Olmstead <don.olmstead@sony.com>

[CMake][WinCairo] Separate copied headers into different directories
https://bugs.webkit.org/show_bug.cgi?id=196655

Reviewed by Michael Catanzaro.

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

2019-04-08 Jonathan Bedard <jbedard@apple.com>

Log stack-trace for run-webkit-tests when interrupted
@@ -27,6 +27,7 @@ set(DumpRenderTree_LIBRARIES
)

set(DumpRenderTree_INCLUDE_DIRECTORIES
${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
${DERIVED_SOURCES_DIR}/DumpRenderTree
${WEBKIT_TESTRUNNER_UISCRIPTCONTEXT_DIR}
${WEBKIT_TESTRUNNER_SHARED_DIR}/Bindings
@@ -1,8 +1,12 @@
set(MiniBrowser_INCLUDE_DIRECTORIES
"${FORWARDING_HEADERS_DIR}"
"${FORWARDING_HEADERS_DIR}/WebKitLegacy"
"${CMAKE_SOURCE_DIR}"
"${CMAKE_SOURCE_DIR}/Source"
${WTF_FRAMEWORK_HEADERS_DIR}
${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
${PAL_FRAMEWORK_HEADERS_DIR}
${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
${WebKit_FRAMEWORK_HEADERS_DIR}
${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR}
)

set(MiniBrowser_SOURCES
@@ -15,13 +15,13 @@ set(TestWebKitAPI_LIBRARIES
)

set(TestWebKitAPI_DEPENDENCIES
JavaScriptCoreForwardingHeaders
JavaScriptCorePrivateForwardingHeaders
WTFForwardingHeaders
JavaScriptCoreFrameworkHeaders
JavaScriptCorePrivateFrameworkHeaders
WTFFrameworkHeaders
)

if (ENABLE_WEBCORE)
list(APPEND TestWebKitAPI_DEPENDENCIES PALForwardingHeaders)
list(APPEND TestWebKitAPI_DEPENDENCIES PALFrameworkHeaders)
endif ()

if (ENABLE_WEBKIT)
@@ -16,6 +16,14 @@ include_directories(
${FORWARDING_HEADERS_DIR}/JavaScriptCore
${TESTWEBKITAPI_DIR}/win
${DERIVED_SOURCES_DIR}/WebKit/Interfaces
${WTF_FRAMEWORK_HEADERS_DIR}
${JavaScriptCore_FRAMEWORK_HEADERS_DIR}
${JavaScriptCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
${PAL_FRAMEWORK_HEADERS_DIR}
${WebCore_PRIVATE_FRAMEWORK_HEADERS_DIR}
${WebKitLegacy_FRAMEWORK_HEADERS_DIR}
${WebKit_FRAMEWORK_HEADERS_DIR}
${WebKit_PRIVATE_FRAMEWORK_HEADERS_DIR}
)

add_definitions(-DWEBCORE_EXPORT= -DWEBCORE_TESTSUPPORT_EXPORT=)
@@ -99,9 +107,9 @@ if (USE_CF)
)
endif ()

list(APPEND TestWebKitAPI_DEPENDENCIES WebCoreForwardingHeaders)
list(APPEND TestWebKitAPI_DEPENDENCIES WebCorePrivateFrameworkHeaders)
if (ENABLE_WEBKIT)
list(APPEND TestWebKitAPI_DEPENDENCIES WebKitForwardingHeaders)
list(APPEND TestWebKitAPI_DEPENDENCIES WebKitFrameworkHeaders)
endif ()

add_library(TestWTFLib SHARED

0 comments on commit 62cb315

Please sign in to comment.