Feature: [Actions] ARM64 builds for Windows

This commit is contained in:
Owen Rudge 2021-01-16 21:31:20 +00:00
parent 6d95ed53dc
commit a2bd0a14e1
2 changed files with 11 additions and 5 deletions

View File

@ -513,6 +513,7 @@ jobs:
include: include:
- arch: x86 - arch: x86
- arch: x64 - arch: x64
- arch: arm64
runs-on: windows-latest runs-on: windows-latest
@ -560,7 +561,7 @@ jobs:
uses: ammaraskar/msvc-problem-matcher@master uses: ammaraskar/msvc-problem-matcher@master
- name: Build (with installer) - 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 uses: lukka/run-cmake@v3
with: with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
@ -569,7 +570,7 @@ jobs:
cmakeAppendedArgs: ' -GNinja -DOPTION_USE_NSIS=ON -DHOST_BINARY_DIR=${{ github.workspace }}/build-host -DCMAKE_BUILD_TYPE=RelWithDebInfo' cmakeAppendedArgs: ' -GNinja -DOPTION_USE_NSIS=ON -DHOST_BINARY_DIR=${{ github.workspace }}/build-host -DCMAKE_BUILD_TYPE=RelWithDebInfo'
- name: Build (without installer) - 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 uses: lukka/run-cmake@v3
with: with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced cmakeListsOrSettingsJson: CMakeListsTxtAdvanced

View File

@ -70,10 +70,15 @@ endif()
# Windows is a bit more annoying to detect; using the size of void pointer # Windows is a bit more annoying to detect; using the size of void pointer
# seems to be the most robust. # seems to be the most robust.
if(WIN32) if(WIN32)
if(CMAKE_SIZEOF_VOID_P EQUAL 8) # Check if the MSVC platform has been defined
set(ARCHITECTURE "win64") if ("$ENV{Platform}" STREQUAL "arm64")
set(ARCHITECTURE "arm64")
else() else()
set(ARCHITECTURE "win32") if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCHITECTURE "win64")
else()
set(ARCHITECTURE "win32")
endif()
endif() endif()
endif() endif()
if(APPLE AND CMAKE_OSX_ARCHITECTURES) if(APPLE AND CMAKE_OSX_ARCHITECTURES)