set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME iOS)
# Release-only: debug iOS binaries are never shipped and skipping them halves build time.
set(VCPKG_BUILD_TYPE release)
# Override the autoconf --host triple. Without this, vcpkg uses arm64-apple-darwin (same as the
# macOS build machine), which makes autoconf think it's a native build and try to run compiled
# programs — those are iOS arm64 binaries and can't execute on macOS. An ios-suffixed triple
# signals cross-compilation and disables all run-time configure checks.
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-apple-ios17.0")
# Chainload toolchain: forces every vcpkg dep to compile against the iphoneos SDK so all objects
# carry the platform IOS tag (not MACOS). Without this the fat library mixes platforms.
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../toolchains/ios-device.cmake")
