CMAKE_FIND_ROOT_PATH_MODE_INCLUDE
时间: 2023-09-15 22:23:54 浏览: 112
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE is a CMake variable that specifies how CMake should search for include directories when cross-compiling. It can have one of three values:
- "NEVER": CMake will not search for include directories in any of the root paths.
- "ONLY": CMake will only search for include directories in the root paths.
- "BOTH": CMake will first search for include directories in the root paths, and then search in the system paths if they are not found in the root paths.
This variable is useful when cross-compiling for a different system, where the headers and libraries may be located in different locations than on the host system. Setting this variable correctly ensures that CMake can find the necessary headers and libraries during the build process.
阅读全文