2011-09-10 2 views
2

cmake로 opencv를 빌드하려고하는데 문제가 발생했습니다.cmake 오류로 opencv 빌드하기

Windows opencv 2.3.1을 C:/Users/chris/opencv에 다운로드했습니다. 내가 CMake GUI (CMake의 2.8.5 버전)을 열고 C:/Users/chris/opencv/modules으로 소스 디렉토리를 넣어 C:/temp/opencv_binaries

에서 "바이너리를 구축하는 경우"를 나는 Configure 치고 내가 다시 Configure 충돌 Visual Studio 2010에서 Visual Studio 2010을 선택했다 다음과 같은 오류 출력이 표시됩니다.

CMake Error at calib3d/CMakeLists.txt:1 (define_opencv_module): 
    Unknown CMake command "define_opencv_module". 


CMake Warning (dev) in CMakeLists.txt: 
    No cmake_minimum_required command is present. A line of code such as 

    cmake_minimum_required(VERSION 2.8) 

    should be added at the top of the file. The version specified may be lower 
    if you wish to support older CMake versions for this project. For more 
    information run "cmake --help-policy CMP0000". 
This warning is for project developers. Use -Wno-dev to suppress it. 

Configuring incomplete, errors occurred! 

무엇을 제공합니까? 이 문제를 해결하려면 어떻게해야합니까?

답변

6

가 최근 변경하지 않는 한, 소스 디렉토리는 C:/Users/chris/opencv/해야한다 -는 가장 높은 수준의 것 디렉토리에있는 CMakeLists.txt 파일과 함께. CMake GUI의 메뉴에서>Suppress dev Warnings (-Wno-dev) - 당신은 그냥 Options를 선택해야합니다에

0

CMakeLists.txt 파일의 내용은 무엇입니까?

경고를 피하기 위해 삽입 "cmake_minimum_required (버전 2.8)"당신의 CMakeLists.txt의 첫 번째 줄에

1
This warning is for project developers. Use -Wno-dev to suppress it. 

-Wno-dev을 돌립니다.