-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmushSharp.csproj
More file actions
41 lines (35 loc) · 1.77 KB
/
SmushSharp.csproj
File metadata and controls
41 lines (35 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<PlatformTarget>x64</PlatformTarget>
<!-- NuGet metadata -->
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageId>SmushSharp</PackageId>
<Version>1.0.4</Version>
<Authors>jayu</Authors>
<Description>Simple macOS URL-scheme handler shim for .NET 8 (x64)</Description>
<PackageTags>macos;cocoa;url;scheme;interop</PackageTags>
<RepositoryUrl>https://github.com/jayugg/smush-sharp</RepositoryUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<RootNamespace>MushSharp</RootNamespace>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<None Include="README.md" Pack="true" PackagePath=""/>
</ItemGroup>
<!-- Before each build, compile the Obj-C shim -->
<Target Name="CompileNativeShim" BeforeTargets="BeforeBuild">
<MakeDir Directories="$(MSBuildThisFileDirectory)runtimes/osx-x64/native" />
<Exec Command="clang -fobjc-arc -dynamiclib -arch x86_64 -framework Cocoa -o "$(MSBuildThisFileDirectory)runtimes/osx-x64/native/libsmush.dylib" "$(MSBuildThisFileDirectory)smush/macos-url-scheme-handler.m"" />
</Target>
<!-- Include the compiled dylib in the NuGet and copy it to output -->
<ItemGroup>
<None Include="runtimes/osx-x64/native/libsmush.dylib">
<Pack>true</Pack>
<PackagePath>runtimes/osx-x64/native</PackagePath>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>