Skip to content

Commit

Permalink
utils.pwsh: Add arm64 to target detection
Browse files Browse the repository at this point in the history
  • Loading branch information
PatTheMav committed Jan 11, 2024
1 parent 51d8d3f commit 772c2e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Build-Dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ param(
[ValidateSet('dependencies', 'ffmpeg', 'qt')]
[string] $PackageName = 'dependencies',
[string[]] $Dependencies,
[ValidateSet('x86', 'x64')]
[ValidateSet('arm64', 'x64', 'x86')]
[string] $Target,
[switch] $Clean,
[switch] $Quiet,
Expand Down
17 changes: 5 additions & 12 deletions utils.pwsh/Setup-Target.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ function Setup-Target {
. $PSScriptRoot/Logger.ps1
}

$Target64Bit = ( $script:Target -eq 'x64' )
$TargetArm64 = ( $script:Target -eq 'arm64' )

$script:ConfigData = @{
Arch = ('x86', 'x64')[$Target64Bit]
UnixArch = ('x86', 'x86_64')[$Target64Bit]
CmakeArch = ('Win32', 'x64')[$Target64Bit]
Bitness = ('32', '64')[$Target64Bit]
Arch = ('x64', 'arm64')[$TargetArm64]
UnixArch = ('x86_64', 'aarch64')[$TargetArm64]
CmakeArch = ('x64', 'ARM64')[$TargetArm64]
Bitness = '64'
OutputPath = "${script:ProjectRoot}\windows\obs-${script:PackageName}-${script:Target}"
}

Expand All @@ -29,13 +29,6 @@ function Setup-BuildParameters {
. $PSScriptRoot/Logger.ps1
}

$NumProcessors = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors

if ( $NumProcessors -gt 1 ) {
$env:UseMultiToolTask = $true
$env:EnforceProcessCountAcrossBuilds = $true
}

$VisualStudioData = Find-VisualStudio

$VisualStudioId = "Visual Studio {0} {1}" -f @(
Expand Down

0 comments on commit 772c2e0

Please sign in to comment.