Преглед изворни кода

Merge topic 'configure_file_docs_use_target_inc_dirs'

c89d467bf2 Help: configure_file doc example use `target_include_directories`

Acked-by: Kitware Robot <[email protected]>
Merge-request: !8121
Brad King пре 2 година
родитељ
комит
ed09c0aecd
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      Help/command/configure_file.rst

+ 2 - 2
Help/command/configure_file.rst

@@ -174,12 +174,12 @@ Otherwise it will contain:
   /* #undef FOO_ENABLE */
   /* #undef FOO_STRING */
 
-One may then use the :command:`include_directories` command to
+One may then use the :command:`target_include_directories` command to
 specify the output directory as an include directory:
 
 .. code-block:: cmake
 
-  include_directories(${CMAKE_CURRENT_BINARY_DIR})
+  target_include_directories(<target> [SYSTEM] <INTERFACE|PUBLIC|PRIVATE> "${CMAKE_CURRENT_BINARY_DIR}")
 
 so that sources may include the header as ``#include <foo.h>``.