forked from godotengine/godot-git-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConstruct
45 lines (33 loc) · 1.93 KB
/
SConstruct
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/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))
opts.Add(PathVariable("macos_openssl", "Path to OpenSSL library root - only used in macOS builds.",
"/usr/local/opt/[email protected]/", PathVariable.PathAccept)) # TODO: Find a way to configure this to use the cloned OpenSSL source code, based on `macos_arch`.
opts.Add(PathVariable("macos_openssl_static_ssl", "Path to OpenSSL libssl.a library - only used in macOS builds.",
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)
if ARGUMENTS.get("custom_api_file", "") != "":
ARGUMENTS["custom_api_file"] = "../" + ARGUMENTS["custom_api_file"]
ARGUMENTS["target"] = "editor"
env = SConscript("godot-cpp/SConstruct").Clone()
opts.Update(env)
Export("env")
SConscript("thirdparty/SCsub")
SConscript("godot-git-plugin/SCsub")
# Generates help for the -h scons option.
Help(opts.GenerateHelpText(env))