104 строки
7.6 KiB
XML
104 строки
7.6 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>
|
|
|
|
<!-- 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>
|
|
|
|
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_PlatformName)' != 'macOS'">true</UseMonoRuntime>
|
|
<UseMonoRuntime Condition=" '$(UseMonoRuntime)' == '' And '$(_PlatformName)' == 'macOS'">false</UseMonoRuntime>
|
|
</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. -->
|
|
<PropertyGroup Condition="'$(RuntimeIdentifiers)' != '' And '$(RuntimeIdentifier)' != '' ">
|
|
<!-- Check if both RuntimeIdentifier and RuntimeIdentifiers are set, in which case we clear RuntimeIdentifier -->
|
|
<!-- Also set a variable that says if this happens, so that we can show a warning later -->
|
|
<_RuntimeIdentifiersClashMessage>Both RuntimeIdentifier and RuntimeIdentifiers are set. The value for RuntimeIdentifier will be ignored.</_RuntimeIdentifiersClashMessage>
|
|
<!-- Clear RuntimeIdentifier -->
|
|
<RuntimeIdentifier />
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<_ComputeTargetArchitecturesDependsOn>
|
|
$(_ComputeTargetArchitecturesDependsOn);
|
|
_MapRuntimeIdentifierToTargetArchitecture
|
|
</_ComputeTargetArchitecturesDependsOn>
|
|
</PropertyGroup>
|
|
|
|
<!-- Map RuntimeIdentifier(s) to TargetArchitectures, which is what our old targets and tasks expect -->
|
|
<!-- 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 -->
|
|
<Target Name="_MapRuntimeIdentifierToTargetArchitecture" Condition="'$(TargetArchitectures)' == ''">
|
|
<ItemGroup>
|
|
<!-- Convert RuntimeIdentifiers (a property) to an item group -->
|
|
<_RuntimeIdentifierWithTargetArchitecture Include="$(RuntimeIdentifiers);$(RuntimeIdentifier)" />
|
|
<!-- map the runtime identifier to a target architecture -->
|
|
<_RuntimeIdentifierWithTargetArchitecture Update="@(_RuntimeIdentifierWithTargetArchitecture)">
|
|
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-arm64')) ">ARM64</TargetArchitecture>
|
|
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-arm')) ">ARMv7</TargetArchitecture>
|
|
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-x64')) ">x86_64</TargetArchitecture>
|
|
<TargetArchitecture Condition=" $([System.String]::Copy('%(Identity)').EndsWith('-x86')) ">i386</TargetArchitecture>
|
|
</_RuntimeIdentifierWithTargetArchitecture>
|
|
<_RuntimeIdentifiersWithoutTargetArchitecture Include="@(_RuntimeIdentifierWithTargetArchitecture)" Condition="'%(_RuntimeIdentifierWithTargetArchitecture.TargetArchitecture)' == ''" />
|
|
</ItemGroup>
|
|
<Error Condition="@(_RuntimeIdentifiersWithoutTargetArchitecture->Count()) != 0" Text="Unable to map the following RuntimeIdentifier values to a target architecture: @(_RuntimeIdentifiersWithoutTargetArchitecture)" />
|
|
<!-- Map the item group of runtime identifiers into the TargetArchitectures property -->
|
|
<PropertyGroup>
|
|
<TargetArchitectures>@(_RuntimeIdentifierWithTargetArchitecture -> '%(TargetArchitecture)', ', ')</TargetArchitectures>
|
|
</PropertyGroup>
|
|
</Target>
|
|
|
|
<PropertyGroup Condition="'$(ComputedPlatform)' == '' And ('$(_PlatformName)' == 'iOS' Or '$(_PlatformName)' == 'tvOS' Or '$(_PlatformName)' == 'watchOS') ">
|
|
<ComputedPlatform Condition="$(RuntimeIdentifier.Contains('simulator')) Or $(RuntimeIdentifiers.Contains('simulator'))">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' ">iossimulator-x64;ios-arm64;ios-arm;iossimulator-x86</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'tvOS' ">tvossimulator-x64;tvos-arm64</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'watchOS' ">watchos-x86;watchos-x64;watchos-arm</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'macOS' ">osx-x64;osx-arm64</_RuntimePackRuntimeIdentifiers>
|
|
<_RuntimePackRuntimeIdentifiers Condition=" '$(_PlatformName)' == 'MacCatalyst' ">maccatalyst-x64;maccatalyst-arm64</_RuntimePackRuntimeIdentifiers>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<_RuntimeFrameworkVersion>$(BundledNETCorePlatformsPackageVersion)</_RuntimeFrameworkVersion>
|
|
<_RuntimeFrameworkVersion Condition="'$(CUSTOM_DOTNET_VERSION)' != ''">$(CUSTOM_DOTNET_VERSION)</_RuntimeFrameworkVersion>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<KnownFrameworkReference Include="Microsoft.$(_PlatformName)"
|
|
TargetFramework="net6.0"
|
|
RuntimeFrameworkName="Microsoft.$(_PlatformName)"
|
|
DefaultRuntimeFrameworkVersion="**FromWorkload**"
|
|
LatestRuntimeFrameworkVersion="**FromWorkload**"
|
|
TargetingPackName="Microsoft.$(_PlatformName).Ref"
|
|
TargetingPackVersion="**FromWorkload**"
|
|
RuntimePackNamePatterns="Microsoft.$(_PlatformName).Runtime.**RID**"
|
|
RuntimePackRuntimeIdentifiers="$(_RuntimePackRuntimeIdentifiers)"
|
|
Profile="$(_PlatformName)"
|
|
/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="'$(DisableImplicitFrameworkReferences)' != 'true'">
|
|
<FrameworkReference Include="Microsoft.$(_PlatformName)" IsImplicitlyDefined="true" Pack="false" PrivateAssets="All" />
|
|
</ItemGroup>
|
|
|
|
</Project>
|