Hello! 馃憢
We are updating DiligentCore in Conan Center to API256019. The Conan recipe does not use the vendored ThirdParty/SPIRV-Tools tree, instead, it uses an installed SPIRV-Tools that only ships the public headers (include/spirv-tools/).
That layout still works for SPIRVTools.cpp (#include "spirv-tools/optimizer.hpp"). It fails on the custom pass added in #737:
Graphics/ShaderTools/src/ConvertUBOToPushConstant.cpp:30:10: fatal error: 'source/opt/pass.h' file not found
You can see my full build log: diligent-core-256019-macos-armv8-clang17-release-static.log
I understand the default build is consistent: add_subdirectory(ThirdParty/SPIRV-Tools) gives source/opt/pass.h (and ir_context.h, type_manager.h, decoration_manager.h). #362 then skips that subdirectory when SPIRV-Tools-static/SPIRV-Tools-opt already exist. ShaderTools CMake also does get_target_property(SOURCE_DIR SPIRV-Tools-opt) and adds that path for those private headers.
That works if the existing target still comes from an vendorized SPIRV-Tools source directory. It does not work for an imported target from find_package. Also, Khronos does not install source/opt/, and SOURCE_DIR is not a checkout.
It would help packagers if Diligent could keep supporting installed SPIRV-Tools as in #362, without requiring those private headers. Regards!
Hello! 馃憢
We are updating DiligentCore in Conan Center to API256019. The Conan recipe does not use the vendored
ThirdParty/SPIRV-Toolstree, instead, it uses an installed SPIRV-Tools that only ships the public headers (include/spirv-tools/).That layout still works for
SPIRVTools.cpp(#include "spirv-tools/optimizer.hpp"). It fails on the custom pass added in #737:You can see my full build log: diligent-core-256019-macos-armv8-clang17-release-static.log
I understand the default build is consistent:
add_subdirectory(ThirdParty/SPIRV-Tools)givessource/opt/pass.h(and ir_context.h, type_manager.h, decoration_manager.h). #362 then skips that subdirectory when SPIRV-Tools-static/SPIRV-Tools-opt already exist. ShaderTools CMake also doesget_target_property(SOURCE_DIR SPIRV-Tools-opt)and adds that path for those private headers.That works if the existing target still comes from an vendorized SPIRV-Tools source directory. It does not work for an imported target from
find_package. Also, Khronos does not installsource/opt/, andSOURCE_DIRis not a checkout.It would help packagers if Diligent could keep supporting installed SPIRV-Tools as in #362, without requiring those private headers. Regards!