diff options
| author | Joel Stålnacke <joel@saker.fi> | 2026-03-19 22:30:56 +0200 |
|---|---|---|
| committer | Joel Stålnacke <joel@saker.fi> | 2026-03-19 22:30:56 +0200 |
| commit | 745406dc65aecc438a53f96badc387a32b7a338f (patch) | |
| tree | cc597855dac943efe627fce160782585e27feadf /Djup.Native/scripts | |
| parent | 3b60cd682120947119f442bb71ab2a5e98decccc (diff) | |
Add Mibo project
The Djup project is DesktopGL project
Diffstat (limited to 'Djup.Native/scripts')
| -rw-r--r-- | Djup.Native/scripts/AddRuntimeTargetsToDepsJson.targets | 12 | ||||
| -rwxr-xr-x | Djup.Native/scripts/patch-deps.sh | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/Djup.Native/scripts/AddRuntimeTargetsToDepsJson.targets b/Djup.Native/scripts/AddRuntimeTargetsToDepsJson.targets new file mode 100644 index 0000000..fbb4c43 --- /dev/null +++ b/Djup.Native/scripts/AddRuntimeTargetsToDepsJson.targets @@ -0,0 +1,12 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <!-- + The .NET SDK does not support project-to-project dependencies + with native binary dependencies, so we need to add them manually. + Patch Project.deps.json by adding the required depencies to + Djup.Native "runtimeTargets" section. + --> + <!-- https://github.com/dotnet/sdk/issues/19929 --> + <Target Name="AddRuntimeTargetsToDepsJson" AfterTargets="AfterBuild"> + <Exec Command="$(MSBuildThisFileDirectory)patch-deps.sh '$(OutputPath)'" /> + </Target> +</Project> diff --git a/Djup.Native/scripts/patch-deps.sh b/Djup.Native/scripts/patch-deps.sh new file mode 100755 index 0000000..8015323 --- /dev/null +++ b/Djup.Native/scripts/patch-deps.sh @@ -0,0 +1,4 @@ +#!/bin/sh +depsjson="$(find "$1" -name '*.deps.json')" +patched="$(jq '.targets.".NETCoreApp,Version=v10.0"."Djup.Native/1.0.0" += {"runtimeTargets": {"runtimes/linux-x64/native/libdjup.so": {"rid": "linux-x64", "assetType": "native"} }}' "$depsjson")" +echo -n "$patched" > "$depsjson" |
