Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'LibGit2Sharp/NativeDllName.targets')
-rw-r--r--LibGit2Sharp/NativeDllName.targets23
1 files changed, 23 insertions, 0 deletions
diff --git a/LibGit2Sharp/NativeDllName.targets b/LibGit2Sharp/NativeDllName.targets
new file mode 100644
index 00000000..33261d59
--- /dev/null
+++ b/LibGit2Sharp/NativeDllName.targets
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+
+ <UsingTask TaskName="GenerateNativeDllNameTask" AssemblyFile="..\Lib\CustomBuildTasks\CustomBuildTasks.dll" />
+
+ <PropertyGroup>
+ <LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' == ''">.</LibGit2SharpPath>
+ <LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' != ''">$(MSBuildThisFileDirectory)</LibGit2SharpPath>
+ <NativeDllNamePath>$(LibGit2SharpPath)\Core\NativeDllName.cs</NativeDllNamePath>
+ <CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateNativeDllNameCs</CoreCompileDependsOn>
+ <CoreCleanDependsOn>$(CoreCleanDependsOn);CleanNativeDllNameCs</CoreCleanDependsOn>
+ </PropertyGroup>
+
+ <Target Name="GenerateNativeDllNameCs"
+ Inputs="@(EmbeddedResource)"
+ Outputs="$(NativeDllNamePath)">
+ <GenerateNativeDllNameTask InputHashFile="@(EmbeddedResource)" Condition=" '%(Filename)%(Extension)' == 'libgit2_hash.txt' " OutputFile="$(NativeDllNamePath)" />
+ </Target>
+
+ <Target Name="CleanNativeDllNameCs">
+ <Delete Files="$(NativeDllNamePath)" />
+ </Target>
+</Project>