FindVulkan.cmake can't find DXC debug libraries while present, as it's not looking for them.


Some preliminary info: I am currently developing a Vulkan pet project using Vulkan SDK 1.3.268 (I did check - this SDK does include the debug libs and the debug libs are present in my installed SDK), using cmake version 3.28. I am also using findVulkan.cmake to include the vulkan sdk into my project as follows:


#Add Vulkan
if(NOT Vulkan_FOUND)
	message(FATAL_ERROR "Vulkan SDK could not be found, make sure that the SDK is installed!")
	message(STATUS "Vulkan: Version ${Vulkan_VERSION}")

This always worked until I added the optional dxc component, which immediately threw a warning that it couldn’t find the debug libs for dxc, which could potentially lead to ABI differences between the release and debug configs. My investigation led me to the source code of findVulkan.cmake, in which I noticed that the file is not trying to look for it at all. After a bit of pondering I resolved this through inserting the following on line 474 of findVulkan.cmake.:

		  NAMES dxcompilerd

Could someone confirm this behaviour?

As of Vulkan SDK 1.3.268 Debug versions of the DXC and VOLK libraries have been included in the SDK (dxcompilerd.dll, dxcompilerd.lib, volkd.lib).

See the release notes here:

This will require fixes to FindVulkan.cmake

I have opened an issue to track this.

1 Like