forked from ppy/osu-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
osu.Framework.iOS.props
55 lines (55 loc) · 4.31 KB
/
osu.Framework.iOS.props
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
<Project>
<PropertyGroup>
<CodesignKey>iPhone Developer</CodesignKey>
<NullabilityInfoContextSupport>true</NullabilityInfoContextSupport>
<!-- MT7091 occurs when referencing a .framework bundle that consists of a static library.
It only warns about not copying the library to the app bundle to save space,
so there's nothing to be worried about. -->
<NoWarn>$(NoWarn);MT7091</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<!-- On debug configurations, we use Mono interpreter for faster compilation. -->
<UseInterpreter>true</UseInterpreter>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<!-- On release configurations, we use AOT compiler for optimal performance. -->
<UseInterpreter>false</UseInterpreter>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'iPhone'">
<RuntimeIdentifier>ios-arm64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Platform)' == 'iPhoneSimulator'">
<RuntimeIdentifiers>iossimulator-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bass.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bass_fx.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bassmix.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavcodec.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavdevice.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavformat.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavutil.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libswresample.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libswscale.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
<NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\metal-mono-workaround.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" />
</ItemGroup>
<!-- Veldrid references libraries which cannot be AOT'd on iOS, replace them with stub assemblies.
See: https://github.com/mellinoe/veldrid/issues/472#issuecomment-1356461410 -->
<Target Name="OsuFrameworkIOSCopyStubAssemblies" BeforeTargets="_AOTCompile">
<ItemGroup>
<StubFiles Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\stubs\*" />
</ItemGroup>
<Copy Condition="'$(Platform)' == 'AnyCPU'" SourceFiles="@(StubFiles)" DestinationFolder="obj\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\linked\" />
<Copy Condition="'$(Platform)' != 'AnyCPU'" SourceFiles="@(StubFiles)" DestinationFolder="obj\$(Platform)\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\linked\" />
</Target>
<!-- OpenTabletDriver contains P/Invokes to the "Quartz" framework for native macOS code.
This leads iOS linker into attempting to include that framework, despite not existing on such platform.
See: https://github.com/OpenTabletDriver/OpenTabletDriver/issues/2524 / https://github.com/xamarin/xamarin-macios/issues/15118#issuecomment-1141893683 -->
<!-- There's also P/Invokes for "ApplicationServices" framework somewhere in the referenced libraries... -->
<Target Name="OsuFrameworkIOSRemoveMacOSFrameworks" BeforeTargets="_ComputeLinkNativeExecutableInputs" AfterTargets="_LoadLinkerOutput">
<ItemGroup>
<_LinkerFrameworks Remove="Quartz"/>
<_LinkerFrameworks Remove="ApplicationServices"/>
</ItemGroup>
</Target>
</Project>