Skip to content

Commit f4cb76d

Browse files
tronicalogoffart
authored andcommitted
Improve rpath selection
Make the choice of whether to use rpath or not depend on the target os family, not the host target. This should fix the cross-compilation scenario.
1 parent a74c85d commit f4cb76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qttypes/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ fn main() {
150150
""
151151
};
152152

153-
if cfg!(any(target_os = "macos", target_os = "linux")) {
153+
if std::env::var("CARGO_CFG_TARGET_FAMILY").as_ref().map(|s| s.as_ref()) == Ok("unix") {
154154
println!("cargo:rustc-cdylib-link-arg=-Wl,-rpath,{}", qt_library_path.trim());
155155
}
156156

0 commit comments

Comments
 (0)