summaryrefslogtreecommitdiffstats
path: root/methods.py
diff options
context:
space:
mode:
Diffstat (limited to 'methods.py')
-rw-r--r--methods.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/methods.py b/methods.py
index c22b1f11e4..69d8df1d72 100644
--- a/methods.py
+++ b/methods.py
@@ -1367,7 +1367,7 @@ def generate_vs_project(env, original_args, project_name="godot"):
vsconf = f'{target}|{a["platform"]}'
break
- condition = "'$(Configuration)|$(Platform)'=='" + vsconf + "'"
+ condition = "'$(GodotConfiguration)|$(GodotPlatform)'=='" + vsconf + "'"
properties.append("<ActiveProjectItemList>;" + ";".join(activeItems) + ";</ActiveProjectItemList>")
output = f'bin\\godot{env["PROGSUFFIX"]}'
@@ -1482,6 +1482,13 @@ def generate_vs_project(env, original_args, project_name="godot"):
"</ProjectConfiguration>",
]
+ properties += [
+ f"<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='{godot_target}|{proj_plat}'\">",
+ f" <GodotConfiguration>{godot_target}</GodotConfiguration>",
+ f" <GodotPlatform>{proj_plat}</GodotPlatform>",
+ "</PropertyGroup>",
+ ]
+
if godot_platform != "windows":
configurations += [
f'<ProjectConfiguration Include="editor|{proj_plat}">',
@@ -1490,6 +1497,13 @@ def generate_vs_project(env, original_args, project_name="godot"):
"</ProjectConfiguration>",
]
+ properties += [
+ f"<PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='editor|{proj_plat}'\">",
+ f" <GodotConfiguration>editor</GodotConfiguration>",
+ f" <GodotPlatform>{proj_plat}</GodotPlatform>",
+ "</PropertyGroup>",
+ ]
+
p = f"{project_name}.{godot_platform}.{godot_target}.{godot_arch}.generated.props"
imports += [
f'<Import Project="$(MSBuildProjectDirectory)\\{p}" Condition="Exists(\'$(MSBuildProjectDirectory)\\{p}\')"/>'
@@ -1502,6 +1516,10 @@ def generate_vs_project(env, original_args, project_name="godot"):
f"{{{proj_uuid}}}.{godot_target}|{sln_plat}.Build.0 = {godot_target}|{proj_plat}",
]
+ # Add an extra import for a local user props file at the end, so users can add more overrides.
+ imports += [
+ f'<Import Project="$(MSBuildProjectDirectory)\\{project_name}.vs.user.props" Condition="Exists(\'$(MSBuildProjectDirectory)\\{project_name}.vs.user.props\')"/>'
+ ]
section1 = sorted(section1)
section2 = sorted(section2)