forked from microsoft/CsWinRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.Windows.CsWinMD.targets
21 lines (20 loc) · 1.29 KB
/
Microsoft.Windows.CsWinMD.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CSWinMDProduceWinMDFromCSharpComponent" BeforeTargets="CSWinMDInsertComponentWinMD">
<PropertyGroup>
<CsWinMDPath Condition="'$(CsWinMDPath)'==''">$(MSBuildThisFileDirectory)..\tools\native\CsWinMD.exe</CsWinMDPath>
<CsWinMDOutputPath Condition="'$(CsWinMDOutputPath)'==''">$(OutDir)cswinmd-$(ProjectName)</CsWinMDOutputPath>
</PropertyGroup>
<Message Text="Producing winmd for %(CSWinMDComponent.Identity)" Importance="High" />
<Message Text="$(CsWinMDPath) -i %(CSWinMDComponent.FullPath) -o $(CsWinMDOutputPath) -a $(RootNamespace)" Importance="High" />
<MakeDir Directories="$(CSWinMDOutputPath)" />
<Exec Command="$(CsWinMDPath) -i %(CSWinMDComponent.FullPath) -o $(CsWinMDOutputPath) -a $(RootNamespace)" />
</Target>
<Target Name="CSWinMDInsertComponentWinMD" AfterTargets="GetCppWinRTMdMergeInputs" BeforeTargets="CppWinRTMakeComponentProjection;CppWinRTMergeProjectWinMDInputs">
<ItemGroup>
<CppWinRTMdMergeInputs Include="@(CSWinMDComponent->'$(CsWinMDOutputPath)\%(FileName).winmd')">
<IsWinMDFile>true</IsWinMDFile>
</CppWinRTMdMergeInputs>
</ItemGroup>
</Target>
</Project>