在编译 github 项目时,可能会遇到下面的报错:
CMake Error at CMakeLists.txt:92 (add_subdirectory):
The source directory
xxxxx
CMake Error at src/Runtime/CMakeLists.txt:56 (pybind11_add_module):
Unknown CMake command "pybind11_add_module".
这种一般是缺少第三方依赖项,可以尝试下面的命令:
git submodule init && git submodule update
参考:
https://stackoverflow.com/questions/59291154/cmake-error-at-cmakelists-txt994-add-subdirectory