Skip to content

Commit

Permalink
[Build] Readded support for iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
xen2 committed Nov 18, 2018
1 parent 52728eb commit 8f3e11c
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,22 @@
<RemoveDir Condition="Exists('$(XenkoCompileAssetOutputPath)')" ContinueOnError="true" Directories="$(XenkoCompileAssetOutputPath)"/>
</Target>

<!-- UWP: Compile and Transform Assets into Content during PrepareResources phase -->
<!-- UWP: Adjust Appx folders -->
<PropertyGroup Condition="'$(XenkoIsExecutable)' == 'true' And '$(XenkoPlatform)' == 'UWP'">
<!-- Use OutputPath to define AppxPackage directory -->
<AppxPackageDir>$(OutputPath)\$(AppxPackageDirName)\</AppxPackageDir>
<AppxPackageTestDir>$(AppxPackageDir)Test\</AppxPackageTestDir>
<AppxPackageName>$(AssemblyName)</AppxPackageName>
</PropertyGroup>

<!-- UWP & iOS: Compile and Transform Assets into Content during PrepareResources phase -->
<PropertyGroup Condition="'$(XenkoIsExecutable)' == 'true' And ('$(XenkoPlatform)' == 'UWP' Or '$(XenkoPlatform)' == 'Android')">
<PrepareResourcesDependsOn>
_XenkoDeployAssetsUWP;
_XenkoDeployAssetsAsContent;
$(PrepareResourcesDependsOn)
</PrepareResourcesDependsOn>
</PropertyGroup>
<Target Name="_XenkoDeployAssetsUWP" DependsOnTargets="XenkoCompileAsset">
<Target Name="_XenkoDeployAssetsAsContent" DependsOnTargets="XenkoCompileAsset">
<ItemGroup>
<!-- Define the Assets to deploy -->
<AssetsToDeploy Include="$(XenkoCompileAssetOutputPath)\**\*.*"/>
Expand All @@ -97,3 +101,4 @@
</PropertyGroup>
</Target>
</Project>

10 changes: 10 additions & 0 deletions sources/core/Xenko.Core/build/Xenko.Core.targets
Original file line number Diff line number Diff line change
Expand Up @@ -156,5 +156,15 @@
<AndroidNativeLibrary Include="@(_XenkoDependencyNativeLib)"/>
</ItemGroup>
</Target>
<Target Name="_XenkoSetupNativeLibrariesiOS" DependsOnTargets="_XenkoBuildDependencies" AfterTargets="ResolveAssemblyReferences" Condition=" '$(OutputType)' == 'Exe' And '$(XenkoPlatform)' == 'iOS'">
<ItemGroup>
<NativeReference Include="@(_XenkoDependencyNativeLib)">
<Kind>Static</Kind>
</NativeReference>
</ItemGroup>
<PropertyGroup>
<MtouchExtraArgs>$(MtouchExtraArgs) --compiler=clang -cxx -gcc_flags '-lstdc++ $(MtouchExtraArgsLibs)'</MtouchExtraArgs>
</PropertyGroup>
</Target>

</Project>
2 changes: 1 addition & 1 deletion sources/engine/Xenko.Graphics/Xenko.Graphics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
<PackageReference Include="SharpDX.Direct3D11" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'uap10.0'" />
<PackageReference Include="SharpDX.Direct3D12" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45'" />
<PackageReference Include="SharpDX.D3DCompiler" Version="4.0.1" Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'uap10.0'" />
<PackageReference Include="Xenko.OpenTK" Version="1.0.0" Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'xamarin.ios10' Or '$(TargetFramework)' == 'monoandroid50' Or '$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Xenko.OpenTK" Version="1.0.0" Condition="'$(TargetFramework)' == 'net45' Or '$(TargetFramework)' == 'xamarinios10' Or '$(TargetFramework)' == 'monoandroid50' Or '$(TargetFramework)' == 'netstandard2.0'" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Service References\" />
Expand Down
4 changes: 2 additions & 2 deletions sources/targets/Xenko.Core.GlobalSettings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoRuntime)' == 'true' ">
<XenkoRuntimeTargetFrameworks Condition="'$(XenkoRuntimeTargetFrameworks)' == ''">net45;uap10.0;monoandroid50</XenkoRuntimeTargetFrameworks>
<XenkoRuntimeTargetFrameworks Condition="'$(XenkoRuntimeTargetFrameworks)' == ''">net45;uap10.0;monoandroid50;xamarinios10</XenkoRuntimeTargetFrameworks>
<TargetFrameworks>$(XenkoRuntimeTargetFrameworks)</TargetFrameworks>
<!-- UpToDate check doesn't work with multi-TFM projects! https://github.com/dotnet/project-system/issues/2487 -->
<DisableFastUpToDateCheck Condition="$(TargetFrameworks.Contains(';'))">true</DisableFastUpToDateCheck>
<!--<TargetFrameworks>net45;uap10.0;monoandroid50;xamarin.ios10;netstandard2.0</TargetFrameworks>-->
<!--<TargetFrameworks>net45;uap10.0;monoandroid50;xamarinios10;netstandard2.0</TargetFrameworks>-->
</PropertyGroup>

<PropertyGroup Condition=" '$(XenkoPlatform)' == 'Windows' ">
Expand Down
2 changes: 1 addition & 1 deletion sources/targets/Xenko.Core.PreSettings.targets
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<XenkoPlatform Condition=" '$(TargetFramework)' == 'net45' And $(RuntimeIdentifer.StartsWith('osx')) ">macOS</XenkoPlatform>
<XenkoPlatform Condition=" '$(TargetFramework)' == 'uap10.0' ">UWP</XenkoPlatform>
<XenkoPlatform Condition=" '$(TargetFramework)' == 'monoandroid50' ">Android</XenkoPlatform>
<XenkoPlatform Condition=" '$(TargetFramework)' == 'xamarin.ios10' ">iOS</XenkoPlatform>
<XenkoPlatform Condition=" '$(TargetFramework)' == 'xamarinios10' ">iOS</XenkoPlatform>

<XenkoPlatformFullName Condition="'$(XenkoPlatformFullName)' == ''">$(XenkoPlatform)</XenkoPlatformFullName>

Expand Down

0 comments on commit 8f3e11c

Please sign in to comment.