VulkanSceneGraph: CMake Configuration can fail when building as a code dependency due to find_package(glslang CONFIG)
Describe the bug
When including vsg as a code dependency in another project (as a submodule or FetchContent) AND the encompassing project is using glslang as a code dependency - vsg can fail to configure because the find_package(glslang) command is forced into CONFIG mode:
See https://github.com/vsg-dev/VulkanSceneGraph/blob/b64dbb2cb70236071eae8687e0b0ec9e134acd2f/CMakeLists.txt#L47
To Reproduce Steps to reproduce the behavior:
- Create an encompassing folder that has a CMakeLists.txt
- Use FetchContent to retrieve and configure glslang and vsg
Expected behavior CONFIG should be removed - as CMake can gracefully fallback to CONFIG mode if MODULE mode fails.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (5 by maintainers)
Thanks for all the discussion guys. glslang has been painful dependency to have 😐
If there is an alternative for compiling high level shaders into SPIR-V comes into existence that is easy to integrate I’ll very happily adopt it.