summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-buildsystem.7.rst
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-17 09:01:58 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-04-17 09:01:58 (GMT)
commite5e9b8e9a33186c0684974a54507d07596d72a1b (patch)
tree5a4ddfcd12bfd70200be63e04c2e6b597690f4a7 /Help/manual/cmake-buildsystem.7.rst
parentfd8bb3427858017754d5b08a2eb1f57116feebb6 (diff)
downloadCMake-e5e9b8e9a33186c0684974a54507d07596d72a1b.zip
CMake-e5e9b8e9a33186c0684974a54507d07596d72a1b.tar.gz
CMake-e5e9b8e9a33186c0684974a54507d07596d72a1b.tar.bz2
Help: Add code example for INSTALL_INTERFACE to cmake-buildsystem.
Diffstat (limited to 'Help/manual/cmake-buildsystem.7.rst')
-rw-r--r--Help/manual/cmake-buildsystem.7.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst
index 501b924..3e1f011 100644
--- a/Help/manual/cmake-buildsystem.7.rst
+++ b/Help/manual/cmake-buildsystem.7.rst
@@ -580,7 +580,17 @@ and the install-tree. The ``BUILD_INTERFACE`` and ``INSTALL_INTERFACE``
generator expressions can be used to describe separate usage requirements
based on the usage location. Relative paths are allowed within these
expressions, and are interpreted relative to the current source directory
-or the installation prefix, as appropriate.
+or the installation prefix, as appropriate:
+
+.. code-block:: cmake
+
+ add_library(ClimbingStats climbingstats.cpp)
+ target_include_directories(ClimbingStats INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/generated>
+ $<INSTALL_INTERFACE:/absolute/path>
+ $<INSTALL_INTERFACE:relative/path>
+ $<INSTALL_INTERFACE:$<INSTALL_PREFIX>/$<CONFIG>/generated>
+ )
Two convenience APIs are provided relating to include directories usage
requirements. The :variable:`CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE` variable