summaryrefslogtreecommitdiff
path: root/xmake/rules/csharp
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-17 22:42:00 +0800
committerruki <[email protected]>2026-03-17 22:42:00 +0800
commitce2f02d4bccd0da6f8e7a12330ac2d56ab9b525f (patch)
tree13efd7ab961b813306f6f10a30fde9539bac530a /xmake/rules/csharp
parent835c259574e8a071dcc5a290afc89272a55e4240 (diff)
rename csharp files
Diffstat (limited to 'xmake/rules/csharp')
-rw-r--r--xmake/rules/csharp/modules/csproj_generator.lua8
-rw-r--r--xmake/rules/csharp/modules/csproj_itemgroups.lua (renamed from xmake/rules/csharp/modules/itemgroups.lua)7
-rw-r--r--xmake/rules/csharp/modules/csproj_properties.lua (renamed from xmake/rules/csharp/modules/properties.lua)2
3 files changed, 7 insertions, 10 deletions
diff --git a/xmake/rules/csharp/modules/csproj_generator.lua b/xmake/rules/csharp/modules/csproj_generator.lua
index ae2f5a777..0755b41a0 100644
--- a/xmake/rules/csharp/modules/csproj_generator.lua
+++ b/xmake/rules/csharp/modules/csproj_generator.lua
@@ -19,8 +19,8 @@
--
-- imports
-import("properties", {alias = "csharp_properties"})
-import("itemgroups", {alias = "csharp_itemgroups"})
+import("csproj_properties")
+import("csproj_itemgroups")
-- escape special xml characters
function _xml_escape(value)
@@ -232,8 +232,8 @@ function main(target, csprojfile, opt)
}
-- collect project properties
- local property_registry_entries = csharp_properties()
- local item_registry_entries = csharp_itemgroups()
+ local property_registry_entries = csproj_properties()
+ local item_registry_entries = csproj_itemgroups()
local project_attributes = _collect_project_attributes(target, context, property_registry_entries)
local property_entries = _collect_property_entries(target, context, property_registry_entries)
diff --git a/xmake/rules/csharp/modules/itemgroups.lua b/xmake/rules/csharp/modules/csproj_itemgroups.lua
index 6e939c6fd..79f13b4fb 100644
--- a/xmake/rules/csharp/modules/itemgroups.lua
+++ b/xmake/rules/csharp/modules/csproj_itemgroups.lua
@@ -15,16 +15,13 @@
-- Copyright (C) 2015-present, Xmake Open Source Community.
--
-- @author JassJam
--- @file itemsgroups.lua
+-- @file csproj_itemsgroups.lua
--
-- normalize path to relative and use forward slashes
function _normalize_relative(fromdir, targetpath)
local relpath = path.relative(targetpath, fromdir) or targetpath
- if os.host() == "windows" then
- relpath = relpath:gsub("\\", "/")
- end
- return relpath
+ return path.unix(relpath)
end
-- collect .cs source files as relative paths to csprojdir
diff --git a/xmake/rules/csharp/modules/properties.lua b/xmake/rules/csharp/modules/csproj_properties.lua
index eabebd006..324e67531 100644
--- a/xmake/rules/csharp/modules/properties.lua
+++ b/xmake/rules/csharp/modules/csproj_properties.lua
@@ -15,7 +15,7 @@
-- Copyright (C) 2015-present, Xmake Open Source Community.
--
-- @author JassJam
--- @file properties.lua
+-- @file csproj_properties.lua
--
-- check if target has multi-target frameworks set