Build universal OpenSSL fat library

This commit is contained in:
Twarit Waikar
2021-10-13 17:41:45 +05:30
parent abeb17532b
commit 3e955b9022
5 changed files with 32 additions and 16 deletions

View File

@@ -128,8 +128,8 @@ if env_git["platform"] in ["linux", "osx"]:
if env_git["platform"] == "osx":
env_git.Prepend(CPPPATH=[env_git["macos_openssl"] + "include/"])
static_ssl = File(env_git["macos_openssl_static_ssl"])
static_crypto = File(env_git["macos_openssl_static_crypto"])
static_ssl = File("../../" + env_git["macos_openssl_static_ssl"])
static_crypto = File("../../" + env_git["macos_openssl_static_crypto"])
env_git.Append(LIBS=[static_ssl, static_crypto])
env_git.StaticLibrary(target="../bin/" + "git2", source=libgit2_sources)

12
thirdparty/ssh2/SCsub vendored
View File

@@ -106,16 +106,8 @@ if env_ssh2["platform"] in ["linux", "osx"]:
if env_ssh2["platform"] == "osx":
env_ssh2.Append(CPPPATH=[env_ssh2["macos_openssl"] + "include/"])
static_ssl = File(env_ssh2["macos_openssl_static_ssl"])
static_crypto = File(env_ssh2["macos_openssl_static_crypto"])
static_ssl = File("../../" + env_ssh2["macos_openssl_static_ssl"])
static_crypto = File("../../" + env_ssh2["macos_openssl_static_crypto"])
env_ssh2.Append(LIBS=[static_ssl, static_crypto])
# TODO: Verify if this works on actual M1 hardware
if env_ssh2["macos_arch"] == "arm64":
env_ssh2.Append(
CPPDEFINES=[
("WORDS_BIGENDIAN", "1"),
# ("AC_APPLE_UNIVERSAL_BUILD", "1")
])
env_ssh2.StaticLibrary(target="../bin/" + "ssh2", source=libssh2_sources)