From 4e518789d0509056bbdcd9165af03ea8bbfebfb8 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 30 Jun 2026 23:09:40 +0800 Subject: move code styles --- xmake/plugins/project/vsxmake/vsxmake.lua | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua index 5cab05c54..99584e789 100644 --- a/xmake/plugins/project/vsxmake/vsxmake.lua +++ b/xmake/plugins/project/vsxmake/vsxmake.lua @@ -39,6 +39,21 @@ local template_targets = path.join(template_root, "Xmake.Custom.targets") local template_items = path.join(template_root, "Xmake.Custom.items") local template_itemfil = path.join(template_root, "Xmake.Custom.items.filters") +-- the source file extensions natively supported by the vsxmake project, keyed by the template import name +-- the `filenone` group collects everything else (e.g. files added by add_files but handled by a custom rule) +local _source_exts = { + filec = {".c"}, + filecxx = {".cpp", ".cc", ".cxx"}, + filempp = {".mpp", ".mxx", ".cppm", ".ixx"}, + filecu = {".cu"}, + fileobj = {".obj", ".o"}, + filerc = {".rc"}, + fileui = {".ui"}, + fileqrc = {".qrc"}, + filets = {".ts"}, + filecs = {".cs"} +} + function _filter_files(files, includeexts, excludeexts) local positive = not excludeexts local extset = hashset.from(positive and includeexts or excludeexts) @@ -53,22 +68,6 @@ function _filter_files(files, includeexts, excludeexts) return f end --- the source file extensions natively supported by the vsxmake project, keyed by the template import name --- the `filenone` group collects everything else (e.g. files added by add_files but handled by a custom rule) -local _source_exts = -{ - filec = {".c"} -, filecxx = {".cpp", ".cc", ".cxx"} -, filempp = {".mpp", ".mxx", ".cppm", ".ixx"} -, filecu = {".cu"} -, fileobj = {".obj", ".o"} -, filerc = {".rc"} -, fileui = {".ui"} -, fileqrc = {".qrc"} -, filets = {".ts"} -, filecs = {".cs"} -} - function _buildparams(info, target, default) local function getprop(match, opt) -- cgit v1.3.1