XMake: Add dependencies natvis to VS projects
This commit is contained in:
parent
2f593dcde7
commit
ce6a94cfe2
|
|
@ -346,6 +346,7 @@ end
|
||||||
add_rules("mode.asan", "mode.tsan", "mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")
|
add_rules("mode.asan", "mode.tsan", "mode.coverage", "mode.debug", "mode.releasedbg", "mode.release")
|
||||||
add_rules("plugin.vsxmake.autoupdate")
|
add_rules("plugin.vsxmake.autoupdate")
|
||||||
add_rules("build.rendererplugins")
|
add_rules("build.rendererplugins")
|
||||||
|
add_rules("natvis")
|
||||||
|
|
||||||
if has_config("examples") then
|
if has_config("examples") then
|
||||||
add_rules("download.assets.examples")
|
add_rules("download.assets.examples")
|
||||||
|
|
|
||||||
|
|
@ -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)
|
||||||
Loading…
Reference in New Issue