Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

error in OpenCVConfig.cmake for OpenCV-android-sdk v. 3.2.0

I have a project building a sample camera calibration app for android using cmake. I am using version 3.2.0 of the android sdk from the opencv sourceforge page.

In my CMakeLists.txt I have manually set the OpenCV_DIR to <path_to_opencv-android-sdk>/sdk/native/jni/ because that's where OpenCVConfig.cmake is. However, inside OpenCVConfig.cmake, it looks for <abi name="">/OpenCVConfig.cmake, which does not exist because in the <abi name=""> subdirectory there is OpenCVConfig-version.cmake rather than OpenCVConfig.cmake.

In <path_to_opencv-android-sdk>/sdk/native/jni/OpenCVConfig.cmake, changing

if(EXISTS "${OpenCV_CONFIG_PATH}/OpenCVConfig.cmake") include("${OpenCV_CONFIG_PATH}/OpenCVConfig.cmake") else()

to

if(EXISTS "${OpenCV_CONFIG_PATH}/OpenCVConfig-version.cmake") include("${OpenCV_CONFIG_PATH}/OpenCVConfig-version.cmake") else()

fixes that problem and allows me to build, but I wanted to check that this is an error before submitting a fix for this. If this is an error, I also would like some info on how to submit a fix to this.

error in OpenCVConfig.cmake for OpenCV-android-sdk v. 3.2.0

I have a project building a sample camera calibration app for android using cmake. I am using version 3.2.0 of the android sdk from the opencv sourceforge page.

In my CMakeLists.txt I have manually set the OpenCV_DIR to <path_to_opencv-android-sdk>/sdk/native/jni/ < path_to_OpenCV-android-sdk >/sdk/native/jni/ because that's where OpenCVConfig.cmake is. However, inside OpenCVConfig.cmake, it looks for <abi name="">/OpenCVConfig.cmake, < abi name >/OpenCVConfig.cmake, which does not exist because in the <abi name=""> < abi name > subdirectory there is OpenCVConfig-version.cmake rather than OpenCVConfig.cmake.

In <path_to_opencv-android-sdk>/sdk/native/jni/OpenCVConfig.cmake, < path_to_OpenCV-android-sdk >/sdk/native/jni/OpenCVConfig.cmake, changing

if(EXISTS "${OpenCV_CONFIG_PATH}/OpenCVConfig.cmake") include("${OpenCV_CONFIG_PATH}/OpenCVConfig.cmake") else()

to

if(EXISTS "${OpenCV_CONFIG_PATH}/OpenCVConfig-version.cmake") include("${OpenCV_CONFIG_PATH}/OpenCVConfig-version.cmake") else()

fixes that problem and allows me to build, but I wanted to check that this is an error before submitting a fix for this. If this is an error, I also would like some info on how to submit a fix to this.