forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure libextension-dotnet.a is built for MacCatalyst, and we have th…
…e right targets in place.
- Loading branch information
1 parent
d49549e
commit 3d36e8a
Showing
6 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
msbuild/Xamarin.iOS.Tasks/Xamarin.MacCatalyst.AppExtension.CSharp.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<!-- | ||
*********************************************************************************************** | ||
Xamarin.MacCatalyst.AppExtension.CSharp.targets | ||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
created a backup copy. Incorrect changes to this file will make it | ||
impossible to load or build your projects from the command-line or the IDE. | ||
This file imports the version- and platform-specific targets for the project importing | ||
this file. This file also defines targets to produce an error if the specified targets | ||
file does not exist, but the project is built anyway (command-line or IDE build). | ||
Copyright (C) 2014-2016 Xamarin. All rights reserved. | ||
*********************************************************************************************** | ||
--> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/> | ||
|
||
<PropertyGroup> | ||
<!-- Version/fx properties --> | ||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">Xamarin.MacCatalyst</TargetFrameworkIdentifier> | ||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v1.0</TargetFrameworkVersion> | ||
|
||
<!-- This must be set before importing Microsoft.CSharp.targets --> | ||
<!-- | ||
In Xamarin.iOS.Common.targets, just before the _CompileToNative target, we modify the | ||
mtouch references to ensure that we get the lib assemblies for nugets, and not the ref references: | ||
https://github.com/xamarin/xamarin-macios/blob/9e31d07ecc08a64372dd562e843c3d8950d24985/msbuild/Xamarin.iOS.Tasks.Core/Xamarin.iOS.Common.targets#L784-L791 | ||
This logic removes nuget references, and then re-adds any copy-local dll references. | ||
This works fine in executable projects, but not in library projects (aka extensions), because nugets aren't copied for library projects: | ||
https://github.com/NuGet/NuGet.BuildTasks/blob/cf4b0a12cf1f75e0654f28c2a9020251c41d126a/src/Microsoft.NuGet.Build.Tasks/Microsoft.NuGet.targets#L86 | ||
So we need to set the CopyNuGetImplementations variable to 'true' for our library projects. | ||
--> | ||
<CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)' == ''">true</CopyNuGetImplementations> | ||
|
||
<!-- Enable nuget package conflict resolution --> | ||
<!-- This must be set before importing Microsoft.CSharp.targets --> | ||
<ResolveAssemblyConflicts>true</ResolveAssemblyConflicts> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" Condition="'$(UsingAppleNETSdk)' != 'true'" /> | ||
<Import Project="Xamarin.MacCatalyst.AppExtension.Common.targets" /> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/> | ||
</Project> |
23 changes: 23 additions & 0 deletions
23
msbuild/Xamarin.iOS.Tasks/Xamarin.MacCatalyst.AppExtension.Common.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- | ||
*********************************************************************************************** | ||
Xamarin.MacCatalyst.AppExtension.Common.props | ||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
created a backup copy. Incorrect changes to this file will make it | ||
impossible to load or build your projects from the command-line or the IDE. | ||
This file defines default properties for iOS App Extension projects. | ||
Copyright (C) 2014-2016 Xamarin. All rights reserved. | ||
*********************************************************************************************** | ||
--> | ||
|
||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.props" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.props')"/> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.props" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.props')"/> | ||
|
||
</Project> |
38 changes: 38 additions & 0 deletions
38
msbuild/Xamarin.iOS.Tasks/Xamarin.MacCatalyst.AppExtension.Common.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<!-- | ||
*********************************************************************************************** | ||
Xamarin.MacCatalyst.AppExtension.Common.targets | ||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
created a backup copy. Incorrect changes to this file will make it | ||
impossible to load or build your projects from the command-line or the IDE. | ||
This file imports the version- and platform-specific targets for the project importing | ||
this file. This file also defines targets to produce an error if the specified targets | ||
file does not exist, but the project is built anyway (command-line or IDE build). | ||
Copyright (C) 2014-2016 Xamarin. All rights reserved. | ||
*********************************************************************************************** | ||
--> | ||
|
||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<IsAppExtension>True</IsAppExtension> | ||
<IsWatchExtension>False</IsWatchExtension> | ||
</PropertyGroup> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)Xamarin.MacCatalyst.Common.Targets" /> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)Xamarin.MacCatalyst.AppExtension.Common.props" /> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/> | ||
|
||
<!-- Override GetTargetPath, Build, and Rebuild --> | ||
<Target Name="GetBundleTargetPath" DependsOnTargets="_GenerateBundleName;$(GetTargetPathDependsOn)" Outputs="@(_AppExtensionBundlePath)" /> | ||
<Target Name="Build" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GenerateBundleName;$(BuildDependsOn)" Outputs="@(_AppExtensionBundlePath)" /> | ||
<Target Name="Rebuild" Condition="'$(_InvalidConfigurationWarning)' != 'true'" DependsOnTargets="_GenerateBundleName;$(RebuildDependsOn)" Outputs="@(_AppExtensionBundlePath)" /> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/> | ||
|
||
</Project> |
56 changes: 56 additions & 0 deletions
56
msbuild/Xamarin.iOS.Tasks/Xamarin.MacCatalyst.AppExtension.FSharp.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!-- | ||
*********************************************************************************************** | ||
Xamarin.MacCatalyst.AppExtension.FSharp.targets | ||
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have | ||
created a backup copy. Incorrect changes to this file will make it | ||
impossible to load or build your projects from the command-line or the IDE. | ||
This file imports the version- and platform-specific targets for the project importing | ||
this file. This file also defines targets to produce an error if the specified targets | ||
file does not exist, but the project is built anyway (command-line or IDE build). | ||
Copyright (C) 2014-2016 Xamarin. All rights reserved. | ||
*********************************************************************************************** | ||
--> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).Before.targets')"/> | ||
|
||
<PropertyGroup> | ||
<!-- Version/fx properties --> | ||
<TargetFrameworkIdentifier Condition="'$(TargetFrameworkIdentifier)' == ''">Xamarin.MacCatalyst</TargetFrameworkIdentifier> | ||
<TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v1.0</TargetFrameworkVersion> | ||
|
||
<!-- This must be set before importing Microsoft.FSharp.targets --> | ||
<!-- See Xamarin.MacCatalyst.AppExtension.CSharp.targets for a detailed explanation of this variable --> | ||
<CopyNuGetImplementations Condition="'$(CopyNuGetImplementations)' == ''">true</CopyNuGetImplementations> | ||
|
||
<!-- This should be done in the F# target files, but _DebugFileExt is not an upstream | ||
msbuild feature yet, so F# doesn't have this. Once, upstream F# adds it, we can | ||
remove this --> | ||
<_DebugFileExt Condition="'$(FscDebugFileExt)' != ''">$(FscDebugFileExt)</_DebugFileExt> | ||
<_DebugFileExt Condition="'$(_DebugFileExt)' == ''">.mdb</_DebugFileExt> | ||
|
||
<!-- Enable nuget package conflict resolution --> | ||
<!-- This must be set before importing Microsoft.CSharp.targets --> | ||
<ResolveAssemblyConflicts>true</ResolveAssemblyConflicts> | ||
</PropertyGroup> | ||
|
||
<!-- xbuild searches multiple MSBuildExtensionsPath32, but only in the Import element so we can't determine this with a variable --> | ||
<Import | ||
Condition="'$(Language)' != 'F#' And Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets')" | ||
Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets" /> | ||
<Import | ||
Condition="'$(Language)' != 'F#' And Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets')" | ||
Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\4.0\Framework\v4.0\Microsoft.FSharp.Targets" /> | ||
<Import | ||
Condition="'$(Language)' != 'F#' And Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets')" | ||
Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.1\Framework\v4.0\Microsoft.FSharp.Targets" /> | ||
|
||
<Import Project="$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets" | ||
Condition="Exists('$(MSBuildThisFileDirectory)$(MSBuildThisFileName).After.targets')"/> | ||
|
||
<Import Project="Xamarin.MacCatalyst.AppExtension.Common.targets" /> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters