<export>
<cpp cflags="-I${prefix}/include" lflags="${prefix}/lib/libB.a"/>

To have the correct dependencies setup, CMake needs to know that it's an archive library, instead of a shared library. It can't do this from a -lfoo argument, but it can do it from a full path to libfoo.a. In fact, the emerging best practice for CMake is to always give it the full path to libraries.