For my library bla I have a Config.cmake.in that does a find_dependency(foo) because bla depends on foo and by using find_dependency(foo) I can propogate this dependency to any project that uses bla via find_package(bla REQUIRED).
This works (the find_package(bla) part), however this foo dependency is resolved via a custom Findfoo.cmake file that is part of the bla project and not available to any downstream projects.
i.e: I install bla to /usr/local/... via sudo make install and it writes a bunch of things:
- The library itself
/usr/local/lib/libbla.so - The CMake config file(s) so that
find_package(bla REQUIRED)is possible under/usr/local/lib/cmake/bla
But it does not write Findfoo.cmake anywhere.
How to handle this so that downstream projects also have access to this custom Findfoo.cmake file?