commit 5cbe9553b88d806cfc0a89c727937f0a49e07f30
parent 747802ec8f8d9d0329c9dd37168c1d2003812b6e
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Mon, 1 May 2023 15:29:37 +0300
W32 VS projects: fixed: define 'WIN32' only on x32 platforms
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/w32/common/common-build-settings.vcxproj b/w32/common/common-build-settings.vcxproj
@@ -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>
@@ -25,7 +27,7 @@
<WarningLevel Condition="'%(ClCompile.ExternalWarningLevel)' != ''">EnableAllWarnings</WarningLevel>
<WarningLevel Condition="'%(ClCompile.ExternalWarningLevel)' == ''">Level4</WarningLevel>
<ExternalWarningLevel>Level3</ExternalWarningLevel>
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DisableSpecificWarnings>4996;4820;4127;5045</DisableSpecificWarnings>
<TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
@@ -36,6 +38,11 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(MhdNumBits)' == '32'">
+ <ClCompile>
+ <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(TargetOSLevel)'>'0'">
<ClCompile>
<PreprocessorDefinitions>_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>