summaryrefslogtreecommitdiff
path: root/xmake/rules/csharp/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/csharp/xmake.lua')
-rw-r--r--xmake/rules/csharp/xmake.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/csharp/xmake.lua b/xmake/rules/csharp/xmake.lua
index 9a0a6e43b..603af08c3 100644
--- a/xmake/rules/csharp/xmake.lua
+++ b/xmake/rules/csharp/xmake.lua
@@ -115,10 +115,14 @@
rule("csharp.build")
set_sourcekinds("cs")
on_load(function (target)
- -- dotnet always outputs .dll for libraries, and no prefix
if target:is_shared() or target:is_static() then
+ -- dotnet always outputs without lib prefix
target:set("prefixname", "")
- target:set("extension", ".dll")
+ -- managed libraries use .dll, NativeAOT uses native format (.dylib/.so/.dll)
+ local publish_aot = target:values("csharp.publish_aot")
+ if not publish_aot then
+ target:set("extension", ".dll")
+ end
end
end)
on_config("config")