opencv: make cascades relocatable on win32
Submitted by LRN
Link to original bug (#747711)
Description
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:
A) Absolute
B) DOS
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:
A) Absolute
B) POSIX
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).