INTERFACE_INCLUDE_DIRECTORIES.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. INTERFACE_INCLUDE_DIRECTORIES
  2. -----------------------------
  3. .. |property_name| replace:: include directories
  4. .. |command_name| replace:: :command:`target_include_directories`
  5. .. |PROPERTY_INTERFACE_NAME| replace:: ``INTERFACE_INCLUDE_DIRECTORIES``
  6. .. |PROPERTY_LINK| replace:: :prop_tgt:`INCLUDE_DIRECTORIES`
  7. .. |PROPERTY_GENEX| replace:: ``$<TARGET_PROPERTY:foo,INTERFACE_INCLUDE_DIRECTORIES>``
  8. .. include:: INTERFACE_BUILD_PROPERTY.txt
  9. Include directories usage requirements commonly differ between the build-tree
  10. and the install-tree. The ``BUILD_INTERFACE`` and ``INSTALL_INTERFACE``
  11. generator expressions can be used to describe separate usage requirements
  12. based on the usage location. Relative paths are allowed within the
  13. ``INSTALL_INTERFACE`` expression and are interpreted relative to the
  14. installation prefix. For example:
  15. .. code-block:: cmake
  16. target_include_directories(mylib INTERFACE
  17. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/mylib>
  18. $<INSTALL_INTERFACE:include/mylib> # <prefix>/include/mylib
  19. )
  20. Creating Relocatable Packages
  21. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  22. .. |INTERFACE_PROPERTY_LINK| replace:: ``INTERFACE_INCLUDE_DIRECTORIES``
  23. .. include:: /include/INTERFACE_INCLUDE_DIRECTORIES_WARNING.txt