You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
5.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- if ShouldIncludeNativeHarfBuzzSharp == False then don't include the native libHarfBuzzSharp -->
<PropertyGroup>
<ShouldIncludeNativeHarfBuzzSharp Condition=" '$(ShouldIncludeNativeHarfBuzzSharp)' == '' ">True</ShouldIncludeNativeHarfBuzzSharp>
<_AppIsFullMac Condition=" '$(XamarinMacFrameworkRoot)' != '' and '$(TargetFrameworkIdentifier)' != 'Xamarin.Mac' and '$(UseXamMacFullFramework)' == 'True' and ('$(OutputType)' == 'Exe' or '$(IsAppExtension)' == 'True') ">True</_AppIsFullMac>
</PropertyGroup>
<!-- get the preferred architecture -->
<PropertyGroup>
<!-- handle VS 2017 live unit testing -->
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and '$(BuildingForLiveUnitTesting)' == 'true' and '$(PlatformTarget)' == '' ">x86</PreferredNativeHarfBuzzSharp>
<!-- handle x86/x64 specifically -->
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and ( '$(PlatformTarget)' == 'x64' or '$(PlatformTarget)' == 'x86' ) ">$(PlatformTarget)</PreferredNativeHarfBuzzSharp>
<!-- handle Any CPU, considering Prefer32Bit - but only on Windows as macOS and Linux ignore this flag -->
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and '$(OS)' != 'Unix' and '$(Prefer32Bit)' == 'False' ">x64</PreferredNativeHarfBuzzSharp>
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and '$(OS)' != 'Unix' and '$(Prefer32Bit)' == 'True' ">x86</PreferredNativeHarfBuzzSharp>
<!-- fall back to x64 on 64-bit machines -->
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and '$(MSBuildRuntimeType)' != 'Core' and '$([System.Environment]::Is64BitOperatingSystem)' == 'True' ">x64</PreferredNativeHarfBuzzSharp>
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' and '$(MSBuildRuntimeType)' == 'Core' and '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64' ">x64</PreferredNativeHarfBuzzSharp>
<!-- fall back to x86 -->
<PreferredNativeHarfBuzzSharp Condition=" '$(PreferredNativeHarfBuzzSharp)' == '' ">x86</PreferredNativeHarfBuzzSharp>
</PropertyGroup>
<!-- handle the case where this is a Xamarin.Mac Full app/extension -->
<ItemGroup Condition=" '$(ShouldIncludeNativeHarfBuzzSharp)' != 'False' and '$(_AppIsFullMac)' == 'True' ">
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx\native\libHarfBuzzSharp*.dylib" Kind="Dynamic" Visible="false" />
</ItemGroup>
<!-- copy the native files to the output directory -->
<ItemGroup Condition=" '$(ShouldIncludeNativeHarfBuzzSharp)' != 'False' and '$(_AppIsFullMac)' != 'True' ">
<!-- preferred -->
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-$(PreferredNativeHarfBuzzSharp)\native\libHarfBuzzSharp*.dll" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-$(PreferredNativeHarfBuzzSharp)\native\libHarfBuzzSharp*.so" />
<!-- Windows -->
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x86\native\libHarfBuzzSharp*.dll" Dir="x86\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-x64\native\libHarfBuzzSharp*.dll" Dir="x64\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\win-arm64\native\libHarfBuzzSharp*.dll" Dir="arm64\" />
<!-- Linux -->
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x86\native\libHarfBuzzSharp*.so" Dir="x86\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-x64\native\libHarfBuzzSharp*.so" Dir="x64\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-arm\native\libHarfBuzzSharp*.so" Dir="arm\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-arm64\native\libHarfBuzzSharp*.so" Dir="arm64\" />
<!-- Linux: Musl -->
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-musl-x86\native\libHarfBuzzSharp*.so" Dir="x86\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-musl-x64\native\libHarfBuzzSharp*.so" Dir="x64\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-musl-arm\native\libHarfBuzzSharp*.so" Dir="arm\" />
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\linux-musl-arm64\native\libHarfBuzzSharp*.so" Dir="arm64\" />
<!-- macOS -->
<_NativeHarfBuzzSharpFile Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx\native\libHarfBuzzSharp*.dylib" />
<!-- include everything -->
<Content Include="@(_NativeHarfBuzzSharpFile)" Link="%(Dir)%(Filename)%(Extension)" Visible="False" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
</Project>