Skip to content

Commit

Permalink
Merge pull request unoplatform#15779 from unoplatform/dev/spouliot/co…
Browse files Browse the repository at this point in the history
…py-macos-dylib

fix: copy libUnoNativeMac.dylib into Sample.Skia.Generic app
  • Loading branch information
spouliot authored Mar 8, 2024
2 parents c55ecd4 + 6847d1a commit d8d4a0d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
<Import Project="..\..\SourceGenerators\Uno.UI.Tasks\Content\Uno.UI.Tasks.targets" Condition="'$(SkipUnoResourceGeneration)' == '' " />
<Import Project="..\..\..\build\nuget\uno.winui.runtime-replace.targets" />

<Target Name="BuildUnoNativeMac" BeforeTargets="Compile" Condition="$([MSBuild]::IsOsPlatform('OSX'))">
<Copy
SourceFiles="$(MSBuildThisFileDirectory)../../Uno.UI.Runtime.Skia.MacOS/UnoNativeMac/build/$(Configuration)/libUnoNativeMac.dylib"
DestinationFolder="$(MSBuildThisFileDirectory)bin/$(Configuration)/$(TargetFramework)/runtimes/osx/native/" />
</Target>

<Target Name="_ValidatePublishedItems" AfterTargets="Publish">
<ItemGroup>
<_validationPath Include="Uno.Fonts.Fluent/Fonts/uno-fluentui-assets.ttf" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,16 @@
<PackageReference Include="SkiaSharp" />
</ItemGroup>

<PropertyGroup>
<_XcodeBuildArgs Condition="'$(Configuration)'=='Debug'">build-for-testing -scheme UnoNativeMac</_XcodeBuildArgs>
</PropertyGroup>

<Target Name="BuildUnoNativeMac" BeforeTargets="CoreCompile" Condition="$([MSBuild]::IsOsPlatform('OSX'))">
<Exec Command="$(MSBuildThisFileDirectory)UnoNativeMac/build.sh" WorkingDirectory="$(MSBuildThisFileDirectory)UnoNativeMac/" />
<Exec Command="$(MSBuildThisFileDirectory)UnoNativeMac/build.sh $(_XcodeBuildArgs)" WorkingDirectory="$(MSBuildThisFileDirectory)UnoNativeMac/" />
</Target>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)runtimes/osx/native/libUnoNativeMac.*"
<None Include="$(MSBuildThisFileDirectory)UnoNativeMac/build/$(Configuration)/libUnoNativeMac.*"
PackagePath="runtimes/osx/native"
Pack="true"
Visible="False" />
Expand Down

0 comments on commit d8d4a0d

Please sign in to comment.