-
Notifications
You must be signed in to change notification settings - Fork 31
/
compile.proj
55 lines (48 loc) · 2.98 KB
/
compile.proj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="All" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" $(Configuration) == '' ">Release</Configuration>
<SourceDirectory>$(MSBuildProjectDirectory)</SourceDirectory>
<BuildDirectory>$(SourceDirectory)\build</BuildDirectory>
<ReleaseDirectory>$(SourceDirectory)\release</ReleaseDirectory>
<NuGetDirectory>$(SourceDirectory)\.nuget</NuGetDirectory>
<SignAssembly Condition=" '$(SignAssembly)' == '' ">false</SignAssembly>
<AssemblyOriginatorKeyFile>$(SourceDirectory)\murmurhash-net.snk</AssemblyOriginatorKeyFile>
<SourceNuSpecFile></SourceNuSpecFile>
</PropertyGroup>
<PropertyGroup>
<NugetPackageVersion>1.0.2</NugetPackageVersion>
</PropertyGroup>
<Target Name="All">
<CallTarget Targets="Compile;CopyOutputToBuildDirectory;CreateNuGetPackage" />
</Target>
<Target Name="Compile">
<ItemGroup>
<_TargetProjects Include="$(SourceDirectory)\MurmurHash\*.csproj;$(SourceDirectory)\MurmurHash-net4\*.csproj;$(SourceDirectory)\MurmurHash-net35\*.csproj;$(SourceDirectory)\MurmurHash-net-core\*.csproj" />
</ItemGroup>
<Message Text="$(SignAssembly)" />
<MSBuild Projects="@(_TargetProjects)" Targets="Clean;Build" Properties="Configuration=$(Configuration);SignAssembly=$(SignAssembly);AssemblyOriginatorKeyFile=$(AssemblyOriginatorKeyFile)" />
</Target>
<Target Name="CopyOutputToBuildDirectory">
<ItemGroup>
<Net35OutputFiles Include="$(SourceDirectory)\*-net35\**\$(Configuration)\MurmurHash.dll" />
<Net40OutputFiles Include="$(SourceDirectory)\*-net4\**\$(Configuration)\MurmurHash.dll" />
<Net45OutputFiles Include="$(SourceDirectory)\MurmurHash\**\$(Configuration)\MurmurHash.dll" />
<NetCoreOutputFiles Include="$(SourceDirectory)\*-net-core\**\$(Configuration)\netstandard1.4\MurmurHash.dll" />
</ItemGroup>
<RemoveDir Condition=" Exists('$(BuildDirectory)') " Directories="$(BuildDirectory)" />
<MakeDir Condition=" !Exists('$(BuildDirectory)') " Directories="$(BuildDirectory)" />
<MakeDir Directories="$(BuildDirectory)\net35" />
<MakeDir Directories="$(BuildDirectory)\net40" />
<MakeDir Directories="$(BuildDirectory)\net45" />
<MakeDir Directories="$(BuildDirectory)\netstandard1.4" />
<Copy SourceFiles="@(Net35OutputFiles)" DestinationFolder="$(BuildDirectory)\net35" />
<Copy SourceFiles="@(Net40OutputFiles)" DestinationFolder="$(BuildDirectory)\net40" />
<Copy SourceFiles="@(Net45OutputFiles)" DestinationFolder="$(BuildDirectory)\net45" />
<Copy SourceFiles="@(NetCoreOutputFiles)" DestinationFolder="$(BuildDirectory)\netstandard1.4" />
</Target>
<Target Name="CreateNuGetPackage">
<Error Condition=" '$(SourceNuSpecFile)' == '' " Text=".nuspec file not specified" />
<Exec Command="$(NuGetDirectory)\NuGet.exe pack $(SourceNuSpecFile) -OutputDirectory .\release -Version $(NugetPackageVersion)" />
</Target>
</Project>