This project was generated by cmake-init.
It's heavily stripped down to focus on showing how to propagate transitive
dependencies.
This example is similar to cmake-init-multi-target, because this library
can be built as a static library, in which case private dependencies will show
up in your public link dependencies as $<LINK_ONLY:...>
generator expressions
and similar to cmake-init-use-pkg-config, because you have to modify the
installed config file to propagate dependencies.
- Link to the dependencies according to your requirements
(
PRIVATE
is build requirement,INTERFACE
is usage requirement,PUBLIC
is both) - Make the install config enumerate the packages
from above, but using
find_dependency
instead
Enumerating the dependencies is necessary even if the dependency is otherwise an internal implementation detail and is not otherwise exposed in the library interface.