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