diff options
| author | ruki <[email protected]> | 2026-03-17 22:37:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-17 22:37:53 +0800 |
| commit | 701014b37d30227f2fa38ebe6ce344ab766513a2 (patch) | |
| tree | 88abd3323847e6bbb7e1b8a5ade94883312e2ec2 /xmake/rules/csharp/config.lua | |
| parent | f8723406844fa8b2f2fe9904e67e69e6cd99a9d2 (diff) | |
improve csharp generator
Diffstat (limited to 'xmake/rules/csharp/config.lua')
| -rw-r--r-- | xmake/rules/csharp/config.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmake/rules/csharp/config.lua b/xmake/rules/csharp/config.lua index 97b3a4303..8b7186888 100644 --- a/xmake/rules/csharp/config.lua +++ b/xmake/rules/csharp/config.lua @@ -19,16 +19,13 @@ -- -- imports -import("core.project.config") import("core.project.depend") -import("modules.csproj_generator", {rootdir = os.scriptdir()}) +import("modules.csproj_generator", {rootdir = os.scriptdir(), alias = "generate_csproj"}) function main(target) -- compute csproj path - local targetkey = target:fullname():replace("::", path.sep()) - local csprojdir = path.join(config.directory(), "rules", "csharp", targetkey, target:plat(), target:arch()) - local csprojfile = path.join(csprojdir, target:name() .. ".csproj") + local csprojfile = path.join(target:autogendir(), "rules", "csharp", target:name() .. ".csproj") local dependfile = target:dependfile(csprojfile) -- collect source files and dep csproj paths as depend values @@ -43,7 +40,7 @@ function main(target) -- generate csproj incrementally depend.on_changed(function () - csproj_generator(target, csprojfile) + generate_csproj(target, csprojfile) end, {dependfile = dependfile, files = sourcefiles, values = depcsproj}) target:data_set("csharp.csproj", csprojfile) |
