mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
15 lines
459 B
Rust
15 lines
459 B
Rust
fn main() {
|
|
// Link to the native openconnect library
|
|
println!("cargo:rustc-link-lib=openconnect");
|
|
println!("cargo:rustc-link-search=/opt/homebrew/lib"); // Homebrew path
|
|
println!("cargo:rerun-if-changed=src/ffi/vpn.c");
|
|
println!("cargo:rerun-if-changed=src/ffi/vpn.h");
|
|
|
|
// Compile the vpn.c file
|
|
cc::Build::new()
|
|
.file("src/ffi/vpn.c")
|
|
.include("src/ffi")
|
|
.include("/opt/homebrew/include") // Homebrew path
|
|
.compile("vpn");
|
|
}
|