CMake updated to use BINARY dir instead of SOURCE dir for generated shaders (#250)

This commit is contained in:
Chuck Walbourn
2021-10-06 23:14:26 -07:00
committed by GitHub
parent fd45216373
commit 800aa853e8
13 changed files with 113 additions and 19 deletions

View File

@@ -17,7 +17,8 @@ if exist %PCFXC% goto continue
set PCFXC=fxc.exe
:continue
@if not exist Compiled mkdir Compiled
@if %CompileShadersOutput%.==. set CompileShadersOutput=Compiled
@if not exist %CompileShadersOutput% mkdir %CompileShadersOutput%
call :CompileShader BC7Encode TryMode456CS
call :CompileShader BC7Encode TryMode137CS
call :CompileShader BC7Encode TryMode02CS
@@ -39,7 +40,7 @@ endlocal
exit /b
:CompileShader
set fxc=%PCFXC% %1.hlsl %FXCOPTS% /Tcs_4_0 /E%2 /FhCompiled\%1_%2.inc /FdCompiled\%1_%2.pdb /Vn%1_%2
set fxc=%PCFXC% %1.hlsl %FXCOPTS% /Tcs_4_0 /E%2 /Fh%CompileShadersOutput%\%1_%2.inc /Fd%CompileShadersOutput%\%1_%2.pdb /Vn%1_%2
echo.
echo %fxc%
%fxc% || set error=1