mirror of https://github.com/hannobraun/Fornjot
Use absolute path to link lib3mf
Turns out `$ORIGIN` is Linux-specific (I think?), so it won't work on other platforms.
This commit is contained in:
parent
40106cce13
commit
070f199d3b
|
@ -11,13 +11,7 @@ fn main() -> anyhow::Result<()> {
|
||||||
println!("cargo:rustc-link-lib=dylib=3mf");
|
println!("cargo:rustc-link-lib=dylib=3mf");
|
||||||
|
|
||||||
// And this is necessary, so the linked library is found at runtime.
|
// And this is necessary, so the linked library is found at runtime.
|
||||||
//
|
println!("cargo:rustc-link-arg=-Wl,-rpath,{libs_dir}");
|
||||||
// The relative path used here is designed to work when the validator is
|
|
||||||
// executed within the repository using `cargo run`, which is the intended
|
|
||||||
// use case.
|
|
||||||
let executable_to_libs =
|
|
||||||
format!("../../tools/export-validator/{libs_dir_relative}");
|
|
||||||
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/{executable_to_libs}");
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue