summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorOwen Rudge <owen@owenrudge.net>2021-01-16 21:31:20 +0000
committerOwen Rudge <owen@owenrudge.net>2021-01-18 08:57:58 +0000
commita2bd0a14e1033d9bd1e29416c8c68f96c73d179e (patch)
tree5d8be3a4bff0aaeb32509be6cc0b727a3aa0262c /cmake
parent6d95ed53dc81a2951585c5bf94a5dba77842c8f0 (diff)
downloadopenttd-a2bd0a14e1033d9bd1e29416c8c68f96c73d179e.tar.xz
Feature: [Actions] ARM64 builds for Windows
Diffstat (limited to 'cmake')
-rw-r--r--cmake/InstallAndPackage.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake
index be00cfc15..b54c8131a 100644
--- a/cmake/InstallAndPackage.cmake
+++ b/cmake/InstallAndPackage.cmake
@@ -70,10 +70,15 @@ endif()
# Windows is a bit more annoying to detect; using the size of void pointer
# seems to be the most robust.
if(WIN32)
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(ARCHITECTURE "win64")
+ # Check if the MSVC platform has been defined
+ if ("$ENV{Platform}" STREQUAL "arm64")
+ set(ARCHITECTURE "arm64")
else()
- set(ARCHITECTURE "win32")
+ if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(ARCHITECTURE "win64")
+ else()
+ set(ARCHITECTURE "win32")
+ endif()
endif()
endif()
if(APPLE AND CMAKE_OSX_ARCHITECTURES)