AK+Meta: Add SwiftAK module to add helpers to construct swift Strings

This allows constructing Foundation.Data and Swift.String without
unnecessary copies from AK.StringView and AK.String respectively.
This commit is contained in:
Andrew Kaster 2024-08-23 12:22:26 -06:00 committed by Andrew Kaster
parent 349b17cc7a
commit c1c7e5ff3e
Notes: github-actions[bot] 2024-08-25 01:15:22 +00:00
4 changed files with 35 additions and 0 deletions

View file

@ -36,10 +36,12 @@ function(_swift_generate_cxx_header target header)
if(APPLE)
set(SDK_FLAGS "-sdk" "${CMAKE_OSX_SYSROOT}")
list(APPEND SDK_FLAGS "-target" "${CMAKE_Swift_COMPILER_TARGET}")
elseif(WIN32)
set(SDK_FLAGS "-sdk" "$ENV{SDKROOT}")
elseif(DEFINED ${CMAKE_SYSROOT})
set(SDK_FLAGS "-sdk" "${CMAKE_SYSROOT}")
list(APPEND SDK_FLAGS "-target" "${CMAKE_Swift_COMPILER_TARGET}")
endif()
cmake_path(APPEND CMAKE_CURRENT_BINARY_DIR include