hooks icon indicating copy to clipboard operation
hooks copied to clipboard

Add a post_package_info hook to check `cpp_info.resdirs`

Open SpaceIm opened this issue 3 years ago • 0 comments

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.resdirs miss existing res or share folder 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 if cpp_info.resdirs list non-existing folders.

SpaceIm avatar Feb 01 '23 10:02 SpaceIm