A library built that way would never need to reference cub.h
This isn't really specific to cub, but is a general concept when building binaries/executables/libraries. It's not necessary for the header files that were used to build it, to be available after compilation. You generally would not even need cub to be installed on the target machine where the library is used.
There is one exception, at least at this level of discussion. Presumably the "interface" to your library is:
void myFunc();
The header file that contains that prototype/declaration, whatever you happen to name that include file, would need to be "available" for any code that used your library, to provide the interface. But even that header file is only needed for compilation of the target code, it doesn't need to be on the machine where such codes are run.
Again, none of this is really specific to cub, these are general concepts for building code and libraries.