opencv: make cascades relocatable on win32
Submitted by LRN
Default cascade paths are hardcoded as:
OPENCV_PREFIX + PATH_TO_CASCADE
where OPENCV_PREFIX is obtained by pkg-conifg from opencv.pc
First problem is that w32 pkg-config by default gets a DOS version
of OPENCV_PREFIX, so the resulting cascade path is:
This can be fixed by passing --dont-define-prefix to pkg-config
(a trick well-known to anyone who builds anything with MinGW/MSYS),
which makes it output prefix that starts with '/' (usually '/mingw').
So now cascade path is:
Which fixes nothing, since Windows does not understand POSIX paths.
However, in this case some code and path wizardry can fix the situation
(see the patch attached).