2016-12-25 1 views
0

깊이 센서로 작업하고 회색 음영 이미지를 가져 와서 OpenCV로 표시하려고합니다. 깊이 센서에서 아무런 문제없이 데이터에 액세스 할 수 있습니다.opencv 라이브러리를 추가 할 때 CMake 오류가 발생했습니다.

CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_PREFIXES 
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. 
Missing variable is: 
CMAKE_FIND_LIBRARY_SUFFIXES 
CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message): 
    Could NOT find CUDA (missing: CUDA_CUDART_LIBRARY) (found suitable exact 
    version "8.0") 
Call Stack (most recent call first): 
    /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE) 
    /usr/share/cmake/Modules/FindCUDA.cmake:958 (find_package_handle_standard_args) 
    /usr/local/share/OpenCV/OpenCVConfig.cmake:67 (find_package) 
    /usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_host_package) 
    share/royale-config.cmake:38 (find_package) 
    CMakeLists.txt:6 (find_package) 

내 CMakeLists.txt는 다음과 같습니다 :

cmake_minimum_required(VERSION 2.8) 

set(CMAKE_PREFIX_PATH "share") 

find_package(royale REQUIRED) 

find_package(OpenCV REQUIRED) 

link_directories(${royale_LIB_DIR}) 

project (depthDataCallBack) 

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc) 

add_executable(depthDataCallBack depthDataCallBack.cpp) 

target_link_libraries(depthDataCallBack "${royale_LIBS}") 

target_link_libraries(depthDataCallBack ${OpenCV_LIBS}) 

내가 CMake에 새로운 오전 나는 CMakeLists.txt에서 OpenCV의 부분을 포함 할 때 그러나 나는 다음과 같은 오류를 얻을. 그래서 모든 도움이 인정 될 것입니다. 감사!

답변

2

project() 호출해야합니다. 이 선행입니다. 대부분의 다른 명령이 호출됩니다.

일반적으로 cmake_minimum_required()과 변수 할당은 project() 앞에 올 수 있습니다.

올바른 :

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

너무 감사합니다! 그것은 효과가있다! –

관련 문제