diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-05-19 09:41:03 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-05-22 13:53:20 -0500 |
commit | 896b003cc8ac1827ae4f4678ca1bcaa2ce42f24e (patch) | |
tree | 81f43222f70b7fe9ef9391528805a47838873d03 /SConstruct | |
parent | 8e2141eac534f6984bb0bdbcefbd17de27ae0993 (diff) | |
download | redot-engine-896b003cc8ac1827ae4f4678ca1bcaa2ce42f24e.tar.gz |
SCons: Convert platform `get_flags` to dictionary
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/SConstruct b/SConstruct index 7e51ef4fc4..6fa3e00325 100644 --- a/SConstruct +++ b/SConstruct @@ -122,6 +122,8 @@ for x in sorted(glob.glob("platform/*")): platform_list += [x] platform_opts[x] = detect.get_opts() platform_flags[x] = detect.get_flags() + if isinstance(platform_flags[x], list): # backwards compatibility + platform_flags[x] = {flag[0]: flag[1] for flag in platform_flags[x]} sys.path.remove(tmppath) sys.modules.pop("detect") @@ -569,9 +571,9 @@ if env["build_profile"] != "": # Platform specific flags. # These can sometimes override default options. flag_list = platform_flags[env["platform"]] -for f in flag_list: - if f[0] not in ARGUMENTS or ARGUMENTS[f[0]] == "auto": # Allow command line to override platform flags - env[f[0]] = f[1] +for key, value in flag_list.items(): + if key not in ARGUMENTS or ARGUMENTS[key] == "auto": # Allow command line to override platform flags + env[key] = value # 'dev_mode' and 'production' are aliases to set default options if they haven't been # set manually by the user. |