From dabed739d09afd29f6524ca8228a97dbeae9d0c3 Mon Sep 17 00:00:00 2001 From: tibvdm Date: Sat, 15 Jun 2024 03:32:10 +0200 Subject: [PATCH] test --- libsais64-rs/builder.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libsais64-rs/builder.rs b/libsais64-rs/builder.rs index c99dc9f..156cff9 100644 --- a/libsais64-rs/builder.rs +++ b/libsais64-rs/builder.rs @@ -5,7 +5,7 @@ use std::{ Display, Formatter }, - path::PathBuf, + path::{Path, PathBuf}, process::{ Command, ExitStatus @@ -80,7 +80,8 @@ fn main() -> Result<(), Box> { exit_status_to_result("make", Command::new("make").args(["-C", "libsais"]).status()?)?; // link the c libsais library to rust - println!("cargo:rustc-link-search=native=libsais64-rs/libsais"); + let dir = env::var("CARGO_MANIFEST_DIR").unwrap(); + println!("cargo:rustc-link-search=native={}", Path::new(&dir).join("libsais").display()); println!("cargo:rustc-link-lib=static=libsais"); // The bindgen::Builder is the main entry point