diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98690739..54cb5c3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,6 +155,7 @@ jobs: - Linux x86_64 Clang - macOS arm64 - macOS x86_64 + - iOS arm64 - Android x86_64 - Android arm64-v8a configuration: @@ -175,6 +176,9 @@ jobs: - platform: Linux x86_64 Clang runner: ubuntu-24.04 clang-version: 20 + - platform: iOS arm64 + runner: macos-latest + cmake-options: "-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/cmake/toolchain/ios.cmake" - platform: macOS arm64 runner: macos-latest - platform: macOS x86_64 diff --git a/CMakeLists.txt b/CMakeLists.txt index cf72e772..a4149da5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,7 +24,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0) +if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS") + set(CMAKE_OSX_DEPLOYMENT_TARGET 11.0) +endif() # Prevent unicorn from generating universal binaries on macOS # It doesn't support it, even if it thinks it does... diff --git a/cmake/toolchain/ios.cmake b/cmake/toolchain/ios.cmake new file mode 100644 index 00000000..f4ad9760 --- /dev/null +++ b/cmake/toolchain/ios.cmake @@ -0,0 +1,3 @@ +set(CMAKE_SYSTEM_NAME "iOS") +set(CMAKE_OSX_ARCHITECTURES "arm64") +set(CMAKE_OSX_DEPLOYMENT_TARGET 14.0) \ No newline at end of file