Haibo Huang | d00577c | 2020-02-28 16:35:48 -0800 | [diff] [blame] | 1 | INCLUDE_DIRECTORIES |
| 2 | ------------------- |
| 3 | |
| 4 | List of preprocessor include file search directories. |
| 5 | |
| 6 | This property specifies the list of directories given so far to the |
| 7 | :command:`include_directories` command. |
| 8 | |
| 9 | This property is used to populate the :prop_tgt:`INCLUDE_DIRECTORIES` |
| 10 | target property, which is used by the generators to set the include |
| 11 | directories for the compiler. |
| 12 | |
| 13 | In addition to accepting values from that command, values may be set |
| 14 | directly on any directory using the :command:`set_property` command, and can be |
| 15 | set on the current directory using the :command:`set_directory_properties` |
| 16 | command. A directory gets its initial value from its parent directory if it has |
| 17 | one. The initial value of the :prop_tgt:`INCLUDE_DIRECTORIES` target property |
| 18 | comes from the value of this property. Both directory and target property |
| 19 | values are adjusted by calls to the :command:`include_directories` command. |
| 20 | Calls to :command:`set_property` or :command:`set_directory_properties`, |
| 21 | however, will update the directory property value without updating target |
| 22 | property values. Therefore direct property updates must be made before |
| 23 | calls to :command:`add_executable` or :command:`add_library` for targets |
| 24 | they are meant to affect. |
| 25 | |
| 26 | The target property values are used by the generators to set the |
| 27 | include paths for the compiler. |
| 28 | |
| 29 | Contents of ``INCLUDE_DIRECTORIES`` may use "generator expressions" with |
| 30 | the syntax ``$<...>``. See the :manual:`cmake-generator-expressions(7)` |
| 31 | manual for available expressions. See the :manual:`cmake-buildsystem(7)` |
| 32 | manual for more on defining buildsystem properties. |