From 88fe47a63b0b8179ec0c205b50d913241342754a Mon Sep 17 00:00:00 2001 From: Tomas Slusny Date: Sat, 26 Oct 2024 21:19:22 +0200 Subject: [PATCH] Disable automatic NativeAOT linking Currently `BindgenInternal.LoadDLLSymbol` do not supports statically linked libraries so for now disable automatic linking and add comment with explanation. Signed-off-by: Tomas Slusny --- README.md | 2 +- .../buildTransitive/Flecs.NET.Native.props | 4 +++- .../buildTransitive/Flecs.NET.Native.targets | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index df46773..8d89288 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ public record struct Velocity(float X, float Y); **Flecs.NET.Native - Precompiled native libraries** - Provides both shared and static libraries for Windows, MacOS, Linux, iOS, and WASM -- Static libraries are automatically linked for NativeAOT builds (`$(FlecsStaticPath)` available for manual linking for other targets) +- `$(FlecsStaticLibrary)` is provided for static linking in MSBuild projects - Packaged with Zig for dependency free cross-compilation everywhere ## NuGet diff --git a/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.props b/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.props index 9d48ea5..ada0ee4 100644 --- a/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.props +++ b/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.props @@ -1,6 +1,8 @@ - $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)../static/$(RuntimeIdentifier)/native/')) true + $([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)../static/$(RuntimeIdentifier)/native/')) + $(FlecsStaticPath)flecs.lib + $(FlecsStaticPath)libflecs.a diff --git a/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.targets b/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.targets index 12871f5..75666b1 100644 --- a/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.targets +++ b/src/Flecs.NET.Native/buildTransitive/Flecs.NET.Native.targets @@ -1,7 +1,8 @@ - +