diff options
Diffstat (limited to 'src/.nuget/dir.props')
-rw-r--r-- | src/.nuget/dir.props | 193 |
1 files changed, 193 insertions, 0 deletions
diff --git a/src/.nuget/dir.props b/src/.nuget/dir.props new file mode 100644 index 0000000000..59b94f75b2 --- /dev/null +++ b/src/.nuget/dir.props @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildThisFileDirectory)..\..\dir.props" /> + + <PropertyGroup> + <!-- defined in buildtools packaging.targets, but we need this before targets are imported --> + <PackagePlatform>AnyCPU</PackagePlatform> + + <!-- build the transport package which includes product and symbols in addition to standard packages --> + <CreatePackedPackage Condition="'$(CreatePackedPackage)' == ''">true</CreatePackedPackage> + + <!-- Distro rid is passed as runtimeos-arch--> + <_parseDistroRid>$(__DistroRid)</_parseDistroRid> + <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__BuildOS)' == 'OSX'">osx.10.12-x64</_parseDistroRid> + <_distroRidIndex>$(_parseDistroRid.IndexOfAny("-"))</_distroRidIndex> + <_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))</_archRidIndex> + <OSRid Condition="'$(OSRid)' == '' and '$(_distroRidIndex)' != '-1'">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</OSRid> + <OSRid Condition="'$(OSRid)' == ''">win10</OSRid> + + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(_archRidIndex)' != '0'">$(_parseDistroRid.SubString($(_archRidIndex)))</ArchGroup> + <ArchGroup Condition="'$(ArchGroup)' == '' and '$(Platform)' != ''">$(Platform)</ArchGroup> + <ArchGroup Condition="'$(ArchGroup)' == ''">$(BuildArch)</ArchGroup> + + <RuntimeOS Condition="'$(RuntimeOS)' == ''">$(OSRid)</RuntimeOS> + + <SupportedPackageOSGroups Condition="'$(SupportedPackageOSGroups)' == ''">Windows_NT;OSX;Linux</SupportedPackageOSGroups> + <SupportedPackageOSGroups>;$(SupportedPackageOSGroups);</SupportedPackageOSGroups> + + <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex> + <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily> + <_isSupportedOSGroup>true</_isSupportedOSGroup> + </PropertyGroup> + + <!-- derive an OS Group based on the OS Family --> + <PropertyGroup> + <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'osx'">OSX</_derivedPackageTargetOSGroup> + <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'win'">Windows_NT</_derivedPackageTargetOSGroup> + <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(__BuildOS)' != ''">$(__BuildOS)</_derivedPackageTargetOSGroup> + <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux</_derivedPackageTargetOSGroup> + + <_isSupportedOSGroup Condition="!$(SupportedPackageOSGroups.Contains(';$(_derivedPackageTargetOSGroup);'))">false</_isSupportedOSGroup> + </PropertyGroup> + + <!-- _packageTargetOSGroup is used to control the runtime package imports, don't import runtime package targets for + an unsupported OS Group --> + <PropertyGroup Condition="'$(PackageTargetRuntime)' != '' and '$(_isSupportedOSGroup)' == 'true'"> + <_packageTargetOSGroup>$(_derivedPackageTargetOSGroup)</_packageTargetOSGroup> + </PropertyGroup> + + <PropertyGroup> + <SkipPackageFileCheck>true</SkipPackageFileCheck> + <OutputPath>$(PackageOutputPath)</OutputPath> + </PropertyGroup> + + <PropertyGroup Condition="'$(IsLineupPackage)' == 'true'"> + <SkipValidatePackage>true</SkipValidatePackage> + <IncludeRuntimeJson>true</IncludeRuntimeJson> + </PropertyGroup> + + <Choose> + <When Condition="'$(PackageRID)' != ''" /> + <When Condition="'$(_runtimeOSFamily)' == 'win'"> + <PropertyGroup> + <RIDPlatform>win7</RIDPlatform> + <RIDPlatform Condition="'$(ArchGroup)' == 'arm'">win8</RIDPlatform> + <RIDPlatform Condition="'$(ArchGroup)' == 'arm64'">win10</RIDPlatform> + + <!-- Set the platform part of the RID if we are doing a portable build --> + <RIDPlatform Condition="'$(PortableBuild)' == '1'">win</RIDPlatform> + <PackageRID>$(RIDPlatform)-$(ArchGroup)</PackageRID> + </PropertyGroup> + </When> + <When Condition="'$(_runtimeOSFamily)' == 'osx'"> + <PropertyGroup> + <PackageRID>osx.10.12-$(ArchGroup)</PackageRID> + <!-- Set the platform part of the RID if we are doing a portable build --> + <PackageRID Condition="'$(PortableBuild)' == '1'">osx-$(ArchGroup)</PackageRID> + </PropertyGroup> + </When> + <When Condition="'$(_runtimeOSFamily)' == 'rhel'"> + <PropertyGroup> + <PackageRID>rhel.7-$(ArchGroup)</PackageRID> + <!-- Set the platform part of the RID if we are doing a portable build --> + <PackageRID Condition="'$(PortableBuild)' == '1'">linux-$(ArchGroup)</PackageRID> + </PropertyGroup> + </When> + <Otherwise> + <PropertyGroup> + <PackageRID>$(RuntimeOS)-$(ArchGroup)</PackageRID> + <!-- Set the platform part of the RID if we are doing a portable build --> + <PackageRID Condition="'$(PortableBuild)' == '1'">linux-$(ArchGroup)</PackageRID> + </PropertyGroup> + </Otherwise> + </Choose> + + <!-- Determine per-platform native binary extensions. --> + <Choose> + <When Condition="'$(_runtimeOSFamily)' == 'win'" /> + <When Condition="'$(_runtimeOSFamily)' == 'osx'"> + <PropertyGroup> + <LibraryFileExtension>.dylib</LibraryFileExtension> + <SymbolFileExtension>.dwarf</SymbolFileExtension> + </PropertyGroup> + </When> + <Otherwise> + <PropertyGroup> + <LibraryFileExtension>.so</LibraryFileExtension> + <SymbolFileExtension>.dbg</SymbolFileExtension> + </PropertyGroup> + </Otherwise> + </Choose> + + <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Linux;'))"> + <OfficialBuildRID Include="alpine.3.4.3-x64" /> + <OfficialBuildRID Include="debian.8-armel"> + <Platform>armel</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="debian.8-x64" /> + <OfficialBuildRID Include="fedora.23-x64" /> + <OfficialBuildRID Include="fedora.24-x64" /> + <OfficialBuildRID Include="linux-x64" /> + <OfficialBuildRID Include="linux-arm"> + <Platform>arm</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="opensuse.42.1-x64" /> + <OfficialBuildRID Include="rhel.7-x64" /> + <OfficialBuildRID Include="tizen.4.0.0-armel"> + <Platform>armel</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="ubuntu.14.04-arm"> + <Platform>arm</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="ubuntu.14.04-x64" /> + <OfficialBuildRID Include="ubuntu.16.04-arm"> + <Platform>arm</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="ubuntu.16.04-x64" /> + <OfficialBuildRID Include="ubuntu.16.10-x64" /> + </ItemGroup> + <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';OSX;'))"> + <OfficialBuildRID Include="osx.10.12-x64" /> + <OfficialBuildRID Include="osx-x64" /> + </ItemGroup> + <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Windows_NT;'))"> + <OfficialBuildRID Include="win7-x86"> + <Platform>x86</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="win-x86"> + <Platform>x86</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="win7-x64" /> + <OfficialBuildRID Include="win-x64" /> + <OfficialBuildRID Include="win8-arm"> + <Platform>arm</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="win10-arm64"> + <Platform>arm64</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="win-arm"> + <Platform>arm</Platform> + </OfficialBuildRID> + <OfficialBuildRID Include="win-arm64"> + <Platform>arm64</Platform> + </OfficialBuildRID> + </ItemGroup> + <ItemGroup> + <!-- Ensure we have a RID-specific package for the current build, even if it isn't in our official set, but + don't build the RID-specific package if we're in an unsupported os family --> + <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/> + <BuildRID Include="$(PackageRID)" + Condition="'$(_isSupportedOSGroup)' == 'true'"> + <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform> + <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform> + </BuildRID> + </ItemGroup> + + <ItemGroup> + <_project Include="@(BuildRID)"> + <Platform Condition="'%(Platform)' == ''">amd64</Platform> + <PackageTargetRuntime>%(Identity)</PackageTargetRuntime> + <AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties> + </_project> + + <_buildRidProjects Include="@(_project->'$(MSBuildProjectName).pkgproj')" /> + <!-- Only include rid projects for a builds file, not for a lineup package --> + <Project Condition="'$(IsLineupPackage)' != 'true'" Include="@(_buildRidProjects)" /> + </ItemGroup> + + <ItemGroup Condition="'$(IsLineupPackage)' == 'true'"> + <!-- Include project references for a lineup package to generate the runtime.json file --> + <ProjectReference Include="@(_buildRidProjects)" /> + </ItemGroup> +</Project>
\ No newline at end of file |