File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,26 @@ function(godot_arch_name OUTVAR)
6464 endif ()
6565 endif ()
6666
67+ # Special case for MSVC cross-compilation
68+ if (DEFINED CMAKE_VS_PLATFORM_NAME)
69+ if (CMAKE_VS_PLATFORM_NAME STREQUAL "Win32" )
70+ set (${OUTVAR} "x86_32" PARENT_SCOPE )
71+ return ()
72+ elseif (CMAKE_VS_PLATFORM_NAME STREQUAL "x64" )
73+ set (${OUTVAR} "x86_64" PARENT_SCOPE )
74+ return ()
75+ elseif (CMAKE_VS_PLATFORM_NAME STREQUAL "ARM64" )
76+ set (${OUTVAR} "arm64" PARENT_SCOPE )
77+ return ()
78+ endif ()
79+ endif ()
80+
81+ # Special case for GNU -m32 builds
82+ if (CMAKE_CXX_FLAGS MATCHES "-m32" )
83+ set (${OUTVAR} "x86_32" PARENT_SCOPE )
84+ return ()
85+ endif ()
86+
6787 # Direct match early out.
6888 string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR} " ARCH)
6989 if (ARCH IN_LIST ARCH_LIST)
@@ -73,7 +93,7 @@ function(godot_arch_name OUTVAR)
7393
7494 # Known aliases
7595 set (x86_64 "w64;amd64;x86-64" )
76- set (arm32 "armv7;armv7-a" )
96+ set (arm32 "armv7;armv7-a;arm " )
7797 set (arm64 "armv8;arm64v8;aarch64;armv8-a" )
7898 set (rv64 "rv;riscv;riscv64" )
7999 set (ppc32 "ppcle;ppc" )
You can’t perform that action at this time.
0 commit comments