dotnet-installer/build/package/Microsoft.DotNet.Cli.Layout.targets

70 lines
3.6 KiB
Text
Raw Normal View History

2016-06-28 01:26:57 +00:00
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target DependsOnTargets="Init" Name="SetupLayoutInputsOutputs" >
<PropertyGroup>
<LayoutDirectory>$(IntermediateDirectory)/layouts</LayoutDirectory>
</PropertyGroup>
<!-- Set up Items with Layout Input Files -->
<ItemGroup>
<SdkLayoutInput Include="$(OutputDirectory)/sdk/**/*" />
<SdkDebugLayoutInput Include="$(SymbolsOutputDirectory)/sdk/**/*.pdb" />
<CombinedHostHostFxrFrameworkSdkInput Include="$(OutputDirectory)/**" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/shared/**/*" />
<CombinedFrameworkSdkInput Include="$(OutputDirectory)/sdk/**/*" />
</ItemGroup>
<PropertyGroup>
<SdkLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdk)</SdkLayoutOutputDirectory>
<SdkDebugLayoutOutputDirectory>$(LayoutDirectory)/$(ArtifactNameSdkDebug)</SdkDebugLayoutOutputDirectory>
<CombinedHostHostFxrFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</CombinedHostHostFxrFrameworkSdkOutputDirectory>
<CombinedFrameworkSdkOutputDirectory>$(LayoutDirectory)/$(ArtifactNameCombinedFrameworkSdk)</CombinedFrameworkSdkOutputDirectory>
</PropertyGroup>
<!-- Set up Items Defining Layouts for easy change -->
<ItemGroup>
<LayoutDefinition Include="SdkName">
<InputFiles>@(SdkLayoutInput)</InputFiles>
<OutputFiles>@(SdkLayoutInput -> '$(SdkLayoutOutputDirectory)/$([MSBuild]::MakeRelative($(OutputDirectory), '%(Identity)'))')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdk)</NameWithVersion>
<Name>$(ArtifactNameSdk)</Name>
</LayoutDefinition>
<LayoutDefinition Include="SdkDebug">
<InputFiles>@(SdkDebugLayoutInput)</InputFiles>
<OutputFiles>@(SdkDebugLayoutInput -> '$(SdkDebugLayoutOutputDirectory)/$([MSBuild]::MakeRelative($(SymbolsOutputDirectory), '%(Identity)'))')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionSdkDebug)</NameWithVersion>
<Name>$(ArtifactNameSdkDebug)</Name>
</LayoutDefinition>
<LayoutDefinition Include="CombinedHostHostFxrFrameworkSdk">
<InputFiles>@(CombinedHostHostFxrFrameworkSdkInput)</InputFiles>
<OutputFiles>@(CombinedHostHostFxrFrameworkSdkInput -> '$(CombinedHostHostFxrFrameworkSdkOutputDirectory)/$([MSBuild]::MakeRelative($(OutputDirectory), '%(Identity)'))')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionCombinedHostHostFxrFrameworkSdk)</NameWithVersion>
<Name>$(ArtifactNameCombinedHostHostFxrFrameworkSdk)</Name>
</LayoutDefinition>
<LayoutDefinition Include="CombinedFrameworkSdk">
<InputFiles>@(CombinedFrameworkSdkInput)</InputFiles>
<OutputFiles>@(CombinedFrameworkSdkInput -> '$(CombinedFrameworkSdkOutputDirectory)/$([MSBuild]::MakeRelative($(OutputDirectory), '%(Identity)'))')</OutputFiles>
<NameWithVersion>$(ArtifactNameWithVersionCombinedFrameworkSdk)</NameWithVersion>
<Name>$(ArtifactNameCombinedFrameworkSdk)</Name>
</LayoutDefinition>
</ItemGroup>
</Target>
<Target Name="Layout"
DependsOnTargets="Init;SetupLayoutInputsOutputs"
Inputs="@(LayoutDefinition -> '%(InputFiles)')"
Outputs="@(LayoutDefinition -> '%(OutputFiles)')" >
<!-- Copy Files to layout directories based on defintiions -->
<Copy SourceFiles="%(LayoutDefinition.InputFiles)"
DestinationFiles="%(LayoutDefinition.OutputFiles)"
SkipUnchangedFiles="true" />
</Target>
</Project>