You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Utilize native Variable alias functionality
This commit is contained in:
11
SConstruct
11
SConstruct
@@ -168,8 +168,7 @@ if profile:
|
|||||||
opts = Variables(customs, ARGUMENTS)
|
opts = Variables(customs, ARGUMENTS)
|
||||||
|
|
||||||
# Target build options
|
# Target build options
|
||||||
opts.Add("platform", "Target platform (%s)" % ("|".join(platform_list),), "")
|
opts.Add(["platform", "p"], "Target platform (%s)" % "|".join(platform_list), "")
|
||||||
opts.Add("p", "Platform (alias for 'platform')", "")
|
|
||||||
opts.Add(EnumVariable("target", "Compilation target", "editor", ("editor", "template_release", "template_debug")))
|
opts.Add(EnumVariable("target", "Compilation target", "editor", ("editor", "template_release", "template_debug")))
|
||||||
opts.Add(EnumVariable("arch", "CPU architecture", "auto", ["auto"] + architectures, architecture_aliases))
|
opts.Add(EnumVariable("arch", "CPU architecture", "auto", ["auto"] + architectures, architecture_aliases))
|
||||||
opts.Add(BoolVariable("dev_build", "Developer build with dev-only debugging code (DEV_ENABLED)", False))
|
opts.Add(BoolVariable("dev_build", "Developer build with dev-only debugging code (DEV_ENABLED)", False))
|
||||||
@@ -285,13 +284,9 @@ if env["import_env_vars"]:
|
|||||||
|
|
||||||
# Platform selection: validate input, and add options.
|
# Platform selection: validate input, and add options.
|
||||||
|
|
||||||
selected_platform = ""
|
|
||||||
|
|
||||||
if env["platform"] != "":
|
|
||||||
selected_platform = env["platform"]
|
selected_platform = env["platform"]
|
||||||
elif env["p"] != "":
|
|
||||||
selected_platform = env["p"]
|
if selected_platform == "":
|
||||||
else:
|
|
||||||
# Missing `platform` argument, try to detect platform automatically
|
# Missing `platform` argument, try to detect platform automatically
|
||||||
if (
|
if (
|
||||||
sys.platform.startswith("linux")
|
sys.platform.startswith("linux")
|
||||||
|
|||||||
Reference in New Issue
Block a user