美文网首页
By not providing "FindOpenCV.cma

By not providing "FindOpenCV.cma

作者: XBruce | 来源:发表于2021-11-02 23:31 被阅读0次

    The error you're seeing is that CMake cannot find a FindOpenCV.cmake file, because cmake doesn't include one out of the box. Therefore you need to find one and put it where cmake can find it:

    You can find a good start here. If you're feeling adventurous you can also write your own.

    Then add it somewhere in your project and adjust CMAKE_MODULE_PATH so that cmake can find it.

    e.g., if you have

    CMakeLists.txt
    cmake-modules/FindOpenCV.cmake
    
    

    Then you should do a

    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules)
    
    

    In your CMakeLists.txt file before you do a find_package(OpenCV)

    相关文章

      网友评论

          本文标题:By not providing "FindOpenCV.cma

          本文链接:https://www.haomeiwen.com/subject/uaafzltx.html