TL;DR;
I am trying to build OpenCV for MinGW. cmake
keeps complaining about no sane CXX compiler, although I can compile sample code with g++.exe.
I tried everthing mentioned here and CMAKE_MAKE_PROGRAM not found but nothing helped. Then restarted the computer and it works.
cleanup! delete all previous build attempts, CmakeFile.cache
, etc.
have MingW/bin on the path
make a folder within the opencv dir, called build_mingw, cd
there
cmake -G "MinGW Makefiles" -D CMAKE_CXX_COMPILER=mingw32-g++.exe -D CMAKE_MAKE_PROGRAM=mingw32-make.exe ..
# <-- note the dots at the end
mingw32-make
mingw32-make install