XMake: Improve natvis rules

This commit is contained in:
SirLynix 2023-11-17 13:16:05 +01:00
parent 5a14808a57
commit da49b39465
1 changed files with 2 additions and 2 deletions

View File

@ -1,12 +1,12 @@
rule("natvis") rule("natvis")
on_config(function (target) on_config(function (target)
for name, pkg in pairs(target:pkgs()) do for name, pkg in table.orderpairs(target:pkgs()) do
local includedir = path.join(pkg:installdir(), "include") local includedir = path.join(pkg:installdir(), "include")
local natvis = os.files(path.join(includedir, "**.natvis")) local natvis = os.files(path.join(includedir, "**.natvis"))
if #natvis > 0 then if #natvis > 0 then
local groups = table.wrap(target:get("filegroups")) local groups = table.wrap(target:get("filegroups"))
if not table.find(groups, name) then if not table.find(groups, name) then
target:add("headerfiles", natvis, { install = false }) target:add("extrafiles", natvis)
target:add("filegroups", path.join("nativs", name), { rootdir = includedir }) target:add("filegroups", path.join("nativs", name), { rootdir = includedir })
end end
end end