summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-07-31 13:58:05 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-07-31 13:58:09 +0200
commit89847dc6e34e1caf589a03fdcc3aecd193d9bd1f (patch)
tree39ba416db2ba7ee6ec55737e54296adb583ab4f7
parent475592a3bc2d2150dcbd9179fff653e3c55505a1 (diff)
SCons: Fix creating VS solution with SCons 4.4.0
Fixes #63709. Co-authored-by: 19PHOBOSS98 <37253663+19PHOBOSS98@users.noreply.github.com>
-rw-r--r--methods.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/methods.py b/methods.py
index 571b134c8a..b719395ae0 100644
--- a/methods.py
+++ b/methods.py
@@ -607,8 +607,18 @@ def find_visual_c_batch_file(env):
find_batch_file,
)
+ # Syntax changed in SCons 4.4.0.
+ from SCons import __version__ as scons_raw_version
+
+ scons_ver = env._get_major_minor_revision(scons_raw_version)
+
version = get_default_version(env)
- (host_platform, target_platform, _) = get_host_target(env)
+
+ if scons_ver >= (4, 4, 0):
+ (host_platform, target_platform, _) = get_host_target(env, version)
+ else:
+ (host_platform, target_platform, _) = get_host_target(env)
+
return find_batch_file(env, version, host_platform, target_platform)[0]