Ошибка подключения библиотеки через CMake

Вопрос вроде бы как банальный, но решить не могу.

Нужно подключить ceres solver к проекту c++. CMakeList выглядит так

...
find_package(Ceres REQUIRED)
...
target_link_libraries(library ${CERES_LIBRARIES})
...

Но CMake выдаёт такую ошибку

CMake Error at /usr/local/lib/cmake/Ceres/CeresTargets.cmake:80 (message):
  The imported target "Ceres::ceres" references the file

     "/usr/local/lib/libceres.a"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/local/lib/cmake/Ceres/CeresTargets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/lib/cmake/Ceres/CeresConfig.cmake:272 (include)
  library/CMakeLists.txt:4 (find_package)

Я поискал и понял, что libceres.a лежить в "/usr/lib/libceres.a", а CeresTargets.cmake - в "/usr/lib/cmake/Ceres/CeresTargets.cmake"

Как мне теперь указать путь в CMakeList, что бы поиск был не в /usr/local/lib/, а в /usr/lib/?


Ответы (0 шт):