summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-04-17 09:01:58 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-02 14:28:23 (GMT)
commit6fbd9a8f3d98630746aa2ac6f38c80b7b9306381 (patch)
tree0c93f8cd0fe84092dc346ced797d13ad9929a1ab
parentcbc9a9514d0dd00b35b3de694dab02a387ec2b52 (diff)
downloadCMake-6fbd9a8f3d98630746aa2ac6f38c80b7b9306381.zip
CMake-6fbd9a8f3d98630746aa2ac6f38c80b7b9306381.tar.gz
CMake-6fbd9a8f3d98630746aa2ac6f38c80b7b9306381.tar.bz2
Help: Add code example for INSTALL_INTERFACE to cmake-buildsystem.
-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