diff options
author | Owen Rudge <owen@owenrudge.net> | 2021-01-16 21:31:20 +0000 |
---|---|---|
committer | Owen Rudge <owen@owenrudge.net> | 2021-01-18 08:57:58 +0000 |
commit | a2bd0a14e1033d9bd1e29416c8c68f96c73d179e (patch) | |
tree | 5d8be3a4bff0aaeb32509be6cc0b727a3aa0262c | |
parent | 6d95ed53dc81a2951585c5bf94a5dba77842c8f0 (diff) | |
download | openttd-a2bd0a14e1033d9bd1e29416c8c68f96c73d179e.tar.xz |
Feature: [Actions] ARM64 builds for Windows
-rw-r--r-- | .github/workflows/release.yml | 5 | ||||
-rw-r--r-- | cmake/InstallAndPackage.cmake | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac91e31fe..81d3cd5b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -513,6 +513,7 @@ jobs: include: - arch: x86 - arch: x64 + - arch: arm64 runs-on: windows-latest @@ -560,7 +561,7 @@ jobs: uses: ammaraskar/msvc-problem-matcher@master - name: Build (with installer) - if: needs.source.outputs.is_tag == 'true' && matrix.arch != 'arm64' + if: needs.source.outputs.is_tag == 'true' uses: lukka/run-cmake@v3 with: cmakeListsOrSettingsJson: CMakeListsTxtAdvanced @@ -569,7 +570,7 @@ jobs: cmakeAppendedArgs: ' -GNinja -DOPTION_USE_NSIS=ON -DHOST_BINARY_DIR=${{ github.workspace }}/build-host -DCMAKE_BUILD_TYPE=RelWithDebInfo' - name: Build (without installer) - if: needs.source.outputs.is_tag != 'true' || matrix.arch == 'arm64' + if: needs.source.outputs.is_tag != 'true' uses: lukka/run-cmake@v3 with: cmakeListsOrSettingsJson: CMakeListsTxtAdvanced 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) |