Updated by Alexander Smorkalov over 12 years ago
cooperz:
If libopencv_java is the preferred way of linking against OpenCV on Android, then this should really be reflected in the OpenCVConfig.cmake file from sdk/native/jni folder, to resemble more what is found in OpenCV.mk for NDK, no?
I've modified the file OpenCVConfig.cmake, by replacing:
<pre>
SET(OpenCV_LIB_COMPONENTS opencv_java)
</pre>
and adding:
<pre>
set(OpenCV_opencv_java_LIBNAME_OPT "libopencv_java.so") set(OpenCV_opencv_java_DEPS_OPT ) set(OpenCV_opencv_java_EXTRA_DEPS_OPT )
</pre>
Now arm-linux-androideabi-objdump -p libOpenCV.so confirms that it links against libopencv_java.so.
If libopencv_java is the preferred way of linking against OpenCV on Android, then this should really be reflected in the OpenCVConfig.cmake file from sdk/native/jni folder, to resemble more what is found in OpenCV.mk for NDK, no?
I've modified the file OpenCVConfig.cmake, by replacing:
<pre>
SET(OpenCV_LIB_COMPONENTS opencv_java)
</pre>
and adding:
<pre>
set(OpenCV_opencv_java_LIBNAME_OPT "libopencv_java.so") set(OpenCV_opencv_java_DEPS_OPT ) set(OpenCV_opencv_java_EXTRA_DEPS_OPT )
</pre>
Now arm-linux-androideabi-objdump -p libOpenCV.so confirms that it links against libopencv_java.so.