common-build-settings.props 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  3. <PropertyGroup Label="UserMacros">
  4. <!-- Target minimum OS version: WinXP = 0; Vista = 1; Win7 = 2; Win8 = 3...
  5. Only 0, 1 and 3 are used currently -->
  6. <TargetOSLevel Condition="$(Platform.StartsWith('ARM'))">3</TargetOSLevel>
  7. <TargetOSLevel Condition="! $(Platform.StartsWith('ARM')) And $(PlatformToolset.EndsWith('_xp'))">0</TargetOSLevel>
  8. <TargetOSLevel Condition="! $(Platform.StartsWith('ARM')) And ! $(PlatformToolset.EndsWith('_xp'))">1</TargetOSLevel>
  9. <MhdNumBits Condition="$(Platform.EndsWith('64'))">64</MhdNumBits>
  10. <MhdNumBits Condition="! $(Platform.EndsWith('64'))">32</MhdNumBits>
  11. </PropertyGroup>
  12. <PropertyGroup>
  13. <IncludePath>$(SolutionDir);$(MhdW32Common);$(MhdSrc)include;$(IncludePath)</IncludePath>
  14. </PropertyGroup>
  15. <PropertyGroup>
  16. <IntDir>$(SolutionDir)$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
  17. <OutDir>$(SolutionDir)Output\$(Platform)\</OutDir>
  18. </PropertyGroup>
  19. <PropertyGroup Condition="'$(UseDebugLibraries)'=='true'">
  20. <LinkIncremental>true</LinkIncremental>
  21. </PropertyGroup>
  22. <PropertyGroup Condition="'$(UseDebugLibraries)'!='true'">
  23. <LinkIncremental>false</LinkIncremental>
  24. </PropertyGroup>
  25. <ItemDefinitionGroup>
  26. <ClCompile>
  27. <PrecompiledHeader>NotUsing</PrecompiledHeader>
  28. <WarningLevel>Level3</WarningLevel>
  29. <PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  30. <DisableSpecificWarnings>4996;4820;4127;5045</DisableSpecificWarnings>
  31. <TreatSpecificWarningsAsErrors>4013</TreatSpecificWarningsAsErrors>
  32. <ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
  33. <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
  34. <LanguageStandard_C Condition="'%(ClCompile.LanguageStandard_C)' != ''">stdc17</LanguageStandard_C>
  35. </ClCompile>
  36. <Link>
  37. <GenerateDebugInformation>true</GenerateDebugInformation>
  38. </Link>
  39. </ItemDefinitionGroup>
  40. <ItemDefinitionGroup Condition="'$(MhdNumBits)' == '32'">
  41. <ClCompile>
  42. <PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  43. </ClCompile>
  44. </ItemDefinitionGroup>
  45. <ItemDefinitionGroup Condition="'$(TargetOSLevel)'&gt;='3'">
  46. <ClCompile>
  47. <PreprocessorDefinitions>_WIN32_WINNT=0x0602;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  48. </ClCompile>
  49. <Link>
  50. <MinimumRequiredVersion>6.02</MinimumRequiredVersion>
  51. </Link>
  52. <Lib>
  53. <MinimumRequiredVersion>6.02</MinimumRequiredVersion>
  54. </Lib>
  55. </ItemDefinitionGroup>
  56. <ItemDefinitionGroup Condition="'$(TargetOSLevel)'&gt;'0' And '$(TargetOSLevel)'&lt;'3'">
  57. <ClCompile>
  58. <PreprocessorDefinitions>_WIN32_WINNT=0x0600;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  59. </ClCompile>
  60. <Link>
  61. <MinimumRequiredVersion>6.00</MinimumRequiredVersion>
  62. </Link>
  63. <Lib>
  64. <MinimumRequiredVersion>6.00</MinimumRequiredVersion>
  65. </Lib>
  66. </ItemDefinitionGroup>
  67. <ItemDefinitionGroup Condition="'$(TargetOSLevel)'=='0' And '$(Platform)'=='Win32'">
  68. <ClCompile>
  69. <PreprocessorDefinitions>_WIN32_WINNT=0x0501;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  70. </ClCompile>
  71. <Link>
  72. <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
  73. </Link>
  74. <Lib>
  75. <MinimumRequiredVersion>5.01</MinimumRequiredVersion>
  76. </Lib>
  77. </ItemDefinitionGroup>
  78. <ItemDefinitionGroup Condition="'$(TargetOSLevel)'=='0' And '$(Platform)'=='x64'">
  79. <ClCompile>
  80. <PreprocessorDefinitions>_WIN32_WINNT=0x0502;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  81. </ClCompile>
  82. <Link>
  83. <MinimumRequiredVersion>5.02</MinimumRequiredVersion>
  84. </Link>
  85. <Lib>
  86. <MinimumRequiredVersion>5.02</MinimumRequiredVersion>
  87. </Lib>
  88. </ItemDefinitionGroup>
  89. <ItemDefinitionGroup Condition="'$(UseDebugLibraries)'=='true'">
  90. <ClCompile>
  91. <Optimization>Disabled</Optimization>
  92. <SmallerTypeCheck>true</SmallerTypeCheck>
  93. <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  94. </ClCompile>
  95. <ResourceCompile>
  96. <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  97. </ResourceCompile>
  98. </ItemDefinitionGroup>
  99. <ItemDefinitionGroup Condition="'$(UseDebugLibraries)'!='true'">
  100. <ClCompile>
  101. <Optimization>Full</Optimization>
  102. <FunctionLevelLinking>true</FunctionLevelLinking>
  103. <IntrinsicFunctions>true</IntrinsicFunctions>
  104. <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
  105. <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
  106. <OmitFramePointers>true</OmitFramePointers>
  107. <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  108. </ClCompile>
  109. <Link>
  110. <EnableCOMDATFolding>true</EnableCOMDATFolding>
  111. <OptimizeReferences>true</OptimizeReferences>
  112. <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
  113. </Link>
  114. <ResourceCompile>
  115. <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
  116. </ResourceCompile>
  117. </ItemDefinitionGroup>
  118. <ItemDefinitionGroup Condition="'$(Platform)'=='Win32'">
  119. <Link>
  120. <TargetMachine>MachineX86</TargetMachine>
  121. </Link>
  122. <Lib>
  123. <TargetMachine>MachineX86</TargetMachine>
  124. </Lib>
  125. </ItemDefinitionGroup>
  126. <ItemDefinitionGroup Condition="'$(Platform)'=='x64'">
  127. <Link>
  128. <TargetMachine>MachineX64</TargetMachine>
  129. </Link>
  130. <Lib>
  131. <TargetMachine>MachineX64</TargetMachine>
  132. </Lib>
  133. </ItemDefinitionGroup>
  134. </Project>