-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAccelerate.Packages.props
More file actions
18 lines (16 loc) · 1.27 KB
/
Accelerate.Packages.props
File metadata and controls
18 lines (16 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<Project>
<!-- Only enable Accelerate if a license key is present in the environment variable or explicitly enabled. -->
<PropertyGroup>
<!-- Set a variable (MSBuild Property) based on the presence of the environment variable holding the licence key -->
<EnableAccelerate Condition="'$(EnableAccelerate)' == '' and '$(AVALONIA_LICENSE_KEY)' != ''">true</EnableAccelerate>
<EnableAccelerate Condition="'$(EnableAccelerate)' == ''">false</EnableAccelerate>
<!-- Get the C# compiler to define an equivalent constant that can then be used in Preprocessor Directives to conditionally compile parts of the code (#if ...) -->
<DefineConstants Condition="'$(EnableAccelerate)' == 'true'">$(DefineConstants);ENABLE_ACCELERATE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<!-- Conditionally include the Accelerate licensed TreeDataGrid package -->
<!-- PrivateAssets="All" ensures this dependency is NOT propagated to consumers of our NuGet.
Consumers who want to use TreeDataGrid must reference it themselves. -->
<PackageReference Include="Avalonia.Controls.TreeDataGrid" Version="$(MinimumAvaloniaTreeDataGridVersion)" Condition="'$(EnableAccelerate)' == 'true'" PrivateAssets="All" />
</ItemGroup>
</Project>