INTERFACE_INCLUDE_DIRECTORIES_WARNING.txt 957 B

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