How to build OpenCV 3.2 with libjpeg-turbo for iOS so that it can be used with Qt (5.7.1 or 5.8) and avoid the JPEG version mismatch error and crash. I was using the following with 2.4
cmake -DWITH_JPEG=ON -DBUILD_JPEG=OFF -DJPEG_INCLUDE_DIR=/path/to/libjepeg-turbo/include/ -DJPEG_LIBRARY=/path/to/libjpeg-turbo/lib/libjpeg.a /path/to/OpenCV
and this worked, but fails with 3.2. If I use the 'OpenCV for iOS' with Qt and try to load a jpeg file with imdecode the application will crash with a jpeg version mismatch error.
Eventually is there other workaround for this?
Qt 5.7.1
#define JVERSION "8c 16-Jan-2011"
OpenCV 3.2
#define JVERSION "9 13-Jan-2013"