cmake: detect Emscripten architecture as emscripten
parent
53d434fd24
commit
25b723cc82
|
@ -34,6 +34,8 @@ function(check_cpu_architecture ARCH VARIABLE)
|
|||
_internal_check_cpu_architecture("defined(__aarch64__) || defined(_M_ARM64)" arm64 ${VARIABLE})
|
||||
elseif(ARCH STREQUAL "loongarch64")
|
||||
_internal_check_cpu_architecture("defined(__loongarch64)" loongarch64 ${VARIABLE})
|
||||
elseif(ARCH STREQUAL "emscripten")
|
||||
_internal_check_cpu_architecture("defined(__EMSCRIPTEN__)" emscripten ${VARIABLE})
|
||||
else()
|
||||
message(WARNING "Unknown CPU architectures (${ARCH}).")
|
||||
set(${VARIABLE} FALSE)
|
||||
|
|
|
@ -52,6 +52,8 @@ macro(SDL_DetectCMakePlatform)
|
|||
set(SDL_CMAKE_PLATFORM Minix)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Android.*")
|
||||
set(SDL_CMAKE_PLATFORM Android)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Emscripten.*")
|
||||
set(SDL_CMAKE_PLATFORM Emscripten)
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
|
||||
message_error("BeOS support has been removed as of SDL 2.0.2.")
|
||||
endif()
|
||||
|
@ -76,7 +78,7 @@ function(SDL_DetectCPUArchitecture)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
set(sdl_known_archs x86 x64 arm32 arm64 loongarch64)
|
||||
set(sdl_known_archs x86 x64 arm32 arm64 loongarch64 emscripten)
|
||||
if(NOT sdl_cpu_names)
|
||||
set(found FALSE)
|
||||
foreach(sdl_known_arch ${sdl_known_archs})
|
||||
|
|
Loading…
Reference in New Issue