Non-standard include/lib path in dependencies in Yocto

Assume we have two recipes, packageA and libA. And packageA depends on libA. And libA has non-standard path for headers and libs, something like /opt/vendor/liba/include and /opt/vendor/liba/lib. My initial assumption was that these directories should be added to -dev FILES and that’s that. Wrong. These dependencies should be installed as a part of sysroot_stage_all_append stage, something like this should be added to liba-1.0.bb:

sysroot_stage_all_append () {
    sysroot_stage_dir ${D}/opt/vendor/liba ${SYSROOT_DESTDIR}/opt/vendor/liba
}