mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
feat: support macos
This commit is contained in:
parent
25f1182556
commit
d199d9e331
14
.vscode/c_cpp_properties.json
vendored
Normal file
14
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": ["/opt/homebrew/include"],
|
||||
"macFrameworkPath": ["/System/Library/Frameworks", "/Library/Frameworks"],
|
||||
"intelliSenseMode": "macos-clang-x64",
|
||||
"compilerPath": "/usr/bin/clang",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
6
.vscode/settings.json
vendored
6
.vscode/settings.json
vendored
@ -60,4 +60,10 @@
|
||||
"yuezk"
|
||||
],
|
||||
"rust-analyzer.cargo.features": "all",
|
||||
"files.associations": {
|
||||
"unistd.h": "c",
|
||||
"utsname.h": "c",
|
||||
"vpn.h": "c",
|
||||
"openconnect.h": "c"
|
||||
},
|
||||
}
|
||||
|
@ -1,9 +1,14 @@
|
||||
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").compile("vpn");
|
||||
cc::Build::new()
|
||||
.file("src/ffi/vpn.c")
|
||||
.include("src/ffi")
|
||||
.include("/opt/homebrew/include") // Homebrew path
|
||||
.compile("vpn");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user