70 行
4.2 KiB
XML
70 行
4.2 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
|
|
<!--
|
|
When running in the CI, set the executable type to be 'Exe', so that a console will
|
|
be available and the PowerShell test script will be able to await the published app.
|
|
When not in the CI, use 'WinExe' instead so that the render window will open directly.
|
|
-->
|
|
<OutputType Condition="'$(CI_RUNNER_SAMPLES_INTEGRATION_TESTS)' == 'true'">Exe</OutputType>
|
|
<OutputType Condition="'$(CI_RUNNER_SAMPLES_INTEGRATION_TESTS)' != 'true'">WinExe</OutputType>
|
|
<TargetFramework>net7.0</TargetFramework>
|
|
<Platforms>x64;ARM64</Platforms>
|
|
<DefineConstants>$(DefineConstants);SAMPLE_APP</DefineConstants>
|
|
<NoWarn>$(NoWarn);CA1416</NoWarn>
|
|
<AssemblyName>computesharp.cli</AssemblyName>
|
|
|
|
<!-- When explicitly optimizing for size, strip the icon (which adds about 100 KB of binary size) -->
|
|
<ApplicationIcon Condition="'$(COMPUTESHARP_SWAPCHAIN_CLI_SIZE_OPTIMIZED)' != 'true'">..\..\assets\icon.ico</ApplicationIcon>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
NativeAOT settings (NativeAOT publishing + reflection-free mode).
|
|
Note: the COMPUTESHARP_SWAPCHAIN_CLI_PUBLISH_AOT environment variable is used to trigger
|
|
publishing with NativeAOT so that this project won't cause build errors in the CI. This is
|
|
because NativeAOT doesn't support cross-compiling, but the CI will also build the solution
|
|
targeting Arm64, from a VM running on x64, which would then fail due to mismatched RIDs.
|
|
-->
|
|
<PropertyGroup Condition="'$(COMPUTESHARP_SWAPCHAIN_CLI_PUBLISH_AOT)' == 'true'">
|
|
<PublishAot>true</PublishAot>
|
|
<DebuggerSupport>false</DebuggerSupport>
|
|
<UseSystemResourceKeys>true</UseSystemResourceKeys>
|
|
<InvariantGlobalization>true</InvariantGlobalization>
|
|
<IlcFoldIdenticalMethodBodies>true</IlcFoldIdenticalMethodBodies>
|
|
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
|
|
<IlcDisableReflection Condition="'$(COMPUTESHARP_SWAPCHAIN_CLI_DISABLE_REFLECTION)' == 'true'">true</IlcDisableReflection>
|
|
<IlcOptimizationPreference Condition="'$(COMPUTESHARP_SWAPCHAIN_CLI_SIZE_OPTIMIZED)' == 'true'">Size</IlcOptimizationPreference>
|
|
<IlcOptimizationPreference Condition="'$(COMPUTESHARP_SWAPCHAIN_CLI_SIZE_OPTIMIZED)' != 'true'">Speed</IlcOptimizationPreference>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Manually set all configuration switches to trim unused features. These are usually set automatically by the
|
|
.targets file included in ComputeSharp, but since this project is directly referencing the project and not
|
|
going through NuGet, it can't rely on that, so it's just copying those three directives here.
|
|
-->
|
|
<ItemGroup>
|
|
<RuntimeHostConfigurationOption Include="COMPUTESHARP_ENABLE_DEBUG_OUTPUT" Value="false" Trim="true" />
|
|
<RuntimeHostConfigurationOption Include="COMPUTESHARP_ENABLE_DEVICE_REMOVED_EXTENDED_DATA" Value="false" Trim="true" />
|
|
<RuntimeHostConfigurationOption Include="COMPUTESHARP_ENABLE_GPU_TIMEOUT" Value="true" Trim="true" />
|
|
</ItemGroup>
|
|
|
|
<!-- If requested, also reference the UPX compression package -->
|
|
<ItemGroup Condition="'$(PUBLISH_AOT_COMPRESSED)' == 'true'">
|
|
<PackageReference Include="PublishAotCompressed" Version="1.0.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.Core.SourceGenerators\ComputeSharp.Core.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
|
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="contentfiles;build" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Include="..\ComputeSharp.SwapChain\Backend\Win32Application.cs" Link="Backend\Win32Application.cs" />
|
|
<Compile Include="..\ComputeSharp.SwapChain\Backend\Win32ApplicationRunner.cs" Link="Backend\Win32ApplicationRunner.cs" />
|
|
</ItemGroup>
|
|
|
|
<Import Project="..\ComputeSharp.SwapChain.Shaders.Shared\ComputeSharp.SwapChain.Shaders.Shared.projitems" Label="Shared" />
|
|
</Project>
|