Added Visual Studio project generation.
This commit is contained in:
53
contrib/vs/spp.targets
Normal file
53
contrib/vs/spp.targets
Normal file
@@ -0,0 +1,53 @@
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SolutionExt>.sln</SolutionExt>
|
||||
<Language>C++</Language>
|
||||
<DefaultLanguageSourceExtension>.cpp</DefaultLanguageSourceExtension>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFileName Condition="'$(TargetPath)' != ''">$([System.IO.Path]::GetFileName('$(TargetPath)'))</TargetFileName>
|
||||
<TargetDir Condition="'$(TargetPath)' != ''">$([System.IO.Path]::GetDirectoryName('$(TargetPath)'))</TargetDir>
|
||||
<OutputPath>$(TargetDir)</OutputPath>
|
||||
<LocalDebuggerCommand Condition="'$(LocalDebuggerCommand)' == ''">$(TargetPath)</LocalDebuggerCommand>
|
||||
|
||||
<SConsCommandLine Condition="'$(SConsCommandLine)' == ''">scons</SConsCommandLine>
|
||||
<SPPNumProcs Condition="'$(SPPNumProcs)' == ''">$([System.Environment]::ProcessorCount)</SPPNumProcs>
|
||||
<SPPBuildType Condition="'$(SPPBuildType)' == ''">debug</SPPBuildType>
|
||||
<SPPTargetType Condition="'$(SPPTargetType)' == ''">executable</SPPTargetType>
|
||||
|
||||
<OutDir>$(OutputPath)\</OutDir>
|
||||
<IntDir>$(SolutionDir)cache\msbuild\</IntDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
|
||||
|
||||
<Target Name="Build" Condition="'$(SPPTargetType)' != 'meta'">
|
||||
<Exec Command="$(SConsCommandLine) -j$(SPPNumProcs) --build_type=$(SPPBuildType) --unity=disable $(TargetPath)"
|
||||
WorkingDirectory="$(SolutionDir)" />
|
||||
</Target>
|
||||
<!--<Target Name="Build" Condition="'$(SPPTargetType)' == 'meta'">
|
||||
<Message Importance="low" Text="Skipping build for meta target $(ProjectName)" />
|
||||
</Target>-->
|
||||
<Target Name="Clean" Condition="'$(SPPTargetType)' != 'meta'">
|
||||
<Exec Command="$(SConsCommandLine) -c -j$(SPPNumProcs) --build_type=$(SPPBuildType) --unity=disable $(TargetPath)"
|
||||
WorkingDirectory="$(SolutionDir)" />
|
||||
</Target>
|
||||
<!--<Target Name="Clean" Condition="'$(SPPTargetType)' == 'meta'">
|
||||
<Message Importance="low" Text="Skipping clean for meta target $(ProjectName)" />
|
||||
</Target>-->
|
||||
<Target Name="Rebuild" Condition="'$(SPPTargetType)' != 'meta'" DependsOnTargets="Clean;Build" />
|
||||
<!--<Target Name="Rebuild" Condition="'$(SPPTargetType)' == 'meta'">
|
||||
<Message Importance="low" Text="Skipping rebuild for meta target $(ProjectName)" />
|
||||
</Target>-->
|
||||
|
||||
<!-- This target is needed just to suppress "warning NU1503: Skipping restore for project '...'. The project file may be invalid or missing targets
|
||||
required for restore." -->
|
||||
<Target Name="_IsProjectRestoreSupported" Returns="@(_ValidProjectsForRestore)">
|
||||
<ItemGroup>
|
||||
<_ValidProjectsForRestore Include="$(MSBuildProjectFullPath)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Import Condition="'$(_ImportMicrosoftCppDesignTime)' != 'false'" Project="$(VCTargetsPathActual)\Microsoft.Cpp.DesignTime.targets" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user