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.

不應直接將相對路徑新增到此屬性中。

INCLUDE_DIRECTORIES 的內容可以使用語法 $<...> 的「生成器表達式」。請參閱 cmake-generator-expressions(7) 手冊以了解可用的表達式。但是,Xcode 不支援依組態和依來源的設定,因此不允許在該生成器中使用依賴於建置組態的表達式。

相關屬性:

相關命令: