forked from stride3d/stride
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXenko.iOS.targets
64 lines (56 loc) · 3.55 KB
/
Xenko.iOS.targets
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
60
61
62
63
64
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<XenkoNETFrameworkVersion>v1.0</XenkoNETFrameworkVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.XML" />
<Reference Include="System.XML.Linq" />
</ItemGroup>
<!--
*****************************************************************************************************************************
Handle XenkoEmbedNativeLibrary files
*****************************************************************************************************************************
-->
<PropertyGroup>
<XamarinVersion>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Xamarin\iOS', 'InstalledVersion', '8.2.0', RegistryView.Registry32))</XamarinVersion>
<XamarinIOSMajorVersion>$([System.Text.RegularExpressions.Regex]::Match($(XamarinVersion), `^(\d+)\.(\d+)\.`).get_Groups().get_Item(1).ToString())</XamarinIOSMajorVersion>
<XamarinIOSMinorVersion>$([System.Text.RegularExpressions.Regex]::Match($(XamarinVersion), `^(\d+)\.(\d+)\.`).get_Groups().get_Item(2).ToString())</XamarinIOSMinorVersion>
<!-- Let users add this if they want for now.
<XenkoMTouchExtras>-framework OpenGLES -framework SpriteKit -framework CoreAudio -framework CoreMedia -framework CoreText -framework CoreVideo -framework AudioToolbox -framework MediaPlayer -framework GLKit</XenkoMTouchExtras>
-->
<XenkoMTouchExtras></XenkoMTouchExtras>
</PropertyGroup>
<Target Name="_XenkoSetupNativeLibraries" DependsOnTargets="_XenkoBuildDependencies" AfterTargets="ResolveAssemblyReferences">
<ItemGroup>
<NativeReference Include="@(_XenkoDependencyNativeLib)">
<Kind>Static</Kind>
</NativeReference>
</ItemGroup>
</Target>
<!-- Override PostSettings target CopyXenkoNativeLibraries.
Copy the libcore.a library to the project root directory for future native link. -->
<Target Name="CopyXenkoNativeiOsLibrary" Condition=" '$(XenkoIsExecutable)' == 'true'" DependsOnTargets="_XenkoBuildDependencies" AfterTargets="ResolveAssemblyReferences">
<PropertyGroup Condition=" '$(XenkoPlatform)' == 'iOS' ">
<MtouchExtraArgs>$(MtouchExtraArgs) --compiler=clang -cxx -gcc_flags '-lstdc++ $(MtouchExtraArgsLibs)'</MtouchExtraArgs>
</PropertyGroup>
</Target>
<!-- Deploy assets and native libraries (Xamarin iOS 8.2+ version) -->
<Target Name="DeployAssetsiOS" DependsOnTargets="_GenerateBundleName;XenkoCompileAsset" BeforeTargets="_CollectBundleResources" Condition="'$(XenkoIsExecutable)' == 'true'">
<!-- Add all game data as content on iphone. Note that "Link" doesn't work but Xamarin seems to use a similar "LogicalName" property. -->
<ItemGroup>
<!-- Define the Assets to deploy -->
<AssetsToDeploy Include="$(XenkoCompileAssetOutputPath)\**\*.*"/>
<BundleResource Include="@(AssetsToDeploy)" Condition="$(XamarinIOSMajorVersion) == 8 And $(XamarinIOSMinorVersion) < 10">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<LogicalName>data\%(RecursiveDir)%(Filename)%(Extension)</LogicalName>
<OptimizeImage>False</OptimizeImage>
</BundleResource>
<Content Include="@(AssetsToDeploy)" Condition="($(XamarinIOSMajorVersion) == 8 And $(XamarinIOSMinorVersion) >= 10) Or $(XamarinIOSMajorVersion) >= 9">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>data\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Content>
</ItemGroup>
</Target>
</Project>