cmake: Detect powerpc architecture
parent
fc4085b54e
commit
3db3424b4e
|
@ -372,7 +372,7 @@ dep_option(SDL_SSE "Use SSE assembly routines" ON "SDL_ASSEMBLY;
|
|||
dep_option(SDL_SSE2 "Use SSE2 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_SSE3 "Use SSE3 assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_MMX "Use MMX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_X86 OR SDL_CPU_X64" OFF)
|
||||
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY" OFF)
|
||||
dep_option(SDL_ALTIVEC "Use Altivec assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_POWERPC32 OR SDL_CPU_POWERPC64" OFF)
|
||||
dep_option(SDL_ARMSIMD "Use SIMD assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
|
||||
dep_option(SDL_ARMNEON "Use NEON assembly blitters on ARM" OFF "SDL_ASSEMBLY;SDL_CPU_ARM32" OFF)
|
||||
dep_option(SDL_LSX "Use LSX assembly routines" ON "SDL_ASSEMBLY;SDL_CPU_LOONGARCH64" OFF)
|
||||
|
|
|
@ -36,9 +36,13 @@ function(check_cpu_architecture ARCH VARIABLE)
|
|||
_internal_check_cpu_architecture("defined(__loongarch64)" loongarch64 ${VARIABLE})
|
||||
elseif(ARCH STREQUAL "emscripten")
|
||||
_internal_check_cpu_architecture("defined(__EMSCRIPTEN__)" emscripten ${VARIABLE})
|
||||
elseif(ARCH STREQUAL "powerpc32")
|
||||
_internal_check_cpu_architecture("defined(__PPC__) || defined(__powerpc__)" powerpc32 ${VARIABLE})
|
||||
elseif(ARCH STREQUAL "powerpc64")
|
||||
_internal_check_cpu_architecture("defined(__PPC64__) || defined(__powerpc64__)" powerpc64 ${VARIABLE})
|
||||
else()
|
||||
message(WARNING "Unknown CPU architectures (${ARCH}).")
|
||||
set(${VARIABLE} FALSE)
|
||||
set("${VARIABLE}" FALSE)
|
||||
endif()
|
||||
set("${VARIABLE}" "${${VARIABLE}}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
|
|
@ -78,7 +78,7 @@ function(SDL_DetectCPUArchitecture)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
set(sdl_known_archs x86 x64 arm32 arm64 loongarch64 emscripten)
|
||||
set(sdl_known_archs x64 x86 arm64 arm32 emscripten powerpc32 powerpc64 loongarch64)
|
||||
if(NOT sdl_cpu_names)
|
||||
set(found FALSE)
|
||||
foreach(sdl_known_arch ${sdl_known_archs})
|
||||
|
|
Loading…
Reference in New Issue