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