Hard-code SDK root when building

PyOxidizer's detection seems to be failing on the machine I'm running
from.
This commit is contained in:
Damien Elmes 2024-02-28 15:19:17 +07:00
parent 7784321b90
commit 151dd0fb34
2 changed files with 2 additions and 0 deletions

View file

@ -47,6 +47,7 @@ pub fn build_artifacts(args: BuildArtifactsArgs) {
.env("PROFILE", "release") .env("PROFILE", "release")
.env("OUT_DIR", &artifacts) .env("OUT_DIR", &artifacts)
.env("TARGET", env!("TARGET")) .env("TARGET", env!("TARGET"))
.env("SDKROOT", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
.env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target()) .env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target())
.env("CARGO_BUILD_TARGET", env!("TARGET")), .env("CARGO_BUILD_TARGET", env!("TARGET")),
); );

View file

@ -38,6 +38,7 @@ pub fn build_bundle_binary() {
.unwrap(), .unwrap(),
) )
.env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target()) .env("MACOSX_DEPLOYMENT_TARGET", macos_deployment_target())
.env("SDKROOT", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk")
.env("CARGO_BUILD_TARGET", env!("TARGET")); .env("CARGO_BUILD_TARGET", env!("TARGET"));
if env!("TARGET") == "x86_64-apple-darwin" { if env!("TARGET") == "x86_64-apple-darwin" {
let xcode_path = Command::run_with_output(["xcode-select", "-p"]).unwrap(); let xcode_path = Command::run_with_output(["xcode-select", "-p"]).unwrap();