summaryrefslogtreecommitdiff
path: root/dir.common.props
blob: 190cf6c6de9e001726a7281e0ce2c05eb0362da1 (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
<Project>

  <!-- This file contains build properties that apply to product
       projects and test projects. It's imported by
       tests/dir.common.props, and the global dir.props. -->

  <PropertyGroup>
    <CoreclrDir>$(MSBuildThisFileDirectory)</CoreclrDir>
    <PackagesDir>$(CoreclrDir)/.packages</PackagesDir>

    <!-- [ARCADE_REMOVE] This property can be removed after build-tools is removed. -->
    <PackageOutputPath>$(PackagesDir)</PackageOutputPath>
  </PropertyGroup>

  <!-- Define NuGet properties for scenarios where they aren't set. From the command line.
       Should match Nuget.config at root. -->
  <PropertyGroup>
    <NuGetPackageRoot>$(PackagesDir)</NuGetPackageRoot>
    <RestorePackagesPath>$(PackagesDir)</RestorePackagesPath>
  </PropertyGroup>

  <!-- Set default Configuration and Platform -->
  <PropertyGroup>
    <BuildArch>$(__BuildArch)</BuildArch>
    <BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
    <BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>

    <BuildType>$(__BuildType)</BuildType>
    <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)' == '' And '$([MSBuild]::IsOSPlatform(Windows))' == 'true'">Windows_NT</BuildOS>
    <BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(Linux))' == 'true'">Linux</BuildOS>
    <BuildOS Condition="'$(__BuildOS)' == '' And '$([MSBuild]::IsOSPlatform(OSX))' == 'true'">OSX</BuildOS>
    <!-- TODO: converge on one property for BuildOS and __BuildOS, and remove this extra line. -->
    <__BuildOS>$(BuildOS)</__BuildOS>

    <Configuration Condition="'$(Configuration)' == ''">$(BuildType)</Configuration>
    <Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>

    <PlatformConfigPathPart>$(BuildOS).$(BuildArch).$(BuildType)</PlatformConfigPathPart>
  </PropertyGroup>
</Project>