Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dir.props « pkg - github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0e27f9cdcb5a75f0112d3fd985c4fd43acd58484 (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
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\dir.props" />

  <PropertyGroup>
    <_runtimeOSVersionIndex>$(RuntimeOS.IndexOfAny(".-0123456789"))</_runtimeOSVersionIndex>
    <_runtimeOSFamily Condition="'$(_runtimeOSVersionIndex)' != '-1'">$(RuntimeOS.SubString(0, $(_runtimeOSVersionIndex)))</_runtimeOSFamily>
  </PropertyGroup>

  <!-- Packages opt-in to automatic RID-specific builds by placing a *.RID.props next to their project
       that defines the following:
       PackageRID property: the RID which we should be building for
       OfficialBuildRID item: all RIDs targeted by the package -->
  <Import Project="$(MSBuildProjectDirectory)\*.rids.props" />

  <!-- create the "BuildRID" item which is the set of all supported RIDs, with metadata.
       We'll add a RID for the current platform even if it isn't in the officially supported set -->
  <ItemGroup>
    <BuildRID Include="@(OfficialBuildRID)" Exclude="$(PackageRID)"/>
    <BuildRID Include="$(PackageRID)">
      <Platform Condition="'$(ArchGroup)' == 'x64'">amd64</Platform>
      <Platform Condition="'$(ArchGroup)' != 'x64'">$(ArchGroup)</Platform>
    </BuildRID>
  </ItemGroup>

  <!-- create the "Project" item which is the current $(MSBuildProjectName).pkgproj with meta-data for all 
       supported RIDs -->
  <ItemGroup>
    <_project Include="@(BuildRID)">
      <Platform Condition="'%(Platform)' == ''">amd64</Platform>
      <PackageTargetRuntime>%(Identity)</PackageTargetRuntime>
      <AdditionalProperties>PackageTargetRuntime=%(Identity);Platform=%(Platform)</AdditionalProperties>
    </_project>

    <Project Include="@(_project->'$(MSBuildProjectName).pkgproj')" />
  </ItemGroup>

  <!-- Add path globs specific to native binaries to exclude unnecessary files from packages. -->
  <Choose>
    <When Condition="$(PackageTargetRuntime.StartsWith('win'))"/>
    <When Condition="$(PackageTargetRuntime.StartsWith('osx'))">
      <PropertyGroup>
        <LibraryFileExtension>.dylib</LibraryFileExtension>
        <SymbolFileExtension>.dwarf</SymbolFileExtension>
      </PropertyGroup>
    </When>
    <Otherwise>
      <PropertyGroup>
        <LibraryFileExtension>.so</LibraryFileExtension>
        <SymbolFileExtension>.dbg</SymbolFileExtension>
      </PropertyGroup>
    </Otherwise>
  </Choose>
  <ItemGroup>
    <AdditionalLibPackageExcludes Condition="'$(SymbolFileExtension)' != ''" Include="%2A%2A\%2A$(SymbolFileExtension)" />
    <AdditionalSymbolPackageExcludes Condition="'$(LibraryFileExtension)' != ''" Include="%2A%2A\%2A.a;%2A%2A\%2A$(LibraryFileExtension)" />
  </ItemGroup>
  
</Project>