Viewing is open to everyone. Downloading and starring need a GitHub sign-in. Sign in with GitHub

CKey.csproj

v0.1.0-build.85 Latest Commit ede38f5

Size
4.2 KB
Lines
70
Language
xml
SHA-256
8612f2c778f0…
View on GitHub

Sign in with GitHub to download. Each download is recorded with your GitHub username.

1<Project Sdk="Microsoft.NET.Sdk">
2
3 <PropertyGroup>
4 <TargetFrameworks>net8.0;netstandard2.0</TargetFrameworks>
5 <AssemblyName>CKey</AssemblyName>
6 <RootNamespace>OpenCKey</RootNamespace>
7 <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8 <GenerateDocumentationFile>true</GenerateDocumentationFile>
9 <IsPackable>true</IsPackable>
10 <PackageId>CKey</PackageId>
11 <Title>CKey</Title>
12 <Description>CKey optical codes for .NET: encode, render native RGBA pixels (plus PNG, SVG and PDF export) and scan grayscale frames, over the CKey C core via P/Invoke. Headless; no UI dependencies. Anonymous aggregate telemetry is on by default (CKey.Telemetry = 0 turns it off).</Description>
13 <PackageReadmeFile>README.md</PackageReadmeFile>
14 <IncludeSymbols>true</IncludeSymbols>
15 <SymbolPackageFormat>snupkg</SymbolPackageFormat>
16 </PropertyGroup>
17
18 <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
19 <IsAotCompatible>true</IsAotCompatible>
20 <IsTrimmable>true</IsTrimmable>
21 </PropertyGroup>
22
23 <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
24 <PackageReference Include="System.Memory" Version="4.5.5" />
25 </ItemGroup>
26
27 <ItemGroup>
28 <AssemblyMetadata Include="CKeyVersion" Value="$(CKeyVersion)" />
29 <InternalsVisibleTo Include="CKey.Tests" />
30 <!-- The WPF Safe Action confirmation is the only caller of CKeySafeActionRequest.Decide outside this assembly. -->
31 <InternalsVisibleTo Include="CKey.Wpf" />
32 <None Include="../../README.md" Pack="true" PackagePath="/" />
33 <!-- .NET Framework consumers do not probe runtimes/<rid>/native: copy the win-x64 library. -->
34 <None Include="build/CKey.targets" Pack="true" PackagePath="build/;buildTransitive/" />
35 </ItemGroup>
36
37 <!-- Native assets: runtimes/<rid>/native/ in the package. A local pack
38 includes whichever exist; CI packs with -p:CKeyRequireAllNatives=true. -->
39 <ItemGroup>
40 <CKeyNativeAsset Include="$(CKeyNativeRoot)win-x64/ckeynative.dll" Rid="win-x64" />
41 <CKeyNativeAsset Include="$(CKeyNativeRoot)linux-x64/libckeynative.so" Rid="linux-x64" />
42 <CKeyNativeAsset Include="$(CKeyNativeRoot)osx-arm64/libckeynative.dylib" Rid="osx-arm64" />
43 <CKeyNativeAsset Include="$(CKeyNativeRoot)osx-x64/libckeynative.dylib" Rid="osx-x64" />
44 </ItemGroup>
45 <ItemGroup>
46 <None Include="$(CKeyNativeRoot)win-x64/ckeynative.dll" Condition="Exists('$(CKeyNativeRoot)win-x64/ckeynative.dll')" Pack="true" PackagePath="runtimes/win-x64/native/" Visible="false" />
47 <None Include="$(CKeyNativeRoot)linux-x64/libckeynative.so" Condition="Exists('$(CKeyNativeRoot)linux-x64/libckeynative.so')" Pack="true" PackagePath="runtimes/linux-x64/native/" Visible="false" />
48 <None Include="$(CKeyNativeRoot)osx-arm64/libckeynative.dylib" Condition="Exists('$(CKeyNativeRoot)osx-arm64/libckeynative.dylib')" Pack="true" PackagePath="runtimes/osx-arm64/native/" Visible="false" />
49 <None Include="$(CKeyNativeRoot)osx-x64/libckeynative.dylib" Condition="Exists('$(CKeyNativeRoot)osx-x64/libckeynative.dylib')" Pack="true" PackagePath="runtimes/osx-x64/native/" Visible="false" />
50 </ItemGroup>
51
52 <!-- Local builds and tests (project references): copy the host's native
53 library next to the assembly, where the default probing finds it.
54 CI passes -p:CKeyHostRid=<rid> explicitly. -->
55 <PropertyGroup>
56 <CKeyHostRid Condition="'$(CKeyHostRid)' == ''">$(NETCoreSdkRuntimeIdentifier)</CKeyHostRid>
57 <CKeyHostLib Condition="$(CKeyHostRid.StartsWith('win'))">ckeynative.dll</CKeyHostLib>
58 <CKeyHostLib Condition="$(CKeyHostRid.StartsWith('osx'))">libckeynative.dylib</CKeyHostLib>
59 <CKeyHostLib Condition="'$(CKeyHostLib)' == ''">libckeynative.so</CKeyHostLib>
60 <CKeyHostLibPath>$(CKeyNativeRoot)$(CKeyHostRid)/$(CKeyHostLib)</CKeyHostLibPath>
61 </PropertyGroup>
62 <ItemGroup Condition="Exists('$(CKeyHostLibPath)')">
63 <None Include="$(CKeyHostLibPath)" Link="$(CKeyHostLib)" CopyToOutputDirectory="PreserveNewest" Pack="false" Visible="false" />
64 </ItemGroup>
65
66 <Target Name="CKeyRequireAllNatives" BeforeTargets="GenerateNuspec" Condition="'$(CKeyRequireAllNatives)' == 'true'">
67 <Error Condition="!Exists('%(CKeyNativeAsset.FullPath)')" Text="Missing native library for %(CKeyNativeAsset.Rid): %(CKeyNativeAsset.FullPath)" />
68 </Target>
69
70</Project>