Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about shared global target in CMake components #1946

Merged
merged 2 commits into from Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions reference/generators/cmake_find_package.rst
Expand Up @@ -82,3 +82,8 @@ If a recipe uses components, the targets generated will be ``<PKG-NAME>::<COMP-N
Moreover, a global target ``<PKG-NAME>::<PKG-NAME>`` will be declared with the following properties adjusted:

- ``INTERFACE_LINK_LIBRARIES``: Containing all the component targets to link the global target to (includes package's components only).

.. important::

If there is a global target shared by different packages, then the global target will be linked to all the components targets **across
the different packages**. This means that the global target will include different components targets across different packages.
danimtb marked this conversation as resolved.
Show resolved Hide resolved
5 changes: 5 additions & 0 deletions reference/generators/cmake_find_package_multi.rst
Expand Up @@ -97,3 +97,8 @@ If a recipe uses :ref:`components <package_information_components>`, the targets
Moreover, a global target ``<PKG-NAME>::<PKG-NAME>`` will be declared with the following properties adjusted:

- ``INTERFACE_LINK_LIBRARIES``: Containing the list of targets for all the components in the package.

.. important::

If there is a global target shared by different packages, then the global target will be linked to all the components targets **across
the different packages**. This means that the global target will include different components targets across different packages.