Skip to content

Commit

Permalink
Write Swift build outputs into Cargo's OUT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Aug 3, 2023
1 parent 5236c7a commit 0a1af01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nuit-bridge-swiftui/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ fn profile() -> String {
env::var("PROFILE").unwrap()
}

fn out_dir() -> String {
env::var("OUT_DIR").unwrap()
}

fn manifest_dir() -> String {
env::var("CARGO_MANIFEST_DIR").unwrap()
}
Expand Down Expand Up @@ -59,7 +63,7 @@ fn build_nuit_bridge_swiftui() {
let profile = profile();

let build_succeeded = Command::new("swift")
.args(&["build", "-c", &profile])
.args(&["build", "--build-path", &out_dir(), "-c", &profile])
.status()
.unwrap()
.success();
Expand Down

0 comments on commit 0a1af01

Please sign in to comment.