53 lines
2.3 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
that defines the OfficialBuildRID item: all RIDs targeted by the package -->
<Import Project="$(MSBuildProjectDirectory)\*.rids.props" />
<!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
We'll add a RID for the current platform even if it isn't in the officially supported set -->
<ItemGroup Condition="'@(OfficialBuildRID)' != ''">
<BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
<BuildRID Include="$(PackageRID)">
<Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
<Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
</BuildRID>
</ItemGroup>
<!-- create the "Project" item which is the current $(MSBuildProjectName).pkgproj with meta-data for all
supported RIDs -->
<ItemGroup>
<_project Include="@(BuildRID)">
<Platform Condition="'%(Platform)' == ''">amd64</Platform>
<PackageTargetRuntime>%(Identity)</PackageTargetRuntime>
<AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties>
</_project>
<Project Include="@(_project->'$(MSBuildProjectName).pkgproj')" />
</ItemGroup>
<!-- Add path globs specific to native binaries to exclude unnecessary files from packages. -->
<Choose>
<When Condition="$(PackageTargetRuntime.StartsWith('win'))"/>
<When Condition="$(PackageTargetRuntime.StartsWith('osx'))">
<PropertyGroup>
<LibraryFileExtension>.dylib</LibraryFileExtension>
<SymbolFileExtension>.dwarf</SymbolFileExtension>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<LibraryFileExtension>.so</LibraryFileExtension>
<SymbolFileExtension>.dbg</SymbolFileExtension>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<AdditionalLibPackageExcludes Condition="'$(SymbolFileExtension)' != ''" Include="%2A%2A\%2A$(SymbolFileExtension)" />
<AdditionalSymbolPackageExcludes Condition="'$(LibraryFileExtension)' != ''" Include="%2A%2A\%2A.a;%2A%2A\%2A$(LibraryFileExtension)" />
</ItemGroup>
</Project>