mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-29 01:16:13 -05:00
build: use OpenSSL for OpenConnect on macOS
This commit is contained in:
1 file changed
+10
-1
@@ -117,7 +117,10 @@ fn build_openconnect(deps_dir: &PathBuf, out_dir: &PathBuf) -> PathBuf {
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
config.disable_static().enable_shared();
|
||||
config
|
||||
.disable_static()
|
||||
.enable_shared()
|
||||
.without("gnutls", None);
|
||||
config.ldflag("-liconv");
|
||||
config.env("LIBS", "-liconv");
|
||||
}
|
||||
@@ -168,6 +171,11 @@ fn main() {
|
||||
|
||||
// Using pkg-config to find system deps
|
||||
pkg_config::probe_library("zlib").unwrap();
|
||||
#[cfg(target_os = "macos")]
|
||||
pkg_config::probe_library("openssl").unwrap();
|
||||
|
||||
#[cfg(not(target_os = "macos"))]
|
||||
{
|
||||
pkg_config::probe_library("liblz4").unwrap();
|
||||
pkg_config::probe_library("gnutls").unwrap();
|
||||
|
||||
@@ -176,6 +184,7 @@ fn main() {
|
||||
pkg_config::probe_library("hogweed").unwrap();
|
||||
pkg_config::probe_library("nettle").unwrap();
|
||||
pkg_config::probe_library("gmp").unwrap();
|
||||
}
|
||||
|
||||
// Compile the vpn.c file
|
||||
println!("cargo:rerun-if-changed=src/ffi/vpn.c");
|
||||
|
||||
Reference in new issue
Block a user