我有一个使用OpenCV的Cpp项目。我使用cmake构建它是CMakeLists.txt:
set(CMAKE_CXX_STANDARD 11)
find_package( OpenCV 3.1.0 REQUIRED core text)
include_directories( ${OpenCV_INCLUDE_DIRS})
set(OpenCV_LIBS opencv_core opencv_objdetect)
add_library(opencv lib/utils/opencv.cpp lib/utils/opencv.h)
set(SOURCES main.cpp )
add_executable( ${PROJECT_NAME} ${SOURCES} )
target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} )
target_link_libraries( ${PROJECT_NAME} opencv )
在Android工作室我有一些外部本机构建问题:
......
CMake Error at /home/benng/bin/opencv_working_dir/opencv-3.1.0/build/OpenCVConfig.cmake:86 (include):
include could not find load file:
/home/benng/bin/opencv_working_dir/opencv-3.1.0/build/OpenCVModules_armeabi.cmake
Call Stack (most recent call first):
src/CMakeLists.txt:5 (find_package)
OpenCV version : 3.1.0
...
我想知道:
- 如果我必须使用OpenCV SDK for android或只是给我的项目的CMakeLists.txt和android studio完成其余的工作?
- 为了正确构建我的项目,我需要提供哪些额外信息? (像往常一样)
- 还有其他方法可以实现我的目标吗?
顺便说一下,这是一个开源项目,你可以在这里查看:
https://bitbucket.org/BenNG/sudoku-recognizer
谢谢!