XMake: Add dependencies natvis to VS projects

This commit is contained in:
SirLynix 2023-08-12 12:21:51 +02:00
parent 2f593dcde7
commit ce6a94cfe2
2 changed files with 15 additions and 0 deletions

View File

@ -346,6 +346,7 @@ end
add_rules("mode.asan", "mode.tsan", "mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")
add_rules("plugin.vsxmake.autoupdate")
add_rules("build.rendererplugins")
add_rules("natvis")
if has_config("examples") then
add_rules("download.assets.examples")

14
xmake/rules/natvis.lua Normal file
View File

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