We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23d643b commit a59efd8Copy full SHA for a59efd8
wezterm-gui/build.rs
@@ -168,8 +168,14 @@ END
168
.join("WezTerm.app")
169
.join("Contents")
170
.join("Info.plist");
171
- let build_target_dir = std::env::var("CARGO_TARGET_DIR")
172
- .and_then(|s| Ok(std::path::PathBuf::from(s)))
+ let build_target_dir = std::env::var("OUT_DIR")
+ .map(|s| {
173
+ let mut path = std::path::PathBuf::from(s);
174
+ // OUT_DIR form is:
175
+ // $CARGO_TARGET_DIR/target/{profile}/build/wezterm-gui-<unique_build_path>/out
176
+ for _ in 0..3 { path.pop(); } // drop /build/wezterm-gui-<unique_build_path>/out
177
+ path
178
+ })
179
.unwrap_or(repo_dir.join("target").join(profile));
180
let dest_plist = build_target_dir.join("Info.plist");
181
println!("cargo:rerun-if-changed=assets/macos/WezTerm.app/Contents/Info.plist");
0 commit comments