Found a bug in windows cmake when trying to recompile opencv – apparently it cannot reset the file date stamp correctly, so fails to uncompress the source zip, and the whole generation process crashes..

I fixed it in the opencv source by replacing this line in the OpenCVDownload.cmake file (under the cmake source folder) by using the 7zip software instead of default unzipper..


execute_process(COMMAND "${CMAKE_COMMAND}" -E tar xzf "${CACHE_CANDIDATE}"



execute_process(COMMAND 7z x "${CACHE_CANDIDATE}"

and making sure the path is set to the 7zip executable 7z.exe