有时从GitHub上面选择download压缩包源码解压后尝试CMake时可能会遇到如下报错:
CMake Error at CMakeLists.txt:120 (message):
submodule(s) are missing, please update your repository:
> git submodule update -i
Configuring incomplete, errors occurred!
这意味着CMake没有成功找到项目的子系统,会发生错误的原因是这种通过下载zip来编译源码的方式不正确,GitHub 的 ZIP 下载功能不会包含子模块(submodule)的源码。
解决方法就是清空zip解压而来的源码后使用git语句克隆仓库,例如:
git clone --recurse-submodules https://github.com/bla/bla.git
随后尝试CMake发现此报错解决(虽然很可能还会有其他报错就是了)。
868

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



