Skip to content

Commit 358e845

Browse files
committed
Skipping build of llama.mobile on non-windows platforms
1 parent 63b9235 commit 358e845

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

Llama.Mobile/Llama.Mobile.csproj

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\LLama\LLamaSharp.Runtime.targets" />
3+
34
<PropertyGroup>
4-
<TargetFrameworks>net8.0-android</TargetFrameworks>
5+
<IsSupportedPlatform Condition="'$(OS)' == 'Windows_NT'">true</IsSupportedPlatform>
6+
<IsSupportedPlatform Condition="'$(OS)' != 'Windows_NT'">false</IsSupportedPlatform>
7+
</PropertyGroup>
58

9+
<Target Name="SkipUnsupportedPlatformBuild" BeforeTargets="Build" Condition="'$(IsSupportedPlatform)' == 'false'">
10+
<Message Importance="high" Text="Skipping build of $(MSBuildProjectName): unsupported on this platform." />
11+
<Error Text="Skipping $(MSBuildProjectName). Not supported on this platform." Condition="'$(BuildingInsideVisualStudio)' != 'true'" />
12+
</Target>
13+
14+
<PropertyGroup>
15+
<TargetFrameworks>net8.0-android</TargetFrameworks>
16+
617
<!--Temporarily Disable iOS and MacCatalyst until native lib support is added-->
718
<!--<TargetFrameworks>$(TargetFrameworks);net8.0-ios;net8.0-maccatalyst</TargetFrameworks>-->
819

0 commit comments

Comments
 (0)