XMake: Add --log-format=vs only in VS (requires xmake dev)
This commit is contained in:
parent
95dc7aa15c
commit
b8b0057ca3
|
|
@ -22,7 +22,16 @@ rule("compile_shaders")
|
||||||
|
|
||||||
-- add commands
|
-- add commands
|
||||||
batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile)
|
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 = "." })
|
batchcmds:vrunv(nzslc:targetfile(), argv, { curdir = "." })
|
||||||
|
|
||||||
local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")
|
local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue