Merge pull request #1405 from ellismg/build-mscorlib-on-linux
[platform/upstream/coreclr.git] / dir.props
1 <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2
3   <!--
4     $(OS) is set to Unix/Windows_NT. This comes from an environment variable on Windows and MSBuild on Unix.
5   -->
6   <PropertyGroup>
7     <OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
8   </PropertyGroup>
9   
10   <!-- Build Tools Versions -->
11   <PropertyGroup>
12     <BuildToolsVersion>1.0.25-prerelease-00056</BuildToolsVersion>
13     <BuildToolsCoreCLRVersion>1.0.3-prerelease</BuildToolsCoreCLRVersion>
14     <DnxVersion Condition="'$(OsEnvironment)'!='Unix'">1.0.0-beta5-12101</DnxVersion>
15     <DnxVersion Condition="'$(OsEnvironment)'=='Unix'">1.0.0-beta5-12101</DnxVersion>
16     <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'!='Unix'">dnx-coreclr-win-x86.$(DnxVersion)</DnxPackageName>
17     <DnxPackageName Condition="'$(DnxPackageName)' == '' and '$(OsEnvironment)'=='Unix'">dnx-mono.$(DnxVersion)</DnxPackageName>
18     <RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
19     <RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
20     <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
21     <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
22   </PropertyGroup>
23   
24   <!-- Common properties -->
25   <PropertyGroup>
26     <!-- Set basic properties and normalize -->
27     
28     <BuildArch>$(__BuildArch)</BuildArch>
29     <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
30     <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
31
32     <BuildType Condition="'$(__BuildType)'==''">Debug</BuildType>
33     <BuildType Condition="'$(__BuildType)' == 'debug'">Debug</BuildType>
34     <BuildType Condition="'$(__BuildType)' == 'release'">Release</BuildType>
35     
36     <BuildOS>$(__BuildOS)</BuildOS>
37     <BuildOS Condition="'$(__BuildOS)' == ''">Windows_NT</BuildOS>
38
39     <ProjectDir>$(__ProjectDir)\</ProjectDir>
40     <ProjectDir Condition="'$(__ProjectDir)'==''">$(MSBuildThisFileDirectory)</ProjectDir>
41
42     <SourceDir>$(__SourceDir)\</SourceDir>
43     <SourceDir Condition="'$(__SourceDir)'==''">$(ProjectDir)src\</SourceDir>
44
45     <PackagesDir>$(__PackagesDir)\</PackagesDir>
46     <PackagesDir Condition="'$(__PackagesDir)'==''">$(ProjectDir)packages\</PackagesDir>
47
48     <RootBinDir>$(__RootBinDir)\</RootBinDir>
49     <RootBinDir Condition="'$(__RootBinDir)'==''">$(ProjectDir)bin\</RootBinDir>
50
51     <BinDir>$(__BinDir)\</BinDir>
52     <BinDir Condition="'$(__BinDir)'==''">$(RootBinDir)Product\$(BuildOS).$(BuildArch).$(BuildType)\</BinDir>
53
54     <!-- We don't append back slash because this path is used by nuget.exe as output directory and it
55          fails to write packages to it if the path contains the forward slash.
56     -->
57     <PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
58     <PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget</PackagesBinDir>
59     
60     <ToolsDir Condition="'$(ToolsDir)'==''">$(PackagesDir)Microsoft.DotNet.BuildTools.$(BuildToolsVersion)/lib/</ToolsDir>
61     <!-- Directory for the CoreCLR tools (BCLRewriter, etc.) -->
62     <CoreCLRToolsDir>$(PackagesDir)Microsoft.DotNet.BuildTools.CoreCLR.$(BuildToolsCoreCLRVersion)/</CoreCLRToolsDir>
63     
64     <TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
65     <TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
66   </PropertyGroup>
67   
68   <!-- Common nuget properties -->
69   <PropertyGroup>
70     <NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
71     <NuGetConfigFile Condition="'$(NuGetConfigFile)'==''">$(SourceDir)NuGet.Config</NuGetConfigFile>
72     <NuGetConfigCommandLine>-ConfigFile "$(NuGetConfigFile)"</NuGetConfigCommandLine>
73
74     <NugetRestoreCommand>"$(NuGetToolPath)"</NugetRestoreCommand>
75     <NugetRestoreCommand>$(NugetRestoreCommand) install</NugetRestoreCommand>
76     <!-- Trim off the last slash so that nuget doesn't get confused and say there are illegal characters on
77          the path. -->
78     <NugetRestoreCommand>$(NugetRestoreCommand) -OutputDirectory "$(PackagesDir.TrimEnd('\\'))"</NugetRestoreCommand>
79     <NugetRestoreCommand>$(NugetRestoreCommand) $(NuGetConfigCommandLine)</NugetRestoreCommand>
80     <NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
81     <NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
82   </PropertyGroup>
83   
84   <PropertyGroup>
85     <DnxPackageDir Condition="'$(DnxPackageDir)'==''">$(PackagesDir)/$(DnxPackageName)/</DnxPackageDir>
86     <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'!='Unix'">$(DnxPackageDir)\bin\dnu.cmd</DnuToolPath>
87     <DnuToolPath Condition="'$(DnuToolPath)'=='' and '$(OsEnvironment)'=='Unix'">$(DnxPackageDir)/bin/dnu</DnuToolPath>
88
89     <DnuRestoreCommand>"$(DnuToolPath)"</DnuRestoreCommand>
90     <DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
91     <DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
92     <DnuRestoreCommand Condition="'$(LockDependencies)' == 'true'">$(DnuRestoreCommand) --lock</DnuRestoreCommand>
93   </PropertyGroup>
94   
95   <!-- Common build tool properties -->
96   <!-- <PropertyGroup>
97     <BuildToolsCoreCLRPackageName>Microsoft.DotNet.BuildTools.CoreCLR</BuildToolsCoreCLRPackageName>
98     <BuildToolsCoreCLRVersion>1.0.2-prerelease</BuildToolsCoreCLRVersion>
99     <BuildToolsCoreCLRLocation>$(ToolsDir)$(BuildToolsCoreCLRPackageName).$(BuildToolsCoreCLRVersion)</BuildToolsCoreCLRLocation>
100   </PropertyGroup> -->
101
102   <!-- Setup Nuget properties -->
103   <ItemGroup>
104     <NuSpecSrcs Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.nuspec" />
105     <NuSpecSrcs Condition="'$(Configuration)'=='Release'" Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.Development.nuspec" />
106     <NuSpecSrcs Condition="'$(Configuration)'=='Debug'" Include="$(SourceDir)\.nuget\Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" />
107   </ItemGroup>
108   <ItemGroup>
109     <!-- Backslash appended, see note in dir.props about the PackagesBinDir property -->
110     <NuSpecs Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.nuspec" />
111     <NuSpecs Condition="'$(Configuration)'=='Release'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Development.nuspec" />
112     <NuSpecs Condition="'$(Configuration)'=='Debug'" Include="$(PackagesBinDir)\Microsoft.DotNet.CoreCLR.Debug.Development.nuspec" />
113   </ItemGroup>
114
115   <!--
116     Set up Roslyn predefines
117   -->
118   <PropertyGroup>
119     <RoslynPackageDir>$(PackagesDir)/$(RoslynPackageName).$(RoslynVersion)/</RoslynPackageDir>
120     <RoslynPropsFile>$(RoslynPackageDir)build/Microsoft.Net.ToolsetCompilers.props</RoslynPropsFile>
121   </PropertyGroup>
122
123   <!-- Setup common target properties that we use to conditionally include sources -->
124   <PropertyGroup>
125     <TargetsFreeBSD Condition="'$(BuildOS)' == 'FreeBSD'">true</TargetsFreeBSD>
126     <TargetsLinux Condition="'$(BuildOS)' == 'Linux'">true</TargetsLinux>
127     <TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
128     <TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
129     
130     <TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
131   </PropertyGroup>
132 </Project>