W32 VS projects: fixed: define 'WIN32' only on x32 platforms

This commit is contained in:
Evgeny Grin (Karlson2k)
2023-05-24 14:18:21 +03:00
parent 8b70295262
commit c9ee520e5a
+9 -2
View File
@@ -5,6 +5,8 @@
Only 0 and 1 are used currently -->
<TargetOSLevel Condition="$(PlatformToolset.EndsWith('_xp'))">0</TargetOSLevel>
<TargetOSLevel Condition="! $(PlatformToolset.EndsWith('_xp'))">1</TargetOSLevel>
<MhdNumBits Condition="$(Platform.EndsWith('64'))">64</MhdNumBits>
<MhdNumBits Condition="! $(Platform.EndsWith('64'))">32</MhdNumBits>
</PropertyGroup>
<PropertyGroup>
<IncludePath>$(SolutionDir);$(MhdW32Common);$(MhdSrc)include;$(IncludePath)</IncludePath>
@@ -23,8 +25,8 @@
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4996</DisableSpecificWarnings>
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4996;4820;4127;5045</DisableSpecificWarnings>
<TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
@@ -34,6 +36,11 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(MhdNumBits)' == '32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(TargetOSLevel)'&gt;'0'">
<ClCompile>
<PreprocessorDefinitions>_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>