Skip to content

Commit 4fa1b33

Browse files
committed
Add missing build.rs instruction
1 parent be35790 commit 4fa1b33

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,22 @@ cd insightface/cpp-package/inspireface && bash command/build.sh
2323
INSIGHTFACE_PATH = "<path to>/insightface/cpp-package/inspireface/build/inspireface-<arch>/InspireFace"
2424
```
2525

26+
Then you can link the library using the `build.rs` example below:
27+
28+
```rs
29+
fn main() {
30+
if let Ok(path) = std::env::var("INSIGHTFACE_PATH") {
31+
let lib_path = format!("{}/lib", path);
32+
println!("cargo:rustc-link-arg=-Wl,-rpath,{}", lib_path);
33+
}
34+
}
35+
```
36+
2637
Thereafter the library can be add as follows in your `Cargo.toml`:
2738

2839
```toml
2940
[dependencies]
30-
baklava = "0.1.0"
41+
baklava = "0.1.4"
3142
```
3243

3344
Below is a simple example of how to use the library:

0 commit comments

Comments
 (0)