Merge pull request #11215 from wtgodbe/ActuallyDoCrossgen
[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
4   <!--
5     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
6   -->
7   <PropertyGroup>
8     <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
9     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
10   </PropertyGroup>
11
12   <!-- Version numbers for both managed & native binaries -->
13   <PropertyGroup>
14     <MajorVersion>4</MajorVersion>
15     <MinorVersion>6</MinorVersion>
16   </PropertyGroup>
17
18   <!-- Build Tools Versions -->
19   <PropertyGroup>
20     <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
21     <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
22   </PropertyGroup>
23
24   <!--
25      Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
26      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.
27      -->
28   <PropertyGroup>
29     <BuildToolsTargets45>true</BuildToolsTargets45>
30   </PropertyGroup>
31
32   <!-- Common properties -->
33   <PropertyGroup>
34     <!-- Set basic properties and normalize -->
35     <BuildArch>$(__BuildArch)</BuildArch>
36     <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
37     <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
38
39     <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
40     <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
41     <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
42     <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>
43
44     <BuildOS>$(__BuildOS)</BuildOS>
45     <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
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     <PackagesDir>$(__PackagesDir)\</PackagesDir>
54     <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
55
56     <RootBinDir>$(__RootBinDir)\</RootBinDir>
57     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
58
59     <BinDir>$(__BinDir)\</BinDir>
60     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
61     
62     <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
63     <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>
64
65     <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
66          fails to write packages to it if the path contains the forward slash.
67     -->
68     <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
69     <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
70
71     <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
72     <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
73     <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
74     <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
75
76     <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
77     <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
78
79     <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
80     <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
81   </PropertyGroup>
82
83   <!-- Output paths -->
84   <PropertyGroup>
85     <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
86     <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
87     <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
88   </PropertyGroup>
89
90   <Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
91
92   <!-- Import Build tools common props file where repo-independent properties are found -->
93   <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
94
95
96   <!-- Common nuget properties -->
97   <PropertyGroup>
98     <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
99     <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
100     <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
101
102     <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
103     <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
104     <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
105          the path. -->
106     <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
107     <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
108     <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
109     <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
110   </PropertyGroup>
111
112   <PropertyGroup>
113     <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
114     <DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
115
116     <DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
117     <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
118     <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
119   </PropertyGroup>
120
121   <!-- Setup common target properties that we use to conditionally include sources -->
122   <PropertyGroup>
123     <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
124     <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
125     <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
126     <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
127     <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
128
129     <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
130
131     <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
132     <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>
133
134   </PropertyGroup>
135
136   <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
137   <Import Project="$(ProjectDir)dependencies.props" />
138
139   <!-- Packaging properties -->
140   <PropertyGroup>
141     <PreReleaseLabel>preview2</PreReleaseLabel>
142     <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
143     <PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
144     <PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
145
146     <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
147     <RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.2-beta-24224-02/runtime.json</RuntimeIdGraphDefinitionFile>
148
149     <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
150     <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>
151
152     <ProjectUrl>https://dot.net</ProjectUrl>
153
154     <!-- Central place to set the versions of all nuget packages produced in the repo -->
155     <PackageVersion Condition="'$(PackageVersion)' == ''">2.0.0</PackageVersion>
156     
157     <!-- Set the boolean below to true to generate packages with stabilized versions -->
158     <StabilizePackageVersion Condition="'$(StabilizePackageVersion)' == ''">false</StabilizePackageVersion>
159     <StableVersion Condition="'$(StabilizePackageVersion)' == 'true' and '$(StableVersion)' == ''">$(PackageVersion)</StableVersion>
160     
161     <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
162          pulling in different packaging dependencies.
163      -->
164     <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
165     <BuildNumberMajor Condition="'$(BuildNumberMajor)' == ''">00001</BuildNumberMajor>
166     <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
167     <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
168     <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
169     <MinOSForArch>win7</MinOSForArch>
170     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
171     <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
172         <!-- This property must be set to disable local package installation -->
173     <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>
174
175     <!-- Define packaging attributes for cross target components -->
176     <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
177     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
178     <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
179
180     <PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
181     <SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
182     <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>
183
184     <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
185     <SkipIndexCheck>true</SkipIndexCheck>
186   </PropertyGroup>
187
188   <!-- Add required legal files to packages -->
189   <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
190     <File Condition="Exists('$(PackageLicenseFile)')"
191           Include="$(PackageLicenseFile)" >
192       <SkipPackageFileCheck>true</SkipPackageFileCheck>
193     </File>
194     <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
195           Include="$(PackageThirdPartyNoticesFile)" >
196       <SkipPackageFileCheck>true</SkipPackageFileCheck>
197     </File>
198     <PackageIndex Include="$(PackageIndexFile)" />
199   </ItemGroup>
200
201   <!-- Use Roslyn Compilers to build -->
202   <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false'" />
203   <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)')" />
204 </Project>