To keep the Q&A aspect:
I got a strange problem with the latest (v.2.4.2) OpenCV version, which failed to install with the following error:
In file included from /OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37:1:
warning: missing terminating ” character In file included from
/OpenCV-2.4.2/modules/core/src/system.cpp:460:
/OpenCV-2.4.2/release/modules/core/version_string.inc:37: error:
missing terminating ” character
So what went wrong? Take a look at my answer.
As mentioned in this bug report the problem is an old version (2.8.2) of cmake. So the solution was to grab a fresh copy of the cmake source, compile it and use it to install OpenCV.
Note 18/09/2012: This also works on Ubuntu 12.04 with cmake 2.8.9!
That’s it.