hooks
hooks copied to clipboard
Add a post_package_info hook to check `cpp_info.resdirs`
see https://github.com/conan-io/conan-center-index/issues/15581 & https://github.com/conan-io/conan-center-index/issues/15599#issuecomment-1410808888
When a recipe is migrated to layout(), cpp_info.resdirs is empty by default instead of ["res"]. For most recipe it's fine and a good default, but few recipes now need to set this attribute explicitly.
I propose this hook:
- Report an error if
cpp_info.resdirsmiss existingresorsharefolder in root package folder. Since conan v1 recipes always populate resdirs, this hook shouldn't break them. - bonus: if a recipe uses
layout()(conan v2 recipes only), report an error ifcpp_info.resdirslist non-existing folders.