Skip to content

Commit

Permalink
Explicitly specify target directory to fix a bug for crates in worksp…
Browse files Browse the repository at this point in the history
…aces

Close #24
  • Loading branch information
antoniusnaumann committed Aug 13, 2023
1 parent fb312b5 commit 0e16dd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ impl Target {

self.architectures()
.into_iter()
.map(|arch| command(format!("cargo build --target {arch} {flag}")))
// TODO: Setting `--target-dir` is a quick fix to make cargo swift package work for crates that
// are contained in a workspace as described in issue #24, remove this once #7 is implemented
.map(|arch| {
command(format!(
"cargo build --target {arch} {flag} --target-dir ./target"
))
})
.collect()
}

Expand Down

0 comments on commit 0e16dd3

Please sign in to comment.