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