You will have the same problems when exporting a CMake config package:
CMake config package
you have to write the find_dependency() calls.
find_dependency()
see Installed module library can't find imported headers [Ubuntu 22.04 LTS, CMake 3.28.1, Ninja 1.11.1 and Clang 17.0.6] - #18 by ben.boeckel