Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e405a58ab0957aac50705bd428703852f49dd8a1
https://github.com/WebKit/WebKit/commit/e405a58ab0957aac50705bd428703852f49dd8a1
Author: Elliott Williams <[email protected]>
Date: 2026-07-08 (Wed, 08 Jul 2026)
Changed paths:
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/PlatformIOS.cmake
M Source/ThirdParty/ANGLE/CMakeLists.txt
M Source/ThirdParty/ANGLE/include/CMakeLists.txt
M Source/WTF/wtf/CMakeLists.txt
M Source/WebCore/CMakeLists.txt
M Source/WebCore/PAL/pal/CMakeLists.txt
M Source/WebCore/PlatformCocoa.cmake
M Source/WebCore/PlatformIOS.cmake
M Source/WebKit/CMakeLists.txt
M Source/WebKit/PlatformIOS.cmake
M Source/WebKitLegacy/CMakeLists.txt
M Source/WebKitLegacy/PlatformMac.cmake
M Source/bmalloc/CMakeLists.txt
M Source/cmake/WebKitFS.cmake
M Source/cmake/WebKitMacros.cmake
M Tools/MiniBrowser/mac/CMakeLists.txt
M Tools/TestWebKitAPI/PlatformMac.cmake
Log Message:
-----------
[CMake] Put headers inside of framework bundles
https://bugs.webkit.org/show_bug.cgi?id=317899
Reviewed by Pascoe and Richard Robinson.
Building for Apple platforms already produces executables in framework
bundles, and some ancillary files like modules. Move all the headers
into the framework bundle, too, giving it proper structure that's
comparable to how our frameworks appear in the SDK.
This is a prerequisite for getting modules working without symlink
hacks, and works towards an internal SDK build.
In the WebKitFS module, add a second kind of path variable.
The existing *_FRAMEWORK_HEADERS_DIR variable is the directory that a
compiler must search to be able to import framework headers. A new
*_HEADER_DIR variable is the directory that actually contains the
headers. On Mac and iOS, the latter variable points inside the
respective framework bundle. So we end up with assignments like this:
# Linux, Windows ports
set(WebKit_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/WebKit/Headers")
set(WebKit_HEADERS_DIR "${CMAKE_BINARY_DIR}/WebKit/Headers/WebKit")
# Mac
set(WebKit_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/WebKit/Headers")
set(WebKit_HEADERS_DIR
"${CMAKE_BINARY_DIR}/WebKit.framework/Versions/A/Headers")
# iOS, other embedded Apple platforms
set(WebKit_FRAMEWORK_HEADERS_DIR "${CMAKE_BINARY_DIR}/WebKit/Headers")
set(WebKit_HEADERS_DIR "${CMAKE_BINARY_DIR}/WebKit.framework/Headers")
Adopt those variables across the codebase.
In the WEBKIT_FRAMEWORK macro library, add some initialization logic
that creates the framework bundle structure at configure time, for
targets that build as SHARED libraries. (All of the 1st-party libraries
that build SHARED are frameworks.) Have each of them emit a `-F` flag to
populate the framework search path. These will be coalesced into one
compiler argument for ~all compilation.
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/PlatformIOS.cmake:
* Source/ThirdParty/ANGLE/CMakeLists.txt:
* Source/ThirdParty/ANGLE/include/CMakeLists.txt:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/PAL/pal/CMakeLists.txt:
* Source/WebCore/PlatformCocoa.cmake:
* Source/WebKit/CMakeLists.txt:
* Source/WebKitLegacy/CMakeLists.txt:
* Source/bmalloc/CMakeLists.txt:
* Source/cmake/WebKitFS.cmake:
* Source/cmake/WebKitMacros.cmake:
* Tools/MiniBrowser/mac/CMakeLists.txt:
* Tools/TestWebKitAPI/PlatformMac.cmake:
Canonical link: https://commits.webkit.org/316781@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications