diff --git a/xmake/actions/compile_shaders.lua b/xmake/actions/compile_shaders.lua index a81bd7367..d6b2e478c 100644 --- a/xmake/actions/compile_shaders.lua +++ b/xmake/actions/compile_shaders.lua @@ -17,7 +17,7 @@ task("compile-shaders") task.run("config", {}, {disable_dump = true}) local nzsl = project.required_package("nzsl") - local nzslc = path.join(project.required_package("nzsl"):installdir(), "bin", "nzslc") + local nzslc = path.join(nzsl:installdir(), "bin", "nzslc") local envs = nzsl:get("envs") if is_plat("mingw") then diff --git a/xmake/rules/compile_shaders.lua b/xmake/rules/compile_shaders.lua index bf64289cf..0920ad744 100644 --- a/xmake/rules/compile_shaders.lua +++ b/xmake/rules/compile_shaders.lua @@ -7,7 +7,7 @@ rule("nzsl.compile.shaders") before_buildcmd_file(function (target, batchcmds, shaderfile, opt) import("core.tool.toolchain") - local nzsl = path.join(target:pkg("nzsl"):installdir(), "bin", "nzslc") + local nzslc = path.join(target:pkg("nzsl"):installdir(), "bin", "nzslc") -- add commands batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile) @@ -29,7 +29,7 @@ rule("nzsl.compile.shaders") end end - batchcmds:vrunv(nzsl, argv, { curdir = ".", envs = envs }) + batchcmds:vrunv(nzslc, argv, { curdir = ".", envs = envs }) local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")