mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-02 08:53:32 +00:00
move rustc-link-search to build script
This commit is contained in:
parent
b21d928479
commit
9e2e1f457a
|
@ -6,46 +6,18 @@ PROTOC = "{{{protoc}}}"
|
|||
FFMPEG_DIR = "{{{nativeDeps}}}"
|
||||
{{/isLinux}}
|
||||
|
||||
{{#isMacOS}}
|
||||
[target.x86_64-apple-darwin]
|
||||
rustflags = ["-L", "{{{nativeDeps}}}/lib"]
|
||||
|
||||
[target.x86_64-apple-darwin.heif]
|
||||
rustc-link-search = ["{{{nativeDeps}}}/lib"]
|
||||
rustc-link-lib = ["heif"]
|
||||
|
||||
[target.aarch64-apple-darwin]
|
||||
rustflags = ["-L", "{{{nativeDeps}}}/lib"]
|
||||
|
||||
[target.aarch64-apple-darwin.heif]
|
||||
rustc-link-search = ["{{{nativeDeps}}}/lib"]
|
||||
rustc-link-lib = ["heif"]
|
||||
{{/isMacOS}}
|
||||
|
||||
{{#isWin}}
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
rustflags = ["-L", "{{{nativeDeps}}}\\lib"]
|
||||
|
||||
[target.x86_64-pc-windows-msvc.heif]
|
||||
rustc-link-search = ["{{{nativeDeps}}}\\lib"]
|
||||
rustc-link-lib = ["heif"]
|
||||
{{/isWin}}
|
||||
|
||||
{{#isLinux}}
|
||||
[target.x86_64-unknown-linux-gnu]
|
||||
rustflags = ["-L", "{{{nativeDeps}}}/lib", "-C", "link-arg=-Wl,-rpath=${ORIGIN}/../lib/spacedrive"]
|
||||
|
||||
[target.x86_64-unknown-linux-gnu.heif]
|
||||
rustc-link-search = ["{{{nativeDeps}}}/lib"]
|
||||
rustc-link-lib = ["heif"]
|
||||
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
rustflags = ["-L", "{{{nativeDeps}}}/lib", "-C", "link-arg=-Wl,-rpath=${ORIGIN}/../lib/spacedrive"]
|
||||
|
||||
[target.aarch64-unknown-linux-gnu.heif]
|
||||
rustc-link-search = ["{{{nativeDeps}}}/lib"]
|
||||
rustc-link-lib = ["heif"]
|
||||
{{/isLinux}}
|
||||
|
||||
[alias]
|
||||
prisma = "run -p prisma-cli --bin prisma --"
|
||||
|
|
|
@ -8,4 +8,15 @@ fn main() {
|
|||
let git_hash = String::from_utf8(output.stdout)
|
||||
.expect("Error passing output of `git rev-parse --short HEAD`");
|
||||
println!("cargo:rustc-env=GIT_HASH={git_hash}");
|
||||
|
||||
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
|
||||
println!(
|
||||
"cargo:rustc-link-search={}",
|
||||
std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("../apps/.deps/lib")
|
||||
.display()
|
||||
);
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath=${ORIGIN}/../lib/spacedrive");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue