forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGenerateNativeDllName.targets
33 lines (28 loc) · 1.03 KB
/
GenerateNativeDllName.targets
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
<Project>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<Target Name="DefineNativeDllName">
<PropertyGroup>
<NativeDllNamePath>$(IntermediateOutputPath)NativeDllName.g.cs</NativeDllNamePath>
</PropertyGroup>
</Target>
<Target Name="GenerateNativeDllNameCs" Inputs="$(libgit2_propsfile)" Outputs="$(NativeDllNamePath)" BeforeTargets="CoreCompile" DependsOnTargets="DefineNativeDllName">
<PropertyGroup>
<NativeDllNameSourceLines>
namespace LibGit2Sharp.Core
{
internal static class NativeDllName
{
public const string Name = "$(libgit2_filename)"%3b
}
}
</NativeDllNameSourceLines>
</PropertyGroup>
<WriteLinesToFile File="$(NativeDllNamePath)" Lines="$(NativeDllNameSourceLines)" Overwrite="true" />
<ItemGroup>
<Compile Include="$(NativeDllNamePath)" />
<FileWrites Include="$(NativeDllNamePath)" />
</ItemGroup>
</Target>
</Project>