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