109 строки
9.0 KiB
XML
109 строки
9.0 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<!-- Default inclusion -->
|
|
|
|
<PropertyGroup>
|
|
<!-- Enable default inclusion behavior unless told otherwise, but default to the value for EnableDefaultItems -->
|
|
<!-- We have a public property for each platform, and unify them into a single private property for our own build logic -->
|
|
<EnableDefaultiOSItems Condition=" '$(_PlatformName)' == 'iOS' And '$(EnableDefaultiOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultiOSItems>
|
|
<EnableDefaulttvOSItems Condition=" '$(_PlatformName)' == 'tvOS' And '$(EnableDefaulttvOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaulttvOSItems>
|
|
<EnableDefaultwatchOSItems Condition=" '$(_PlatformName)' == 'watchOS' And '$(EnableDefaultwatchOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultwatchOSItems>
|
|
<EnableDefaultmacOSItems Condition=" '$(_PlatformName)' == 'macOS' And '$(EnableDefaultmacOSItems)' == '' ">$(EnableDefaultItems)</EnableDefaultmacOSItems>
|
|
<EnableDefaultMacCatalystItems Condition=" '$(_PlatformName)' == 'MacCatalyst' And '$(EnableDefaultMacCatalystItems)' == '' ">$(EnableDefaultItems)</EnableDefaultMacCatalystItems>
|
|
<_EnableDefaultXamarinItems Condition=" '$(_PlatformName)' == 'iOS' ">$(EnableDefaultiOSItems)</_EnableDefaultXamarinItems>
|
|
<_EnableDefaultXamarinItems Condition=" '$(_PlatformName)' == 'tvOS' ">$(EnableDefaulttvOSItems)</_EnableDefaultXamarinItems>
|
|
<_EnableDefaultXamarinItems Condition=" '$(_PlatformName)' == 'watchOS' ">$(EnableDefaultwatchOSItems)</_EnableDefaultXamarinItems>
|
|
<_EnableDefaultXamarinItems Condition=" '$(_PlatformName)' == 'macOS' ">$(EnableDefaultmacOSItems)</_EnableDefaultXamarinItems>
|
|
<_EnableDefaultXamarinItems Condition=" '$(_PlatformName)' == 'MacCatalyst' ">$(EnableDefaultMacCatalystItems)</_EnableDefaultXamarinItems>
|
|
|
|
<!-- Don't include default Compile items for binding projects, because that would pick up ApiDefinition.cs and StructsAndEnums.cs -->
|
|
<EnableDefaultCompileItems Condition=" '$(IsBindingProject)' == 'true' ">false</EnableDefaultCompileItems>
|
|
</PropertyGroup>
|
|
|
|
<!-- Architecture -->
|
|
<!-- If the old-style variables are set, use those -->
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' ">
|
|
<TargetArchitectures Condition=" '$(_PlatformName)' == 'macOS' And '$(XamMacArch)' != '' ">$(XamMacArch)</TargetArchitectures>
|
|
<TargetArchitectures Condition=" '$(_PlatformName)' != 'macOS' And '$(MtouchArch)' != '' ">$(MtouchArch)</TargetArchitectures>
|
|
</PropertyGroup>
|
|
<!-- If the old-style variables aren't set, figure it out using RuntimeIdentifier. -->
|
|
<!-- This is a variation of https://github.com/dotnet/sdk/blob/873d79d861cbd001488414b9875e53acbeaed890/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.RuntimeIdentifierInference.targets#L68-L96 -->
|
|
<!-- This doesn't cover every single possibility (in particular it does not handle ARMv7s, either as a thin or fat option, and the same for ARMv7k), but that can be done by passing /p:TargetArchitectures=ARMv7s to msbuild -->
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' And '$(_PlatformName)' == 'iOS' ">
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-arm64')) Or $(RuntimeIdentifier.Contains('-arm64-')) ">ARM64</TargetArchitectures>
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-x64')) Or $(RuntimeIdentifier.Contains('-x64-')) ">x86_64</TargetArchitectures>
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-x84')) Or $(RuntimeIdentifier.Contains('-x86-')) ">i386</TargetArchitectures>
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-arm')) Or $(RuntimeIdentifier.Contains('-arm-')) ">ARMv7</TargetArchitectures>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' And '$(_PlatformName)' == 'tvOS' ">
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-arm64')) Or $(RuntimeIdentifier.Contains('-arm64-')) ">ARM64</TargetArchitectures>
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-x64')) Or $(RuntimeIdentifier.Contains('-x64-')) ">x86_64</TargetArchitectures>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' And '$(_PlatformName)' == 'watchOS' ">
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-x84')) Or $(RuntimeIdentifier.Contains('-x86-')) ">i386</TargetArchitectures>
|
|
<TargetArchitectures Condition=" $(RuntimeIdentifier.EndsWith('-arm')) Or $(RuntimeIdentifier.Contains('-arm-')) ">ARM64_32</TargetArchitectures>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' And '$(_PlatformName)' == 'macOS' ">
|
|
<TargetArchitectures Condition=" '$(RuntimeIdentifier)' == 'osx-x64' ">x86_64</TargetArchitectures>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition=" '$(TargetArchitectures)' == '' And '$(_PlatformName)' == 'MacCatalyst' ">
|
|
<TargetArchitectures Condition=" '$(RuntimeIdentifier)' == 'maccatalyst-x64' ">x86_64</TargetArchitectures>
|
|
<TargetArchitectures Condition=" '$(RuntimeIdentifier)' == 'maccatalyst-arm64' ">ARM64</TargetArchitectures>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(ComputedPlatform)' == '' And ('$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS') ">
|
|
<ComputedPlatform Condition="$(TargetArchitectures.Contains('i386')) Or $(TargetArchitectures.Contains('x86_64'))">iPhoneSimulator</ComputedPlatform>
|
|
<ComputedPlatform Condition="'$(ComputedPlatform)' == ''">iPhone</ComputedPlatform>
|
|
</PropertyGroup>
|
|
|
|
<!-- Declare the XI/XM framework bundled with this version of the SDK. See Microsoft.NETCoreSdk.BundledVersions.props -->
|
|
<PropertyGroup>
|
|
<!-- Runtime pack identifiers -->
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'iOS' ">ios-x64;ios-arm64;ios-arm;ios-x86</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'tvOS' ">tvos-x64;tvos-arm64</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'watchOS' ">watchos-x86;watchos-x64;watchos-arm</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'macOS' ">osx-x64</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'MacCatalyst' ">maccatalyst-x64;maccatalyst-arm64</_RuntimePackRuntimeIdentifiers>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<KnownFrameworkReference Include="Microsoft.$(_PlatformName)"
|
|
TargetFramework="net6.0"
|
|
RuntimeFrameworkName="Microsoft.$(_PlatformName)"
|
|
DefaultRuntimeFrameworkVersion="$(_ShortPackageVersion)"
|
|
LatestRuntimeFrameworkVersion="$(_ShortPackageVersion)"
|
|
TargetingPackName="Microsoft.$(_PlatformName).Ref"
|
|
TargetingPackVersion="$(_ShortPackageVersion)"
|
|
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
|
|
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
|
|
Profile="$(_PlatformName)"
|
|
IsTrimmable="true"
|
|
/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true'">
|
|
<FrameworkReference Include="Microsoft.$(_PlatformName)" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
|
|
</ItemGroup>
|
|
|
|
<!-- This a workaround until https://github.com/dotnet/runtime/issues/34193 is fixed and a proper solution can be implemented.
|
|
The problem is that by default we get the 'Microsoft.NETCore.App.Runtime.osx-x64' runtime pack (the core clr version), when we want the 'Microsoft.NETCore.App.Mono.Runtime.osx-x64' runtime pack.
|
|
This works around that by declaring a new known framework for mono's runtime pack, removing the default 'Microsoft.NETCore.App' framework reference, and adding the mono one.
|
|
-->
|
|
<ItemGroup Condition="'$(_PlatformName)' == 'macOS'">
|
|
<KnownFrameworkReference Include="Microsoft.NETCore.App.Mono"
|
|
TargetFramework="net6.0"
|
|
RuntimeFrameworkName="Microsoft.NETCore.App.Mono"
|
|
DefaultRuntimeFrameworkVersion="$(BundledNETCorePlatformsPackageVersion)"
|
|
LatestRuntimeFrameworkVersion="$(BundledNETCorePlatformsPackageVersion)"
|
|
TargetingPackName="Microsoft.NETCore.App.Ref"
|
|
TargetingPackVersion="$(BundledNETCorePlatformsPackageVersion)"
|
|
RuntimePackNamePatterns="Microsoft.NETCore.App.Runtime.Mono.**RID**"
|
|
RuntimePackRuntimeIdentifiers="osx-x64"
|
|
IsTrimmable="true"
|
|
/>
|
|
<FrameworkReference Remove="Microsoft.NETCore.App" />
|
|
<FrameworkReference Include="Microsoft.NETCore.App.Mono" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|