Fix CI macOS build (#342)

This commit is contained in:
Bruno 2026-10-04 12:31:31 +02:00 committed by GitHub
parent f17045fefe
commit a7b0d501b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View File

@ -30,6 +30,9 @@ jobs:
if ! command -v cmake >/dev/null || ! command -v ninja >/dev/null; then
brew install cmake ninja
fi
if ! command -v glslangValidator >/dev/null; then
brew install glslang
fi
- name: Build
working-directory: ${{ env.NXEMU_LOCAL_WORKSPACE || github.workspace }}

View File

@ -167,7 +167,19 @@ endif()
# Opus
if (NOT TARGET Opus::opus)
# AArch64 always provides NEON. Opus 1.5.x does not recognize macOS'
# "arm64" processor name as its "aarch64" presume-NEON case, while
# runtime CPU capability detection is unavailable on this platform.
if (APPLE AND ARCHITECTURE_arm64)
set(OPUS_MAY_HAVE_NEON OFF CACHE BOOL "Use runtime NEON detection" FORCE)
set(OPUS_PRESUME_NEON ON CACHE BOOL "Assume NEON support" FORCE)
endif()
add_subdirectory(opus)
if (APPLE AND ARCHITECTURE_arm64)
# Opus also guards NEON declarations with MAY_HAVE, even when presumed.
target_compile_definitions(opus PRIVATE
OPUS_ARM_MAY_HAVE_NEON OPUS_ARM_MAY_HAVE_NEON_INTR)
endif()
endif()
# Vulkan — headers must come first: VulkanUtilityLibraries runs find_package(VulkanHeaders CONFIG),