Skip to content

Commit

Permalink
Fix build on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Feb 20, 2024
1 parent 7326dd3 commit 96b5701
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ext/build_monocypher_native.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ function Build-Project {
$NETPlatform = "osx"
$NETSharedLibExtension = "dylib"
if ($NETArch -eq "arm64") {
$CMakeArch = "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_OSX_ARCHITECTURES='arm64'"
$CMakeArch = "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10", "-DCMAKE_OSX_ARCHITECTURES=arm64"
}
elseif ($NETArch -eq "x64") {
$CMakeArch = "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10 -DCMAKE_OSX_ARCHITECTURES='x86_64'"
$CMakeArch = "-DCMAKE_OSX_DEPLOYMENT_TARGET=10.10", "-DCMAKE_OSX_ARCHITECTURES=x86_64"
}
}
elseif ($IsWindows) {
Expand All @@ -68,6 +68,7 @@ function Build-Project {
$BuildPlatformFolder = "$BuildFolder/$NETPlatform-$NETArch"
$PackageFolder = "$BuildFolder/package/$NETPlatform-$NETArch/native/"

Write-Host "cmake -G\"$CMakeBuilder\" $CMakeArch -B\"$BuildPlatformFolder\""
& cmake -G"$CMakeBuilder" $CMakeArch -B"$BuildPlatformFolder"
if ($LastExitCode -ne 0) {
throw "error with cmake"
Expand Down

0 comments on commit 96b5701

Please sign in to comment.