CMake error when trying to add opencv libraries

后端 未结 1 837
感情败类
感情败类 2021-01-26 03:10

I am trying to work with a depth sensor and trying to get the grayscale image and display it with OpenCV. I can access the data from the depth sensor without any issues. But I g

相关标签:
1条回答
  • 2021-01-26 03:37

    project() call should precede most of other commands call.

    Normally, only cmake_minimum_required() and variables assignments may come before the project().

    Correct:

    cmake_minimum_required(VERSION 2.8)
    
    set(CMAKE_PREFIX_PATH "share")
    
    project (depthDataCallBack)
    
    find_package(royale REQUIRED)
    find_package(OpenCV REQUIRED)
    link_directories(${royale_LIB_DIR})
    
    ...
    
    0 讨论(0)
提交回复
热议问题