mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
macOS: make openconnect relocatable; drive installation through make install (#668)
Co-authored-by: Kevin Yue <[email protected]>
This commit is contained in:
1 parent
f7649898fd
commit
f9965f8a35
12 files changed
+427
-162
No files matched your search
@@ -4,6 +4,15 @@ const UNKNOWN_COMMIT: &str = "unknown";
|
||||
const DISPLAY_COMMIT_LEN: usize = 9;
|
||||
|
||||
fn main() {
|
||||
// Installed OpenConnect lives in the private ../lib/gpclient directory.
|
||||
// Build executables also locate their exact Cargo library; installers remove that rpath.
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/../lib/gpclient");
|
||||
let library_dir = env::var("DEP_OPENCONNECT_LIB_DIR").expect("OpenConnect exports its build library directory");
|
||||
println!("cargo:rustc-link-arg=-Wl,-rpath,{library_dir}");
|
||||
}
|
||||
|
||||
println!("cargo:rerun-if-env-changed=SOURCE_GIT_COMMIT");
|
||||
println!("cargo:rerun-if-env-changed=GPCLIENT_GIT_COMMIT");
|
||||
println!("cargo:rerun-if-env-changed=GITHUB_SHA");
|
||||
|
||||
Reference in new issue
Block a user