From e5e9b8e9a33186c0684974a54507d07596d72a1b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 17 Apr 2014 11:01:58 +0200 Subject: [PATCH 1/2] Help: Add code example for INSTALL_INTERFACE to cmake-buildsystem. --- Help/manual/cmake-buildsystem.7.rst | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Help/manual/cmake-buildsystem.7.rst b/Help/manual/cmake-buildsystem.7.rst index 501b92444..3e1f01135 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 + $ + $ + $ + $/$/generated> + ) Two convenience APIs are provided relating to include directories usage requirements. The :variable:`CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE` variable From 692228e41821a1af1f904304984c7366ae2ca288 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Thu, 17 Apr 2014 11:05:20 +0200 Subject: [PATCH 2/2] Help: Link to cmake-buildsystem from CMP0052 docs. --- Help/policy/CMP0052.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Help/policy/CMP0052.rst b/Help/policy/CMP0052.rst index f857f36f4..48cfc9c70 100644 --- a/Help/policy/CMP0052.rst +++ b/Help/policy/CMP0052.rst @@ -10,6 +10,9 @@ the installation prefix. This makes the installation depend on the existence of the source dir or binary dir, and the installation will be broken if either are removed after installation. +See :ref:`Include Directories and Usage Requirements` for more on +specifying include directories for targets. + The OLD behavior for this policy is to export the content of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` with the source or binary directory. The NEW behavior for this