diff options
| author | Xander Hawthorne <167850078+CuppaXanax@users.noreply.github.com> | 2026-10-18 16:11:50 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-18 17:11:50 -0600 |
| commit | 890318e3269bb73dc7afdeeead7807e084e25da6 (patch) | |
| tree | 8886382613321b0e5a2ee5d8a8b4b2241fd204ab | |
| parent | ed2ca960b73b1a8fd6afa1e74419f800bd2988b5 (diff) | |
Allow ARM64 on Windows (#265)
Default CMAKE_VS_PLATFORM_NAME to arm64 when targeting ARM64, and accept arm64/ARM64 in the platform check.
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 877c77f..dede181 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,12 +49,18 @@ endif() ################################################################################ if (CMAKE_SYSTEM_NAME STREQUAL "Windows") if(NOT CMAKE_VS_PLATFORM_NAME) - set(CMAKE_VS_PLATFORM_NAME "x64") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64") + set(CMAKE_VS_PLATFORM_NAME "arm64") + else() + set(CMAKE_VS_PLATFORM_NAME "x64") + endif() endif() message("${CMAKE_VS_PLATFORM_NAME} architecture in use") if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64" - OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")) + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32" + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "arm64" + OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "ARM64")) message(FATAL_ERROR "${CMAKE_VS_PLATFORM_NAME} arch is not supported!") endif() endif() |
