diff options
Diffstat (limited to 'xmake/rules/csharp/config.lua')
| -rw-r--r-- | xmake/rules/csharp/config.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/rules/csharp/config.lua b/xmake/rules/csharp/config.lua index e9dbc71e0..e3a728922 100644 --- a/xmake/rules/csharp/config.lua +++ b/xmake/rules/csharp/config.lua @@ -45,6 +45,14 @@ function main(target) target:data_set("csharp.csproj", csprojfile) + -- for NativeAOT shared library, export targetfile directly for C/C++ consumers + -- dotnet outputs without lib prefix, so we use syslinks with full path + local publish_aot = target:values("csharp.publish_aot") + if publish_aot and target:is_shared() then + target:data_set("inherit.links.deplink", false) + target:add("ldflags", target:targetfile(), {interface = true, force = true}) + end + -- add native shared library search paths for P/Invoke for _, dep in ipairs(target:orderdeps()) do if dep:is_shared() and not dep:rule("csharp.build") then |
