更新时间:2022-03-22 23:06:40
所需的模块应该是cmake安装的一部分.但是您必须使用以下方法将其包含在您的项目中:
The required module should be part of your cmake installation. But you have to include it into your project with:
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
在调用externalproject_add(YOUR STUFF HERE)
说明:
CMAKE_ROOT 指向正在使用的cmake安装.所有模块都在子文件夹 Modules 中.
CMAKE_ROOT points to the cmake installation in use. All modules are within subfolder Modules.
您可以使用message(STATUS "CMAKE_ROOT=${CMAKE_ROOT}")
打印当前值.或者您正在为此使用智能宏.参见 CMake
You can print out the current value with message(STATUS "CMAKE_ROOT=${CMAKE_ROOT}")
. Or you are using smart macros for that. See CMake