INCLUDE_DIRECTORIES: Add include directories to the build.
INCLUDE_DIRECTORIES([AFTER|BEFORE] [SYSTEM] dir1 dir2 ...)
Add the given directories to those searched by the compiler for include files. By default the directories are appended onto the current list of directories. This default behavior can be changed by setting CMAKE_INCLUDE_DIRECTORIES_BEFORE to ON. By using BEFORE or AFTER you can select between appending and prepending, independent from the default. If the SYSTEM option is given the compiler will be told that the directories are meant as system include directories on some platforms.
本文介绍了如何使用CMake的INCLUDE_DIRECTORIES命令来指定编译器搜索头文件的路径。默认情况下,这些路径会被追加到现有路径列表中,但可以通过设置CMAKE_INCLUDE_DIRECTORIES_BEFORE或使用BEFORE选项改变这一行为。此外,还可以通过SYSTEM选项指定这些路径为系统头文件路径。
946

被折叠的 条评论
为什么被折叠?



