How to reference another (library) package using cmake builds

I have two packages each with a OpenWrt Makefile. Each of these packages are actually cmake projects so the Makefile includes cmake.mk and uses default package/xxxx/Compile stanza. The second package depends on the first. So I added the pkgA name to DEPENDS:=. This pkgA compiles just fine and the files get installed into build_dir but not staging_dir using:

make package/pkgA/compile
make package/pkgA/install

The second package errors out of cmake because it cant find pkgA's include and lib file. The CMAKE_PREFIX_PATH is being set to the staging_dir instead of build_dir but after the package compile|install step above the files arent in staging_dir (not sure why), they are only in build_dir.

I've made a few OpenWRT packages and many cmake projects, but I can't figure out how to configure pkgB to properly find the dir for pkgA and this is new for me.
The actual path to the file it needs to find is:

/src/qsdk/build_dir/target-arm_cortex-a7_musl-1.1.16_eabi/pkgA/libremote-conf/libremote-conf.so

Is there something in pkgA I need to do to get it to export it's interfaces or something, so then pkgB can find it?

suggestions or links to the proper page would be most welcome!

Thanks,
Colin

you name your openwrt buildroot qsdk?

well thought/written out question tho'...

extra level of nesting?

a Makefile says 1000 words...

Sounds like you are working with QSDK based on ancient OpenWrt (LEDE), so things may have changed.

You might look into ubox that depends on libubox, and both are cmake packages.

Libubox e.g. sets CMAKE_HOST_OPTIONS

Thank you! That is perfect. Specifically how libubox sets the install to STAGING_DIR.