CMake/Help/include/INTERFACE_INCLUDE_DIRECTORIES_WARNING.txt
Brad King 227992c3a6 Help: Reorganize and refine discussion of relocatable packages
Re-organize the content added to the cmake-packages(7) manual by

* commit v3.0.0-rc1~184^2 (Help: Document export(EXPORT) in the
  cmake-packages manual, 2013-12-23),

* commit v3.0.0-rc1~154^2~1 (Help: Add notes about relocatability
  of config-file packages, 2014-01-07), and

* commit v3.2.0-rc1~345^2 (Help: Warn that paths should not be used
  in INTERFACE_ build properties, 2014-11-22).

These commits broke the natural flow of the original manual and made
wording after the new content make less sense.  Move the content into
new subsections to restore the flow of the original manual and to
make explicitly the purpose of the new content.

Shorten the relocatable usage requirement "warnings".  Refer to the
new cmake-packages(7) manual subsection to reduce duplication.  Also
clarify the distinction between paths to library dependencies and
paths to their header files.
2015-04-03 10:52:24 -04:00

19 lines
957 B
Plaintext

Note that it is not advisable to populate the ``INSTALL_INTERFACE`` of the
|INTERFACE_PROPERTY_LINK| of a target with absolute paths to the include
directories of dependencies. That would hard-code into installed packages
the include directory paths for dependencies
**as found on the machine the package was made on**.
The ``INSTALL_INTERFACE`` of the |INTERFACE_PROPERTY_LINK| is only
suitable for specifying the required include directories for headers
provided with the target itself, not those provided by the transitive
dependencies listed in its :prop_tgt:`INTERFACE_LINK_LIBRARIES` target
property. Those dependencies should themselves be targets that specify
their own header locations in |INTERFACE_PROPERTY_LINK|.
See the :ref:`Creating Relocatable Packages` section of the
:manual:`cmake-packages(7)` manual for discussion of additional care
that must be taken when specifying usage requirements while creating
packages for redistribution.