Skip to content

Commit

Permalink
qt-build-utils: set the rpath to the framework path on macOS
Browse files Browse the repository at this point in the history
Otherwise the @rpath cannot be found at runtime
  • Loading branch information
ahayzen-kdab committed Oct 21, 2024
1 parent 4b76c57 commit aa65991
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/qt-build-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,11 @@ impl QtBuild {
// Ensure that any framework paths are set to -F
for framework_path in self.framework_paths() {
builder.flag_if_supported(format!("-F{}", framework_path.display()));
// Also set the -rpath otherwise frameworks can not be found at runtime
println!(
"cargo::rustc-link-arg=-Wl,-rpath,{}",
framework_path.display()
);
}
}

Expand Down

0 comments on commit aa65991

Please sign in to comment.