Opencv_contrib: Unable to build from Source: Unknown CMake command "ocv_download".

Created on 14 Jul 2017  路  5Comments  路  Source: opencv/opencv_contrib

System information (version)
  • OpenCV => Latest from git
  • Operating System / Platform => Windows 10, 64 bit
  • Compiler => Visual Studio 2017, 64 bit
Detailed description

CMake failed to find command "ocv_download". D:/GitHub/opencv_contrib/modules/dnn_modern/CMakeLists.txt:20

It's unable to download tiny-dnn library. I managed to manually download the library and extract it into the opencv/3rdparty directory. But now I get a different error: CMake Error at D:/GitHub/opencv_contrib/modules/text/CMakeLists.txt:22 (ocv_add_testdata):
Unknown CMake command "ocv_add_testdata".

Attaching my CMake log files.

CMakeError.txt
CMakeOutput.txt

Steps to reproduce
  1. Clone the latest opencv and opencv_contrib from github
  2. Run CMake and select VS 2017 Win64 as the compiler (also tried with VS 2012 and 2015)
  3. Set OPENCV_EXTRA_MODULES_PATH to D:/GitHub/opencv_contrib/modules
invalid

All 5 comments

Latest from git

You should keep repositories synchronized - fetch latest code from both opencv/opencv_contrib.

ocv_add_testdata is here

Hi Alexander, I do have the latest from both opencv and opencv_contrib.

Actually I've successfully built opencv by itself and also with
opencv_contrib 3.2.0. The CMake errors occur only when I try to build the
latest opencv_contrib from git.

Here's the first error: CMake failed to find command "ocv_download".
D:/GitHub/opencv_contrib/modules/dnn_modern/CMakeLists.txt:20. The GitHub
link on that line in the CMake file actually gives me a 404. Could that the
reason why it's failing?

And if I get past that by manually downloading tiny-dnn then I get the
error: CMake Error at
D:/GitHub/opencv_contrib/modules/text/CMakeLists.txt:22 (ocv_add_testdata):
Unknown CMake command "ocv_add_testdata".

I'm trying to build directly from the source as I'm interested in the
latest dnn module.

Thanks for your help.

I'm trying to build directly from the source as I'm interested in the latest dnn module.

DNN module is moved from opencv_contrib to opencv repository.

I pulled the latest opencv version from git and was able to generate VS 2015 solution files successfully.

But then I ran into opencv_core compilation issues
RC : fatal error RC1103: invalid option, /FID:/GitHub/opencv/modules/core/src/precomp.hpp

which was resolved by reverting to CMake 3.8.2

Thanks for your help!

RC : fatal error RC1103: invalid option

Related issue for this problem: https://github.com/opencv/opencv/issues/9100

Was this page helpful?
0 / 5 - 0 ratings