Skip to content

[FindVulkan] Add components for `shaderc`, `SPIRV-Tools` and `glslang`

Andrea Machizaud requested to merge findvulkan-improvements into master

This MR fixes #23438 by improving FindVulkan.cmake CMake modules allowing to reference more of the Vulkan SDK content.

Namely, it exposes as Vulkan package components:

  • shaderc_combined static library, exposed with Vulkan::shaderc_combined target
  • SPIRV-Tools static library, exposed with Vulkan::SPIRV-Tools target
  • glslang static library, exposed with Vulkan::glslang target

Code also deal with a couple of requirement for those to work properly:

  • Handle the debug library for some targets if they exists
  • Handle intermediate libraries required for linking
  • Handle dependent package when necessary (e.g. shaderc depends on pthread)

Lastly, I took the liberty to introduce FindPackageMessage so that we have some feedbacks on what is found by this module.

Merge request reports