mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
CMake: Enable finding the Swift -target flag in more cases
When the detected SDK for CMAKE_OSX_SYSROOT and friends has the same version as your current macOS system version, CMake helpfully doesn't set CMAKE_OSX_DEPLOYMENT_TARGET. Unfortunately, in this case, swiftc will default to macOS 10.4, which is absolutely ancient. Grab the target triple from the -print-target-info JSON when CMAKE_OSX_DEPLOYMENT_TARGET is not provided at configure time.
This commit is contained in:
parent
ee54f9ee95
commit
7ab1d117f1
Notes:
github-actions[bot]
2024-09-23 17:07:23 +00:00
Author: https://github.com/ADKaster
Commit: 7ab1d117f1
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1477
2 changed files with 14 additions and 3 deletions
|
@ -18,7 +18,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/GenerateSwiftHeader.cmake)
|
|||
|
||||
# FIXME: https://gitlab.kitware.com/cmake/cmake/-/issues/26174
|
||||
if (APPLE)
|
||||
set(CMAKE_Swift_COMPILER_TARGET "${CMAKE_SYSTEM_PROCESSOR}-apple-macosx${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
set(CMAKE_Swift_COMPILER_TARGET "${SWIFT_TARGET_TRIPLE}")
|
||||
endif()
|
||||
|
||||
set(VFS_OVERLAY_DIRECTORY "${CMAKE_BINARY_DIR}/vfs_overlays" CACHE PATH "Directory to put VFS overlays in")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue