summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authorAndreia Gaita <shana@spoiledcat.net>2024-02-12 16:39:58 +0100
committerAndreia Gaita <shana@spoiledcat.net>2024-02-12 17:09:52 +0100
commit1d29fb08536758918e5d7c38ee1d5f3ecd7a40c7 (patch)
treee74ed19e73994cf94e7d048d8767b9758de531d4 /misc
parent7638a6c9811590a384e2126dd004e302f76d3e4a (diff)
downloadredot-engine-1d29fb08536758918e5d7c38ee1d5f3ecd7a40c7.tar.gz
VS: Fix user workflows with custom user VS configurations
Users can add additional VS project configurations with their own custom settings, but to support this workflow, we can't rely directly on $(Platform) and $(Configuration), because VS needs those to be both unique Configuration|Platform combos, and we need to allow for different combos of Configuration|Platform to point to the same scons build configuration. GodotPlatform and GodotConfiguration properties lets us decouple from the magic VS properties that we don't control, so users can add however many Platform|Configuration combos they want and still point to a specific GodotPlatform|GodotConfiguration build config.
Diffstat (limited to 'misc')
-rw-r--r--misc/msvs/props.template2
-rw-r--r--misc/msvs/vcxproj.template10
2 files changed, 5 insertions, 7 deletions
diff --git a/misc/msvs/props.template b/misc/msvs/props.template
index 9ecd49a25e..8facaf7f36 100644
--- a/misc/msvs/props.template
+++ b/misc/msvs/props.template
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="17.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='%%VSCONF%%'">
+ <PropertyGroup Condition="'$(GodotConfiguration)|$(GodotPlatform)'=='%%VSCONF%%'">
<NMakeBuildCommandLine>%%BUILD%%</NMakeBuildCommandLine>
<NMakeReBuildCommandLine>%%REBUILD%%</NMakeReBuildCommandLine>
<NMakeCleanCommandLine>%%CLEAN%%</NMakeCleanCommandLine>
diff --git a/misc/msvs/vcxproj.template b/misc/msvs/vcxproj.template
index a1cf22bfb9..30f29a55f8 100644
--- a/misc/msvs/vcxproj.template
+++ b/misc/msvs/vcxproj.template
@@ -9,23 +9,21 @@
<Keyword>MakeFileProj</Keyword>
<VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
</PropertyGroup>
- <PropertyGroup>
- %%PROPERTIES%%
- </PropertyGroup>
+ %%PROPERTIES%%
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>Makefile</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<PlatformToolset>v143</PlatformToolset>
- <OutDir>$(SolutionDir)\bin\$(Platform)\$(Configuration)\</OutDir>
- <IntDir>obj\$(Platform)\$(Configuration)\</IntDir>
+ <OutDir>$(SolutionDir)\bin\$(GodotPlatform)\$(GodotConfiguration)\</OutDir>
+ <IntDir>obj\$(GodotPlatform)\$(GodotConfiguration)\</IntDir>
<LayoutDir>$(OutDir)\Layout</LayoutDir>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(GodotPlatform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(GodotPlatform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>