diff --git a/SConstruct b/SConstruct index 4c1159c..2047cdf 100644 --- a/SConstruct +++ b/SConstruct @@ -20,6 +20,10 @@ opts.Add(PathVariable("macos_openssl_static_ssl", "Path to OpenSSL libssl.a libr os.path.join(os.path.abspath(os.getcwd()), "thirdparty/openssl/libssl.a"), PathVariable.PathAccept)) opts.Add(PathVariable("macos_openssl_static_crypto", "Path to OpenSSL libcrypto.a library - only used in macOS builds.", os.path.join(os.path.abspath(os.getcwd()), "thirdparty/openssl/libcrypto.a"), PathVariable.PathAccept)) +opts.Add(PathVariable("linux_openssl_static_ssl", "Path to OpenSSL libssl.a library - only used in Linux builds.", + "/usr/lib/x86_64-linux-gnu/libssl.a", PathVariable.PathAccept)) +opts.Add(PathVariable("linux_openssl_static_crypto", "Path to OpenSSL libcrypto.a library - only used in Linux builds.", + "/usr/lib/x86_64-linux-gnu/libcrypto.a", PathVariable.PathAccept)) # Updates the environment with the option variables. opts.Update(env) diff --git a/godot-git-plugin/SCsub b/godot-git-plugin/SCsub index c96760e..017c413 100644 --- a/godot-git-plugin/SCsub +++ b/godot-git-plugin/SCsub @@ -24,18 +24,19 @@ if env["platform"] == "macos": env["target_path"] += "macos/" # Force static linkage (https://stackoverflow.com/a/2995999/7370948) - static_ssl = File(env["macos_openssl_static_ssl"]) - static_crypto = File(env["macos_openssl_static_crypto"]) - env.Append(LIBS=[static_ssl, static_crypto]) + env.Append(LIBS=[File(env["macos_openssl_static_ssl"]), + File(env["macos_openssl_static_crypto"])]) elif env["platform"] == "linux": env["target_path"] += "linux/" - env.Append(LIBS=["ssl", "crypto"]) + env.Append(LIBS=[File(env["linux_openssl_static_ssl"]), + File(env["linux_openssl_static_crypto"])]) elif env["platform"] == "windows": env["target_path"] += "win64/" - env.Append(LIBS=["advapi32", "winhttp", "rpcrt4", "crypt32", "ole32", "user32", "wsock32", "ws2_32", "bcrypt"]) + env.Append(LIBS=["advapi32", "winhttp", "rpcrt4", "crypt32", + "ole32", "user32", "wsock32", "ws2_32", "bcrypt"]) env.Append(CPPPATH=[".", "src/"]) @@ -44,7 +45,8 @@ env.Append(LIBPATH=["../thirdparty/bin/"]) env.Prepend(LIBS=["git2", "ssh2"]) library = env.SharedLibrary( - target=env["target_path"] + "{}{}{}".format(env["target_name"], env["suffix"], env["SHLIBSUFFIX"]), + target=env["target_path"] + + "{}{}{}".format(env["target_name"], env["suffix"], env["SHLIBSUFFIX"]), source=Glob("src/*.cpp") ) Default(library)