Skip to content

Commit

Permalink
deps.qt: Add arm64 slice to Qt6 build script
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav committed Aug 5, 2024
1 parent 379cab9 commit 2d03e24
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions deps.qt/qt6.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ param(
[string] $Version = '6.6.3',
[string] $Uri = 'https://download.qt.io/official_releases/qt/6.6/6.6.3',
[string] $Hash = "${PSScriptRoot}/checksums",
[array] $Targets = @('x64', 'x86')
[array] $Targets = @('x64', 'x86', 'arm64')
)

$QtComponents = @(
Expand Down Expand Up @@ -52,10 +52,10 @@ function Clean {
$BuildDirectories = Get-ChildItem -Recurse -Directory -Include "build_${Target}" -Depth 1

$BuildDirectories | ForEach-Object {
$Directory = $_
Log-Information "Clean build directory $($Directory.FullName) (${Target})"
$CleanDirectory = $_
Log-Information "Clean build directory $($CleanDirectory.FullName) (${Target})"

Remove-Item -Path $Directory -Force -Recurse
Remove-Item -Path $CleanDirectory -Force -Recurse
}
}
}
Expand Down Expand Up @@ -122,9 +122,19 @@ function Configure {
'-DCMAKE_IGNORE_PREFIX_PATH:PATH=C:/Strawberry/c'
)

if ( $env:QtHostPath -ne $null ) {
$Options += @(
"-DQT_HOST_PATH:PATH=${env:QtHostPath}"
'-DQT_FORCE_BUILD_TOOLS:BOOL=ON'
'-DCMAKE_CROSSCOMPILING:BOOL=ON'
'-DCMAKE_SYSTEM_NAME:STRING=Windows'
)
}

$CMakeTarget = @{
x64 = 'x64'
x86 = 'Win32'
arm64 = 'arm64'
}

$Options = ($Options -join ' ') -replace '-G Visual Studio \d+ \d+','-G Ninja' -replace "-A $($CMakeTarget[$Target])",''
Expand Down Expand Up @@ -206,9 +216,19 @@ function Qt-Add-Submodules {
)
}

if ( $env:QtHostPath -ne $null ) {
$Options += @(
"-DQT_HOST_PATH:PATH=${env:QtHostPath}"
'-DQT_FORCE_BUILD_TOOLS:BOOL=ON'
'-DCMAKE_CROSSCOMPILING:BOOL=ON'
'-DCMAKE_SYSTEM_NAME:STRING=Windows'
)
}

$CMakeTarget = @{
x64 = 'x64'
x86 = 'Win32'
arm64 = 'arm64'
}

$QtComponents | Where-Object { $_ -ne 'qtbase' } | ForEach-Object {
Expand Down

0 comments on commit 2d03e24

Please sign in to comment.