cmake: simd detection clean-up for Apple multi-arch configs.

This commit is contained in:
Ozkan Sezer
2025-09-02 22:34:10 +03:00
parent c0fb71f2a9
commit 83bb0f9105
2 changed files with 14 additions and 10 deletions

View File

@@ -80,6 +80,12 @@ include("${SDL3_SOURCE_DIR}/cmake/PreseedNokiaNGageCache.cmake")
SDL_DetectCompiler()
SDL_DetectTargetCPUArchitectures(SDL_CPUS)
if(APPLE AND CMAKE_OSX_ARCHITECTURES)
list(LENGTH CMAKE_OSX_ARCHITECTURES _num_arches)
if(_num_arches GREATER 1)
set(APPLE_MULTIARCH TRUE)
endif()
endif()
# Increment this if there is an incompatible change - but if that happens,
# we should rename the library from SDL3 to SDL4, at which point this would