Files
godot-git-plugin/SConstruct
Fabio Alessandrelli 955ec02503 [SCons] Build OpenSSL from source by default
Remove prebuilt static libraries for macOS.

Can optionally still use external (static) libraries by supplying the
`openssl_external_*` parameters to scons.
2025-05-26 16:57:27 +02:00

46 lines
1.0 KiB
Python

#!/usr/bin/env python
import os
EnsureSConsVersion(3, 0, 0)
EnsurePythonVersion(3, 5)
opts = Variables([], ARGUMENTS)
env = Environment(ENV=os.environ)
# Define our options
opts.Add(PathVariable("target_path",
"The path where the lib is installed.", "demo/addons/godot-git-plugin/"))
opts.Add(PathVariable("target_name", "The library name.",
"libgit_plugin", PathVariable.PathAccept))
# Updates the environment with the option variables.
opts.Update(env)
if ARGUMENTS.get("custom_api_file", "") != "":
ARGUMENTS["custom_api_file"] = "../" + ARGUMENTS["custom_api_file"]
ARGUMENTS["target"] = "editor"
env = SConscript("godot-cpp/SConstruct").Clone()
# OpenSSL Builder
env.Tool("openssl", toolpath=["tools"])
opts.Update(env)
if env["platform"] != "windows": # Windows does not need OpenSSL
ssl = env.OpenSSL()
else:
ssl = []
Export("ssl")
Export("env")
SConscript("thirdparty/SCsub")
SConscript("godot-git-plugin/SCsub")
# Generates help for the -h scons option.
Help(opts.GenerateHelpText(env))