2011-09-10 13 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を選択しました次のエラー出力が表示されます。

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をオンにします。

関連する問題