Skip to content

Commit 88b859f

Browse files
committed
Make support new or old layout x64 cases
1 parent 24d0686 commit 88b859f

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

DirectXTK_GDKX_2022.vcxproj

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,22 @@
5252
<Import Condition="Exists($(ATGBuildProps))" Project="$(ATGBuildProps)" />
5353
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
5454
<PropertyGroup>
55+
<GDKPCEditionPath Condition="'$(GDKPCEditionPath)'==''">$(GRDKLatest)</GDKPCEditionPath>
5556
<GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKCoreLatest)</GDKCrossPlatformPath>
5657
<GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKXboxLatest)</GDKCrossPlatformPath>
5758
</PropertyGroup>
59+
<PropertyGroup>
60+
<GDKCrossPlatform Condition="'$(GDKCrossPlatform)'=='' AND Exists('$(GDKCrossPlatformPath)windows')">true</GDKCrossPlatform>
61+
<GDKCrossPlatform Condition="'$(GDKCrossPlatform)'=='' AND Exists('$(GDKPCEditionPath)GameKit')">false</GDKCrossPlatform>
62+
</PropertyGroup>
63+
<PropertyGroup Condition="'$(GDKCrossPlatform)'!='true'">
64+
<WindowsIncludePath>$(GDKPCEditionPath)GameKit\Include</WindowsIncludePath>
65+
<WindowsLibraryPath>$(GDKPCEditionPath)GameKit\lib\amd64</WindowsLibraryPath>
66+
</PropertyGroup>
67+
<PropertyGroup Condition="'$(GDKCrossPlatform)'=='true'">
68+
<WindowsIncludePath>$(GDKCrossPlatformPath)windows\include</WindowsIncludePath>
69+
<WindowsLibraryPath>$(GDKCrossPlatformPath)windows\lib\x64</WindowsLibraryPath>
70+
</PropertyGroup>
5871
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Gaming.Xbox.XboxOne.x64'" Label="Configuration">
5972
<ConfigurationType>StaticLibrary</ConfigurationType>
6073
<PlatformToolset>v143</PlatformToolset>
@@ -220,26 +233,26 @@
220233
</PropertyGroup>
221234
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
222235
<ExecutablePath>$(GameDK)bin;$(ExecutablePath)</ExecutablePath>
223-
<IncludePath>$(GDKCrossPlatformPath)windows\include;$(IncludePath);</IncludePath>
224-
<LibraryPath>$(GDKCrossPlatformPath)windows\lib\x64;$(LibraryPath)</LibraryPath>
236+
<IncludePath>$(WindowsIncludePath);$(IncludePath);</IncludePath>
237+
<LibraryPath>$(WindowsLibraryPath);$(LibraryPath)</LibraryPath>
225238
<LinkIncremental>false</LinkIncremental>
226239
<OutDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</OutDir>
227240
<IntDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</IntDir>
228241
<TargetName>DirectXTK12</TargetName>
229242
</PropertyGroup>
230243
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">
231244
<ExecutablePath>$(GameDK)bin;$(ExecutablePath)</ExecutablePath>
232-
<IncludePath>$(GDKCrossPlatformPath)windows\include;$(IncludePath);</IncludePath>
233-
<LibraryPath>$(GDKCrossPlatformPath)windows\lib\x64;$(LibraryPath)</LibraryPath>
245+
<IncludePath>$(WindowsIncludePath);$(IncludePath);</IncludePath>
246+
<LibraryPath>$(WindowsLibraryPath);$(LibraryPath)</LibraryPath>
234247
<LinkIncremental>false</LinkIncremental>
235248
<OutDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</OutDir>
236249
<IntDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</IntDir>
237250
<TargetName>DirectXTK12</TargetName>
238251
</PropertyGroup>
239252
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
240253
<ExecutablePath>$(GameDK)bin;$(ExecutablePath)</ExecutablePath>
241-
<IncludePath>$(GDKCrossPlatformPath)windows\include;$(IncludePath);</IncludePath>
242-
<LibraryPath>$(GDKCrossPlatformPath)windows\lib\x64;$(LibraryPath)</LibraryPath>
254+
<IncludePath>$(WindowsIncludePath);$(IncludePath);</IncludePath>
255+
<LibraryPath>$(WindowsLibraryPath);$(LibraryPath)</LibraryPath>
243256
<LinkIncremental>false</LinkIncremental>
244257
<OutDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</OutDir>
245258
<IntDir>Bin\GDKX_2022\$(Platform)\$(Configuration)\</IntDir>
@@ -687,10 +700,7 @@
687700
<Target Name="GDKEditionCheck" BeforeTargets="PrepareForBuild">
688701
<Error Condition="'$(GameDK)'==''" Text="GameDK property is required" />
689702
<Error Condition="!HasTrailingSlash('$(GameDK)')" Text="GameDK property must have trailing slash" />
690-
<Error Condition="'$(GDKCrossPlatformPath)'==''" Text="GDKCrossPlatformPath property, GameDKCoreLatest environment variable, or GameDKXboxLatest environment variable is required" />
691-
<Error Condition="!HasTrailingSlash('$(GDKCrossPlatformPath)')" Text="GDKCrossPlatformPath property must have trailing slash" />
692-
<Error Condition="!Exists('$(GDKCrossPlatformPath)windows')" Text="GDKCrossPlatformPath needs to point to the October 2025 GDK or later" />
693-
<Message Importance="high" Text="Using $(GDKCrossPlatformPath)" />
703+
<Error Condition="'$(GDKCrossPlatform)'==''" Text="GameDKCoreLatest, GameDKXboxLatest, or GRDKLatest is required" />
694704
</Target>
695705
<Target Name="EnsureGDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))">
696706
<PropertyGroup>

0 commit comments

Comments
 (0)