XMake: Add --log-format=vs only in VS (requires xmake dev)

This commit is contained in:
SirLynix 2022-05-07 15:31:32 +02:00
parent 95dc7aa15c
commit b8b0057ca3
1 changed files with 10 additions and 1 deletions

View File

@ -22,7 +22,16 @@ rule("compile_shaders")
-- add commands
batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile)
local argv = {"--compile", "--partial", "--header-file", "--log-format=vs", shaderfile}
local argv = {"--compile", "--partial", "--header-file"}
-- handle --log-format
local kind = target:data("plugin.project.kind") or ""
if kind:match("vs") then
table.insert(argv, "--log-format=vs")
end
table.insert(argv, shaderfile)
batchcmds:vrunv(nzslc:targetfile(), argv, { curdir = "." })
local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")