|
14 | 14 | <Configuration>Release</Configuration> |
15 | 15 | <Platform>Gaming.Desktop.x64</Platform> |
16 | 16 | </ProjectConfiguration> |
| 17 | + |
| 18 | + <!-- Plain x64 configurations enable migration toward standard platform naming while retaining GDK libraries --> |
| 19 | + <ProjectConfiguration Include="Debug|x64"> |
| 20 | + <Configuration>Debug</Configuration> |
| 21 | + <Platform>x64</Platform> |
| 22 | + </ProjectConfiguration> |
| 23 | + <ProjectConfiguration Include="Release|x64"> |
| 24 | + <Configuration>Release</Configuration> |
| 25 | + <Platform>x64</Platform> |
| 26 | + </ProjectConfiguration> |
17 | 27 | </ItemGroup> |
18 | 28 |
|
19 | 29 | <PropertyGroup Label="Globals"> |
|
51 | 61 | <!-- Include the main MS props --> |
52 | 62 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
53 | 63 |
|
| 64 | + <!-- Unify path vars so it can build against public GDK or GDKX --> |
54 | 65 | <PropertyGroup> |
| 66 | + <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKCoreLatest)</GDKCrossPlatformPath> |
| 67 | + <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKXboxLatest)</GDKCrossPlatformPath> |
| 68 | + <GDKCrossPlatformPath Condition="'$(GDKCrossPlatformPath)'==''">$(GameDKLatest)</GDKCrossPlatformPath> |
| 69 | + </PropertyGroup> |
| 70 | + |
| 71 | + <!-- GDK path validation --> |
| 72 | + <Target Name="GDKEditionCheck" BeforeTargets="PrepareForBuild" Condition="'$(Platform)'=='x64'"> |
| 73 | + <Error Condition="'$(GDKCrossPlatformPath)'==''" Text="GameDKCoreLatest or GameDKXboxLatest or GameDKLatest environment variable is required" /> |
| 74 | + <Error Condition="!HasTrailingSlash('$(GDKCrossPlatformPath)')" Text="GDKCrossPlatformPath property must have trailing slash" /> |
| 75 | + <Error Condition="!Exists('$(GDKCrossPlatformPath)windows')" Text="GDKCrossPlatformPath needs to point to the October 2025 GDK or later" /> |
| 76 | + <Message Importance="high" Text="Using $(GDKCrossPlatformPath)" /> |
| 77 | + </Target> |
| 78 | + |
| 79 | + <!-- When using plain x64 platform name, set paths manually --> |
| 80 | + <PropertyGroup Condition="'$(Platform)'=='x64'"> |
| 81 | + <GDKLibPath Condition="'$(GDKLibPath)'==''">$(GDKCrossPlatformPath)windows\lib\x64</GDKLibPath> |
| 82 | + <GDKIncludeRoot Condition="'$(GDKIncludeRoot)'==''">$(GDKCrossPlatformPath)windows\include</GDKIncludeRoot> |
| 83 | + <LibraryPath>$(GDKLibPath);$(LibraryPath)</LibraryPath> |
| 84 | + <IncludePath>$(GDKIncludeRoot);$(IncludePath)</IncludePath> |
| 85 | + </PropertyGroup> |
| 86 | + |
| 87 | + <PropertyGroup Condition="'$(Platform)'!='x64'"> |
55 | 88 | <LibraryPath>$(Console_SdkLibPath);$(LibraryPath)</LibraryPath> |
56 | | - <IncludePath>$(Console_SdkIncludeRoot);$(IncludePath)</IncludePath> |
| 89 | + <IncludePath>$(Console_SdkIncludeRoot);$(IncludePath)</IncludePath> |
57 | 90 | </PropertyGroup> |
58 | 91 |
|
59 | 92 | <ItemDefinitionGroup> |
|
65 | 98 | <SupportJustMyCode>false</SupportJustMyCode> |
66 | 99 | <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> |
67 | 100 | <PreprocessorDefinitions>__WRL_NO_DEFAULT_LIB__;_LIB;$(libHttpClientDefine);%(PreprocessorDefinitions)</PreprocessorDefinitions> |
68 | | - <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(GameDKLatest)GRDK\ExtensionLibraries\Xbox.XCurl.API\Include</AdditionalIncludeDirectories> |
69 | | - <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> |
| 101 | + <AdditionalIncludeDirectories Condition="'$(Platform)'!='x64'">%(AdditionalIncludeDirectories);$(GDKCrossPlatformPath)GRDK\ExtensionLibraries\Xbox.XCurl.API\Include</AdditionalIncludeDirectories> |
| 102 | + <ControlFlowGuard>Guard</ControlFlowGuard> |
| 103 | + <AdditionalOptions>/Zc:__cplusplus /ZH:SHA_256 /bigobj /Zi %(AdditionalOptions)</AdditionalOptions> |
| 104 | + <PreprocessorDefinitions Condition="'$(Platform)'=='x64'">HC_PLATFORM=HC_PLATFORM_GDK;HC_DATAMODEL=HC_DATAMODEL_LLP64;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
70 | 105 | <LanguageStandard>stdcpp17</LanguageStandard> |
71 | 106 | </ClCompile> |
72 | 107 | <Link> |
|
75 | 110 | <GenerateWindowsMetadata>false</GenerateWindowsMetadata> |
76 | 111 | <FullProgramDatabaseFile Condition="'$(Configuration)'=='Debug'">true</FullProgramDatabaseFile> |
77 | 112 | <AdditionalDependencies>$(Console_Libs);%(AdditionalDependencies)</AdditionalDependencies> |
| 113 | + <AdditionalDependencies Condition="'$(Platform)'=='x64'">xgameruntime.lib;XCurl.lib;%(AdditionalDependencies)</AdditionalDependencies> |
78 | 114 | </Link> |
79 | 115 | <Lib> |
80 | 116 | <AdditionalOptions>/ignore:4099 /ignore:4264 %(AdditionalOptions)</AdditionalOptions> |
|
0 commit comments