cmake .. 时Dlib报错:Could not find...DLibConfig.cmake dlib-config.cmake

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_44401286/article/details/102543885

CMake Error at applications/badslam/CMakeLists.txt:6 (find_package):
By not providing “FindDLib.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “DLib”, but
CMake did not find one.

Could not find a package configuration file provided by “DLib” with any of
the following names:

DLibConfig.cmake
dlib-config.cmake

Add the installation prefix of “DLib” to CMAKE_PREFIX_PATH or set
“DLib_DIR” to a directory containing one of the above files. If “DLib”
provides a separate development package or SDK, be sure it has been
installed.

   问题很简单,报错找不到什么,就修改什么即可。cd到电脑目录/usr/local/lib/cmake/dlib文件夹下,

发现有.cmake文件,其中包含dlibConfig.cmake
这是一个很让人无语的问题,可能是我没有修改CMakeLists.txt的缘故吧,只需要把该文件的名字修改为报错未找到的名字即可。
通过一下语句,即可完成:

sudo mv dlibConfig.cmake DLibConfig.cmake

猜你喜欢

转载自blog.csdn.net/weixin_44401286/article/details/102543885