-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathWebRtcVadSharp.targets
27 lines (27 loc) · 1.43 KB
/
WebRtcVadSharp.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
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyWebRtcVadFiles" AfterTargets="AfterBuild">
<Warning Text="This project's platform is set to '$(PlatformTarget)', but it requires a native DLL (WebRtcVad.dll). Defaulting to 'x64' binaries. Explicitly choose a platform in the project's Build properties to remove this warning."
Condition="'$(PlatformTarget)' != 'x86' And '$(PlatformTarget)' != 'x64'" />
<PropertyGroup>
<WebRtcPlatformTarget>$(PlatformTarget)</WebRtcPlatformTarget>
<WebRtcPlatformTarget Condition="'$(PlatformTarget)' != 'x86' And '$(PlatformTarget)' != 'x64'">x64</WebRtcPlatformTarget>
</PropertyGroup>
<PropertyGroup>
<RuntimeFolder>win-$(WebRtcPlatformTarget)\native</RuntimeFolder>
</PropertyGroup>
<ItemGroup>
<WebRtcVadFiles Include="$(MSBuildThisFileDirectory)$(RuntimeFolder)\*.*" />
</ItemGroup>
<Copy SourceFiles="@(WebRtcVadFiles)" DestinationFolder="$(OutputPath)" />
</Target>
<Target Name="PublishWebRtcVadFiles" AfterTargets="Publish">
<PropertyGroup>
<WebRtcVadFilesOutputPath>$(PublishDir)runtimes</WebRtcVadFilesOutputPath>
</PropertyGroup>
<ItemGroup>
<WebRtcVadRuntimeFiles Include="$(MSBuildThisFileDirectory)**\WebRtcVad.*" />
</ItemGroup>
<Copy SourceFiles="@(WebRtcVadRuntimeFiles)" DestinationFolder="$(WebRtcVadFilesOutputPath)\%(RecursiveDir)" />
</Target>
</Project>