summaryrefslogtreecommitdiff
path: root/dir.props
blob: 1b3329f8e173a2df39eed0b8101705b0847fed4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Condition="Exists('..\dir.props')" Project="..\dir.props" />

  <!--
    $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
  -->
  <PropertyGroup>
    <OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
    <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
  </PropertyGroup>

  <!-- Set the kind of PDB to Portable and turn on SourceLink (fetching source from GitHub) -->
  <PropertyGroup>
    <DebugType Condition="'$(DebugType)' == ''">Portable</DebugType> 
    <UseSourceLink>true</UseSourceLink>
  </PropertyGroup>

  <!-- Version numbers for both managed & native binaries -->
  <PropertyGroup>
    <MajorVersion>4</MajorVersion>
    <MinorVersion>6</MinorVersion>
  </PropertyGroup>

  <!-- Build Tools Versions -->
  <PropertyGroup>
    <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
    <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
  </PropertyGroup>

  <!--
     Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
     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.
     -->
  <PropertyGroup>
    <RunningOnCore>false</RunningOnCore>
    <RunningOnCore Condition="'$(MSBuildRuntimeType)' == 'Core'">true</RunningOnCore>
    <BuildToolsTargetsDesktop>false</BuildToolsTargetsDesktop>
    <BuildToolsTargetsDesktop Condition="'$(RunningOnCore)' != 'true'">true</BuildToolsTargetsDesktop>
    <BuildToolsTargets45>$(BuildToolsTargetsDesktop)</BuildToolsTargets45>
  </PropertyGroup>

  <!-- Common properties -->
  <PropertyGroup>
    <!-- Set basic properties and normalize -->
    <BuildArch>$(__BuildArch)</BuildArch>
    <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
    <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>

    <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
    <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
    <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
    <BuildType Condition="'$(__BuildType)' == 'checked'">Checked</BuildType>

    <BuildOS>$(__BuildOS)</BuildOS>
    <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>

    <ProjectDir>$(__ProjectDir)\</ProjectDir>
    <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>

    <SourceDir>$(__SourceDir)\</SourceDir>
    <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>

    <!-- This name is used to create a GIT repository URL https://github.com/dotnet/$(GitHubRepositoryName) used to find source code for debugging -->
    <GitHubRepositoryName Condition="'$(GitHubRepositoryName)' == ''">coreclr</GitHubRepositoryName>

    <PackagesDir>$(DotNetRestorePackagesPath)</PackagesDir>
    <PackagesDir Condition="'$(PackagesDir)'=='' and '$(__PackagesDir)'!=''">$(__PackagesDir)\</PackagesDir>
    <PackagesDir Condition="'$(PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>

    <RootBinDir>$(__RootBinDir)\</RootBinDir>
    <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>

    <BinDir>$(__BinDir)\</BinDir>
    <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>

    <__IntermediatesDir Condition="'$(__IntermediatesDir)' == ''">$(RootBinDir)obj\$(BuildOS).$(BuildArch).$(BuildType)</__IntermediatesDir>
    <IntermediateOutputRootPath Condition="'$(IntermediateOutputRootPath)' == ''">$(__IntermediatesDir)\</IntermediateOutputRootPath>

    <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
         fails to write packages to it if the path contains the forward slash.
    -->
    <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
    <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>

    <ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools\</ToolsDir>
    <DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli\</DotnetCliPath>
    <OverrideToolHost>$(DotnetCliPath)dotnet</OverrideToolHost>
    <BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>

    <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
    <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>

    <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
    <Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>

    <!-- Default to portable build if not explicitly set -->
    <PortableBuild Condition="'$(PortableBuild)' == ''">true</PortableBuild>
  </PropertyGroup>

  <!-- Output paths -->
  <PropertyGroup>
    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RootBinDir)obj\</BaseIntermediateOutputPath>
    <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">$(BaseIntermediateOutputPath)$(BuildOS).$(BuildArch).$(BuildType)\$(MSBuildProjectName)</IntermediateOutputPath>
    <OutputPath Condition="'$(OutputPath)' == ''">$(BinDir)</OutputPath>
  </PropertyGroup>

  <!-- Explicitly set BuildVersionFile before importing common. This is used by BuildVersion.targets. -->
  <PropertyGroup Condition="'$(OfficialBuildId)' != ''">
    <BuildVersionFile>$(BaseIntermediateOutputPath)BuildVersion-$(OfficialBuildId).props</BuildVersionFile>
  </PropertyGroup>

  <!-- Import Build tools common props file where repo-independent properties are found -->
  <Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />

  <!-- Setup common target properties that we use to conditionally include sources -->
  <PropertyGroup>
    <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
    <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
    <TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
    <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
    <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>

    <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>

    <!-- We are only tracking Linux Distributions for Nuget RID mapping -->
    <DistroRid Condition="'$(TargetsLinux)' == 'true'">$(__DistroRid)</DistroRid>

  </PropertyGroup>

  <!-- Provides properties for dependency versions and configures dependency verification/auto-upgrade. -->
  <Import Project="$(ProjectDir)dependencies.props" />

  <!-- Packaging properties -->
  <PropertyGroup>
    <LicenseUrl>https://github.com/dotnet/coreclr/blob/master/LICENSE.TXT</LicenseUrl>
    <PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
    <PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
    <PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
    <SyncInfoDirectory>$(BaseIntermediateOutputPath)</SyncInfoDirectory>

    <!-- If true, indicates that this is not an officially supported release -->
    <!-- It is important to flip this to false in official release branches -->
    <!-- Keep it in sync with PRERELEASE in clrdefinitions.cmake -->
    <IsPrerelease>true</IsPrerelease>

    <!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
    <RuntimeIdGraphDefinitionVersion>1.0.2-beta-24224-02</RuntimeIdGraphDefinitionVersion>
    <RuntimeIdGraphDefinitionFile>$(PackagesDir)/microsoft.netcore.platforms/$(RuntimeIdGraphDefinitionVersion)/runtime.json</RuntimeIdGraphDefinitionFile>

    <!-- This link should be updated for each release milestone, currently this points to 1.1.0-beta -->
    <ReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</ReleaseNotes>

    <ProjectUrl>https://dot.net</ProjectUrl>

    <!-- On Windows, MSbuild still runs against Desktop FX while it runs on .NET Core on non-Windows. this requires
         pulling in different packaging dependencies.
     -->
    <PackagingTaskDir Condition="'$(TargetsWindows)' == 'true'">$(ToolsDir)net46/</PackagingTaskDir>
    <!-- defined in buildtools packaging.targets, but we need this before targets are imported -->
    <PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
    <PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
    <MinOSForArch>win7</MinOSForArch>
    <MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
    <MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
    <!-- This property must be set to disable local package installation -->
    <SkipInstallLocallyBuiltPackages>true</SkipInstallLocallyBuiltPackages>

    <!-- Define packaging attributes for cross target components -->
    <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
    <HasCrossTargetComponents Condition="'$(TargetsLinux)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm') and '$(__DoCrossArchBuild)' == '1'">true</HasCrossTargetComponents>
    <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
    <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>

    <PackageOutputPath Condition="'$(PackageOutputPath)' == ''">$(PackagesBinDir)/pkg/</PackageOutputPath>
    <SymbolPackageOutputPath Condition="'$(SymbolPackageOutputPath)' == ''">$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
    <PackageIndexFile>$(MSBuildThisFileDirectory)/src/.nuget/packageIndex.json</PackageIndexFile>

    <!-- coreclr doesn't currently use the index so don't force it to be in sync -->
    <SkipIndexCheck>true</SkipIndexCheck>
  </PropertyGroup>

  <!-- Add required legal files to packages -->
  <ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
    <File Condition="Exists('$(PackageLicenseFile)')"
          Include="$(PackageLicenseFile)" >
      <SkipPackageFileCheck>true</SkipPackageFileCheck>
    </File>
    <File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
          Include="$(PackageThirdPartyNoticesFile)" >
      <SkipPackageFileCheck>true</SkipPackageFileCheck>
    </File>
    <PackageIndex Include="$(PackageIndexFile)" />
  </ItemGroup>

  <!-- Use Roslyn Compilers to build -->
  <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'!='true' and Exists('$(RoslynPropsFile)') and '$(UseRoslynCompilers)'!='false' and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
  <Import Project="$(RoslynPropsFile)" Condition="'$(RunningOnUnix)'=='true' and Exists('$(RoslynPropsFile)') and '$(RoslynIncompatibleMsbuildVersion)' != 'true'" />
</Project>