INCLUDE_DIRECTORIES¶
在 4.4 版被加入.
預處理器引入搜尋目錄的列表。
This property holds a semicolon-separated list of
paths and will be added to the list of include directories when the sources of
this file set are built. These directories will take precedence over
directories defined at target level and source level except for
Xcode generator due to technical limitations.
不應直接將相對路徑新增到此屬性中。
Contents of INCLUDE_DIRECTORIES may use
generator expressions with the
syntax $<...>. However, Xcode does not support per-config
per-source settings, so expressions that depend on the build configuration are
not allowed with that generator.
相關屬性:
Use
COMPILE_DEFINITIONSto pass additional preprocessor definitions.Use
COMPILE_OPTIONSto pass additional compile flags.
相關命令:
include_directories()for directory-wide settingstarget_include_directories()for target-specific settingsset_source_files_properties()for source-specific settings