Add custom .targets to extract the PIX native libraries

このコミットが含まれているのは:
Sergio Pedri committed 2022-06-19 02:57:59 +02:00
1 親 f575d94d1f
コミット a63d340b78
3ファイル変更
+69 -8

検索条件に一致するファイルはありません

+7
ファイルの表示
@@ -29,4 +29,11 @@
</ProjectReference>
</ItemGroup>
<ItemGroup Label="Package">
<!-- Include the custom .targets file extract the PIX native libraries -->
<None Include="..\ComputeSharp.Pix\ComputeSharp.Pix.targets" PackagePath="buildTransitive\netstandard2.0" Pack="true" />
<None Include="..\ComputeSharp.Pix\ComputeSharp.Pix.targets" PackagePath="build\netstandard2.0" Pack="true" />
</ItemGroup>
</Project>
+11 -8
ファイルの表示
@@ -40,27 +40,30 @@
<!-- When no RID is specified, it means the NuGet package is being packed. In this case,
copy all libraries, and then rely on the custom .targets file to unpack them correctly. -->
<Otherwise>
<PropertyGroup>
<WinPixEventRuntimeVersion>winpixeventruntime.1.0.220124001</WinPixEventRuntimeVersion>
</PropertyGroup>
<ItemGroup>
<None Include="Libraries\x64\WinPixEventRuntime.dll"
Link="runtimes\win-x64\native\WinPixEventRuntime.dll"
Link="$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest"
PackFolder="runtimes\win-x64\native" />
PackFolder="$(WinPixEventRuntimeVersion)\x64" />
<None Include="Libraries\x64\WinPixEventRuntime_UAP.dll"
Link="runtimes\win-x64\native\WinPixEventRuntime_UAP.dll"
Link="$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime_UAP.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest"
PackFolder="runtimes\win-x64\native" />
PackFolder="$(WinPixEventRuntimeVersion)\x64" />
<None Include="Libraries\arm64\WinPixEventRuntime.dll"
Link="runtimes\win-arm64\native\WinPixEventRuntime.dll"
Link="$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest"
PackFolder="runtimes\win-arm64\native" />
PackFolder="$(WinPixEventRuntimeVersion)\arm64" />
<None Include="Libraries\arm64\WinPixEventRuntime_UAP.dll"
Link="runtimes\win-arm64\native\WinPixEventRuntime_UAP.dll"
Link="$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime_UAP.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest"
PackFolder="runtimes\win-arm64\native" />
PackFolder="$(WinPixEventRuntimeVersion)\arm64" />
</ItemGroup>
</Otherwise>
</Choose>
+51
ファイルの表示
@@ -0,0 +1,51 @@
<Project>
<!-- Get the analyzer from the ComputeSharp.Pix NuGet package -->
<Target Name="_ComputeSharpPixLinkNativeLibraries">
<PropertyGroup>
<!-- PIX version (this needs to be kept in sync with the one in the .csproj) -->
<WinPixEventRuntimeVersion>winpixeventruntime.1.0.220124001</WinPixEventRuntimeVersion>
<!-- Detect whether the target project is UWP-->
<ShouldUnpackUapPixNativeLibraries>false</ShouldUnpackUapPixNativeLibraries>
<ShouldUnpackUapPixNativeLibraries Condition="'$(TargetPlatformIdentifier)' == 'UAP'">true</ShouldUnpackUapPixNativeLibraries>
<!-- Detect the target project CPU architecture -->
<ShouldUnpackArm64PixNativeLibraries>false</ShouldUnpackArm64PixNativeLibraries>
<ShouldUnpackArm64PixNativeLibraries Condition="'$(Platform)' == 'arm64'">true</ShouldUnpackArm64PixNativeLibraries>
</PropertyGroup>
<!-- Win32, x64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- Win32, arm64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'False' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- UWP, x64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'False'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\x64\WinPixEventRuntime_UAP.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<!-- UWP, arm64 -->
<ItemGroup Condition="'$(ShouldUnpackUapPixNativeLibraries)' == 'True' AND '$(ShouldUnpackArm64PixNativeLibraries)' == 'True'">
<None Include="$(MSBuildThisFileDirectory)..\$(WinPixEventRuntimeVersion)\arm64\WinPixEventRuntime_UAP.dll"
Link="WinPixEventRuntime.dll"
Visible="False"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Target>
</Project>