Merge branch 'release/3.0' into merge/master-to-release/3.0
[platform/upstream/coreclr.git] / dir.props
1 <?xml version="1.0" encoding="utf-8"?>
2 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   <Import Condition="Exists('..\dir.props')" Project="..\dir.props" />
4
5   <Import Project="dir.common.props" />
6
7   <PropertyGroup>
8     <LangVersion>8.0</LangVersion>
9     <UseSharedCompilation>true</UseSharedCompilation>
10   </PropertyGroup>
11   
12   <!--
13     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
14   -->
15   <PropertyGroup>
16     <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
17     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
18   </PropertyGroup>
19
20   <!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
21   <PropertyGroup>
22     <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> 
23     <UseSourceLink>true</UseSourceLink>
24   </PropertyGroup>
25
26   <!-- Version numbers for both managed & native binaries -->
27   <PropertyGroup>
28     <MajorVersion>4</MajorVersion>
29     <MinorVersion>6</MinorVersion>
30   </PropertyGroup>
31
32   <!--
33      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
34      as well as running the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
35      -->
36   <PropertyGroup>
37     <RunningOnCore>false</RunningOnCore>
38     <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'core'">true</RunningOnCore>
39     <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
40     <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
41     <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
42   </PropertyGroup>
43
44   <!-- Common properties -->
45   <PropertyGroup>
46
47     <ProjectDir>$(__ProjectDir)\</ProjectDir>
48     <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
49
50     <SourceDir>$(__SourceDir)\</SourceDir>
51     <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
52
53     <!-- This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
54     <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>
55
56     <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
57     <PackagesDir Condition="'$(PackagesDir)'=='' and '$(__PackagesDir)'!=''">$(__PackagesDir)\</PackagesDir>
58     <PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
59
60     <RootBinDir>$(__RootBinDir)\</RootBinDir>
61     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
62
63     <BinDir>$(__BinDir)\</BinDir>
64     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
65
66     <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
67     <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
68
69     <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
70          fails to write packages to it if the path contains the forward slash.
71     -->
72     <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
73     <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
74
75     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
76     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ProjectDir).dotnet\</DotnetCliPath>
77     <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
78     <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
79
80     <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
81     <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
82
83     <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
84     <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
85
86     <!-- Default to portable build if not explicitly set -->
87     <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
88
89     <OverrideRestoreOutputPath>true</OverrideRestoreOutputPath>
90   </PropertyGroup>
91
92   <!-- Output paths -->
93   <PropertyGroup>
94     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
95     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
96     <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
97   </PropertyGroup>
98
99   <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
100   <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
101     <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
102   </PropertyGroup>
103
104   <!-- Import Build tools common props file where repo-independent properties are found -->
105   <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
106
107   <!-- Setup common target properties that we use to conditionally include sources -->
108   <PropertyGroup>
109     <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
110     <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
111     <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
112     <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
113     <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
114
115     <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
116
117     <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
118     <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
119
120   </PropertyGroup>
121
122   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
123   <Import Project="$(ProjectDir)dependencies.props" />
124
125   <!-- Packaging properties -->
126   <PropertyGroup>
127     <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
128     <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
129     <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
130     <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
131     <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>
132
133     <!-- If true, indicates that this is not an officially supported release -->
134     <!-- It is important to flip this to false in official release branches -->
135     <!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake -->
136     <IsPrerelease>false</IsPrerelease>
137
138     <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
139     <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
140     <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>
141
142     <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
143     <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
144
145     <ProjectUrl>https://dot.net</ProjectUrl>
146
147     <!-- On Windows, MSbuild can still run against Desktop FX while it runs on .NET Core on non-Windows. this requires
148          pulling in different packaging dependencies.
149      -->
150     <PackagingTaskDir Condition="'$(MSBuildRuntimeType)' != 'core'">$(ToolsDir)net46/</PackagingTaskDir>
151     <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
152     <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
153     <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
154     <MinOSForArch>win7</MinOSForArch>
155     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
156     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
157     <!-- This property must be set to disable local package installation -->
158     <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
159
160     <!-- Define packaging attributes for cross target components -->
161     <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
162     <HasCrossTargetComponents Condition="'$(TargetsLinux)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm') and '$(__DoCrossArchBuild)' == '1'">true</HasCrossTargetComponents>
163     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
164     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsWindows)' == 'true'">x86</CrossTargetComponentFolder>
165     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm' and '$(TargetsLinux)' == 'true'">x64</CrossTargetComponentFolder>
166
167     <PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(PackagesBinDir)/pkg/</PackageOutputPath>
168     <SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)' == ''">$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
169     <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
170
171     <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
172     <SkipIndexCheck>true</SkipIndexCheck>
173   </PropertyGroup>
174
175   <!-- Add required legal files to packages -->
176   <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
177     <File Condition="Exists('$(PackageLicenseFile)')"
178           Include="$(PackageLicenseFile)" >
179       <SkipPackageFileCheck>true</SkipPackageFileCheck>
180     </File>
181     <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
182           Include="$(PackageThirdPartyNoticesFile)" >
183       <SkipPackageFileCheck>true</SkipPackageFileCheck>
184     </File>
185     <PackageIndex Include="$(PackageIndexFile)" />
186   </ItemGroup>
187
188   <!-- Use Roslyn Compilers to build -->
189   <Import Project="$(RoslynPropsFile)" Condition="Exists('$(RoslynPropsFile)')" />
190 </Project>