The topic may sound like a duplicate question but the problem in my case is that I don't have any HLSL files included in the project. Thus, I can not manually disable/change the dxc compiler. Though, I have added a pre-build command using CMake to generate SPIR-V from HLSL files. While compiling the project I get the following error:
dxc failed : SPIR-V CodeGen not available. Please recompile with -DENABLE_SPIRV_CODEGEN=ON.
meaning that Visual Studio uses the built-in dxc which does not have support for SPIR-V CodeGen. How can I explicitly tell which dxc version to use using CMake?
Explicitly specifying the dxc path to use VulkanSDK's version fixed the issue