feat: add ios/macos configuration
This commit is contained in:
parent
bee735b029
commit
50dcf9b6d5
7
MyLib.Generated/MainDummy.cs
Normal file
7
MyLib.Generated/MainDummy.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace __MainDummyNamespace;
|
||||
|
||||
// TODO: This is a temporary workaround to allow the .NET compiler to generate an iOS native dylib
|
||||
public static class __MainDummyClass
|
||||
{
|
||||
public static void Main() { }
|
||||
}
|
@ -77,6 +77,89 @@
|
||||
<Exec Command="sed -i -z $(ExportsPatch) $(ExportsFile)" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup>
|
||||
<MacOSMinVersion>13.0</MacOSMinVersion>
|
||||
<iOSMinVersion>16.0</iOSMinVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Set min macOS version -->
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('osx'))">
|
||||
<ItemGroup>
|
||||
<LinkerArg Include="-mmacosx-version-min=$(MacOSMinVersion)" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<!-- Culture stuff for iOS Support -->
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('ios'))">
|
||||
<!-- If globalization is not required, you can enable this instead of providing an icudt.dat file on iOS -->
|
||||
<!-- <PropertyGroup>
|
||||
<InvariantGlobalization>true</InvariantGlobalization>
|
||||
</PropertyGroup> -->
|
||||
|
||||
<!-- When this is set, an icudt.dat must be placed in the resulting bundle -->
|
||||
<ItemGroup>
|
||||
<RuntimeHostConfigurationOption Include="ICU_DAT_FILE_PATH" Value="icudt.dat" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('ios'))">
|
||||
<ItemGroup>
|
||||
<!-- Link to Swift on iOS (it's automatic when targeting macOS) -->
|
||||
<LinkerArg Include="-L/usr/lib/swift" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<!-- TODO: Temporary workarounds for iOS/iOS Simulator support -->
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('ios'))">
|
||||
<PropertyGroup>
|
||||
<PublishAotUsingRuntimePack>true</PublishAotUsingRuntimePack>
|
||||
<_IsAppleMobileLibraryMode>false</_IsAppleMobileLibraryMode>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('iossimulator'))">
|
||||
<ItemGroup>
|
||||
<!-- TODO: Temporary workaround for iOS Simulator support -->
|
||||
<LinkerArg Include="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk" />
|
||||
|
||||
<!-- Set min iOS version -->
|
||||
<LinkerArg Include="-mios-simulator-version-min=$(iOSMinVersion)" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<!-- TODO: Temporary workarounds for iOS support -->
|
||||
<Choose>
|
||||
<When Condition="$(RuntimeIdentifier.Contains('ios-'))">
|
||||
<ItemGroup>
|
||||
<!-- TODO: Temporary workaround for iOS support -->
|
||||
<LinkerArg Include="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk" />
|
||||
|
||||
<!-- Set min iOS version -->
|
||||
<LinkerArg Include="-mios-version-min=$(iOSMinVersion)" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<!-- Strip Symbols in Release Builds -->
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<StripSymbols>true</StripSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Item Excludes -->
|
||||
<PropertyGroup>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);.gitignore;*.sln.DotSettings;</DefaultItemExcludes>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Project References -->
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\MyLib.Managed\MyLib.Managed.csproj" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user