31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
diff --git a/librclone-sys/build.rs b/librclone-sys/build.rs
|
|
index 10e45bc..7d04c08 100644
|
|
--- a/librclone-sys/build.rs
|
|
+++ b/librclone-sys/build.rs
|
|
@@ -16,15 +16,8 @@ fn main() {
|
|
println!("cargo:rerun-if-changed=go.mod");
|
|
println!("cargo:rerun-if-changed=go.sum");
|
|
|
|
- Command::new("go")
|
|
- .args(["build", "--buildmode=c-archive", "-o"])
|
|
- .arg(&format!("{}/librclone.a", out_dir))
|
|
- .arg("github.com/rclone/rclone/librclone")
|
|
- .status()
|
|
- .expect("`go build` failed. Is `go` installed and latest version?");
|
|
-
|
|
- println!("cargo:rustc-link-search=native={}", out_dir);
|
|
- println!("cargo:rustc-link-lib=static=rclone");
|
|
+ println!("cargo:rustc-link-search=native={}", "@librclone@/lib");
|
|
+ println!("cargo:rustc-link-lib=dylib=rclone");
|
|
|
|
if target_triple.ends_with("darwin") {
|
|
println!("cargo:rustc-link-lib=framework=CoreFoundation");
|
|
@@ -32,7 +25,7 @@ fn main() {
|
|
}
|
|
|
|
let bindings = bindgen::Builder::default()
|
|
- .header(format!("{}/librclone.h", out_dir))
|
|
+ .header(format!("{}/librclone.h", "@librclone@/include"))
|
|
.allowlist_function("RcloneRPC")
|
|
.allowlist_function("RcloneInitialize")
|
|
.allowlist_function("RcloneFinalize")
|