Compiling opencv samples: unknown cmake command ocv_check_dependencies

后端 未结 8 1111
余生分开走
余生分开走 2020-12-06 02:05

I am trying to build the OpenCV samples which come with the source package and I get the following:

CMake Error at CMakeLists.txt:10 (ocv_check_dependencies)         


        
8条回答
  •  -上瘾入骨i
    2020-12-06 02:29

    I got it.

    In order to build the samples one has to change the default configuration for cmake by providing it via -D. What I did wrong was that I tried to execute cmake from within the samples directory.

    The proper way to build the samples is invoking cmake like so (from within the root directory of the unpacked archive):

    cmake -DBUILD_SAMPLES .
    

    which will turn samples ON. One can proceed using make, make install than. The samples can be found in bin after building.

    See also FAQ

提交回复
热议问题