Support SDL2-CS.Settings.props for both project types

This commit is contained in:
Ethan Lee 2021-03-01 09:20:52 -05:00
parent f636c6175d
commit 2b8d237fd4
2 changed files with 9 additions and 1 deletions

View file

@ -11,7 +11,7 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup>
<SDLSettingsPropsFilePath>$(SolutionDir)SDL-CS.Settings.props</SDLSettingsPropsFilePath>
<SDLSettingsPropsFilePath>$(SolutionDir)SDL2-CS.Settings.props</SDLSettingsPropsFilePath>
</PropertyGroup>
<Import Project="$(SDLSettingsPropsFilePath)" Condition="Exists('$(SDLSettingsPropsFilePath)')" />
<Target Name="ValidatePropsFilePath" BeforeTargets="BeforeBuild">

View file

@ -75,6 +75,14 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<SDLSettingsPropsFilePath>$(SolutionDir)SDL2-CS.Settings.props</SDLSettingsPropsFilePath>
</PropertyGroup>
<Import Project="$(SDLSettingsPropsFilePath)" Condition="Exists('$(SDLSettingsPropsFilePath)')" />
<Target Name="ValidatePropsFilePath" BeforeTargets="BeforeBuild">
<Message Importance="High" Text="No property overrides found at '$(SDLSettingsPropsFilePath)'" Condition="!Exists('$(SDLSettingsPropsFilePath)')" />
<Message Importance="High" Text="Loaded property overrides from '$(SDLSettingsPropsFilePath)'" Condition="Exists('$(SDLSettingsPropsFilePath)')" />
</Target>
<ItemGroup>
<Compile Include="src\SDL2.cs" />
<Compile Include="src\SDL2_image.cs" />