Merge pull request #13307 from wateret/cleanup-armel-lsracond
[platform/upstream/coreclr.git] / src / .nuget / dir.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Project="$(MSBuildThisFileDirectory)..\..\dir.props" />
4
5   <PropertyGroup>
6     <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
7     <PackagePlatform>AnyCPU</PackagePlatform>
8     
9     <!-- build the transport package which includes product and symbols in addition to standard packages -->
10     <CreatePackedPackage Condition="'$(CreatePackedPackage)' == ''">true</CreatePackedPackage>
11
12     <!-- Distro rid is passed as runtimeos-arch-->
13     <_parseDistroRid>$(__DistroRid)</_parseDistroRid>
14     <_parseDistroRid Condition="'$(_parseDistroRid)' == '' and '$(__BuildOS)' == 'OSX'">osx.10.12-x64</_parseDistroRid>
15     <_distroRidIndex>$(_parseDistroRid.IndexOfAny("-"))</_distroRidIndex>
16     <_archRidIndex>$([MSBuild]::Add($(_distroRidIndex), 1))</_archRidIndex>
17     <OSRid Condition="'$(OSRid)' == '' and '$(_distroRidIndex)' != '-1'">$(_parseDistroRid.SubString(0, $(_distroRidIndex)))</OSRid>
18     <OSRid Condition="'$(OSRid)' == ''">win10</OSRid>
19
20     <ArchGroup Condition="'$(ArchGroup)' == '' and '$(_archRidIndex)' != '0'">$(_parseDistroRid.SubString($(_archRidIndex)))</ArchGroup>
21     <ArchGroup Condition="'$(ArchGroup)' == '' and '$(Platform)' != ''">$(Platform)</ArchGroup>
22     <ArchGroup Condition="'$(ArchGroup)' == ''">$(BuildArch)</ArchGroup>
23
24     <RuntimeOS Condition="'$(RuntimeOS)' == ''">$(OSRid)</RuntimeOS>
25
26     <SupportedPackageOSGroups Condition="'$(SupportedPackageOSGroups)' == ''">Windows_NT;OSX;Android;Linux</SupportedPackageOSGroups>
27     <SupportedPackageOSGroups>;$(SupportedPackageOSGroups);</SupportedPackageOSGroups>
28
29     <!-- Identify OS family based upon the RuntimeOS, which could be distro specific (e.g. osx.10.12) or 
30          portable (e.g. osx). 
31     -->
32     <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
33     <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
34     <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' == '-1'">$(RuntimeOS)</_runtimeOSFamily>
35     <_isSupportedOSGroup>true</_isSupportedOSGroup>
36   </PropertyGroup>
37
38   <!-- derive an OS Group based on the OS Family -->
39   <PropertyGroup>
40     <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'osx'">OSX</_derivedPackageTargetOSGroup>
41     <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'android'">Android</_derivedPackageTargetOSGroup>
42     <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(_runtimeOSFamily)' == 'win'">Windows_NT</_derivedPackageTargetOSGroup>
43     <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == '' and '$(__BuildOS)' != ''">$(__BuildOS)</_derivedPackageTargetOSGroup>
44     <_derivedPackageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == ''">Linux</_derivedPackageTargetOSGroup>
45
46     <_isSupportedOSGroup Condition="!$(SupportedPackageOSGroups.Contains(';$(_derivedPackageTargetOSGroup);'))">false</_isSupportedOSGroup>
47   </PropertyGroup>
48
49   <!-- _packageTargetOSGroup is used to control the runtime package imports, don't import runtime package targets for 
50        an unsupported OS Group -->
51   <PropertyGroup Condition="'$(PackageTargetRuntime)' != '' and '$(_isSupportedOSGroup)' == 'true'">
52     <!-- Android will use Linux package definitions -->
53     <_packageTargetOSGroup>$(_derivedPackageTargetOSGroup)</_packageTargetOSGroup>
54     <_packageTargetOSGroup Condition="'$(_derivedPackageTargetOSGroup)' == 'Android'">Linux</_packageTargetOSGroup>
55   </PropertyGroup>
56   <PropertyGroup>
57     <SkipPackageFileCheck>true</SkipPackageFileCheck>
58     <OutputPath>$(PackageOutputPath)</OutputPath>
59   </PropertyGroup>
60
61   <PropertyGroup Condition="'$(IsLineupPackage)' == 'true'">
62     <SkipValidatePackage>true</SkipValidatePackage>
63     <IncludeRuntimeJson>true</IncludeRuntimeJson>
64   </PropertyGroup>
65
66   <Choose>
67     <When Condition="'$(PackageRID)' != ''" />
68     <When Condition="'$(_runtimeOSFamily)' == 'win'">
69       <PropertyGroup>
70         <RIDPlatform>win7</RIDPlatform>
71         <RIDPlatform Condition="'$(ArchGroup)' == 'arm'">win8</RIDPlatform>
72         <RIDPlatform Condition="'$(ArchGroup)' == 'arm64'">win10</RIDPlatform>
73         
74         <!-- Set the platform part of the RID if we are doing a portable build -->
75         <RIDPlatform Condition="'$(PortableBuild)' == 'true'">win</RIDPlatform>
76         <PackageRID>$(RIDPlatform)-$(ArchGroup)</PackageRID>
77       </PropertyGroup>
78     </When>
79     <When Condition="'$(_runtimeOSFamily)' == 'osx'">
80       <PropertyGroup>
81         <PackageRID>osx.10.12-$(ArchGroup)</PackageRID>
82         <!-- Set the platform part of the RID if we are doing a portable build -->
83         <PackageRID Condition="'$(PortableBuild)' == 'true'">osx-$(ArchGroup)</PackageRID>
84       </PropertyGroup>
85     </When>
86     <When Condition="'$(_runtimeOSFamily)' == 'android'">
87       <PropertyGroup>
88         <PackageRID>android.21-$(ArchGroup)</PackageRID>
89         <!-- Set the platform part of the RID if we are doing a portable build -->
90         <PackageRID Condition="'$(PortableBuild)' == '1'">android-$(ArchGroup)</PackageRID>
91       </PropertyGroup>
92     </When>
93     <When Condition="'$(_runtimeOSFamily)' == 'rhel'">
94       <PropertyGroup>
95         <PackageRID>$(OSRid)-$(ArchGroup)</PackageRID>
96         <!-- Set the platform part of the RID if we are doing a portable build -->
97         <PackageRID Condition="'$(PortableBuild)' == 'true'">linux-$(ArchGroup)</PackageRID>
98       </PropertyGroup>
99     </When>
100     <Otherwise>
101       <PropertyGroup>
102         <PackageRID>$(RuntimeOS)-$(ArchGroup)</PackageRID>
103         <!-- Set the platform part of the RID if we are doing a portable build -->
104         <PackageRID Condition="'$(PortableBuild)' == 'true'">linux-$(ArchGroup)</PackageRID>
105       </PropertyGroup>
106     </Otherwise>
107   </Choose>
108
109   <!-- Determine per-platform native binary extensions. -->
110   <Choose>
111     <When Condition="'$(_runtimeOSFamily)' == 'win'" />
112     <When Condition="'$(_runtimeOSFamily)' == 'osx'">
113       <PropertyGroup>
114         <LibraryFileExtension>.dylib</LibraryFileExtension>
115         <SymbolFileExtension>.dwarf</SymbolFileExtension>
116       </PropertyGroup>
117     </When>
118     <When Condition="'$(_runtimeOSFamily)' == 'android'">
119       <PropertyGroup>
120         <LibraryFileExtension>.so</LibraryFileExtension>
121         <!--symbols included in .so, like Linux, but can be generated externally and if so, uses .debug ext-->
122         <SymbolFileExtension>.debug</SymbolFileExtension>
123       </PropertyGroup>
124     </When>
125     <Otherwise>
126       <PropertyGroup>
127         <LibraryFileExtension>.so</LibraryFileExtension>
128         <SymbolFileExtension>.dbg</SymbolFileExtension>
129       </PropertyGroup>
130     </Otherwise>
131   </Choose>
132
133   <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Linux;'))">
134     <OfficialBuildRID Include="linux-x64" />
135     <OfficialBuildRID Include="rhel.6-x64" />
136     <OfficialBuildRID Include="linux-arm">
137       <Platform>arm</Platform>
138     </OfficialBuildRID>
139     <OfficialBuildRID Include="linux-arm64">
140       <Platform>arm64</Platform>
141     </OfficialBuildRID>
142     <OfficialBuildRID Include="tizen.4.0.0-armel">
143       <Platform>armel</Platform>
144     </OfficialBuildRID>
145   </ItemGroup>
146   <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';OSX;'))">
147     <OfficialBuildRID Include="osx-x64" />
148   </ItemGroup>
149   <ItemGroup Condition="$(SupportedPackageOSGroups.Contains(';Windows_NT;'))">
150     <OfficialBuildRID Include="win-x86">
151       <Platform>x86</Platform>
152     </OfficialBuildRID>
153     <OfficialBuildRID Include="win-x64" />
154     <OfficialBuildRID Include="win-arm">
155       <Platform>arm</Platform>
156     </OfficialBuildRID>
157     <OfficialBuildRID Include="win-arm64">
158       <Platform>arm64</Platform>
159     </OfficialBuildRID>
160   </ItemGroup>
161   <ItemGroup>
162     <!-- Ensure we have a RID-specific package for the current build, even if it isn't in our official set, but 
163          don't build the RID-specific package if we're in an unsupported os family -->
164     <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
165     <BuildRID Include="$(PackageRID)"
166               Condition="'$(_isSupportedOSGroup)' == 'true'">
167       <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
168       <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
169     </BuildRID>
170   </ItemGroup>
171
172   <ItemGroup>
173     <_project Include="@(BuildRID)">
174       <Platform Condition="'%(Platform)' == ''">amd64</Platform>
175       <PackageTargetRuntime>%(Identity)</PackageTargetRuntime>
176       <AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties>
177     </_project>
178
179     <_buildRidProjects Include="@(_project->'$(MSBuildProjectName).pkgproj')" />
180     <!-- Only include rid projects for a builds file, not for a lineup package -->
181     <Project Condition="'$(IsLineupPackage)' != 'true'" Include="@(_buildRidProjects)" />
182   </ItemGroup>
183
184   <ItemGroup Condition="'$(IsLineupPackage)' == 'true'">
185     <!-- Include project references for a lineup package to generate the runtime.json file -->
186     <ProjectReference Include="@(_buildRidProjects)" />
187   </ItemGroup>
188 </Project>