如何将外部库导入到CMakeLists.txt文件中?
CmakeLists.txt
cmake_minimum_required(VERSION 3.4.1)
include_directories(../../../../openCV410/native/jni/include)
add_library(lib_opencv SHARED IMPORTED)
set_target_properties(lib_opencv PROPERTIES IMPORTED_LOCATION ${PROJECT_SOURCE_DIR}/../../../../openCV410/native/libs/${ANDROID_ABI}/libopencv_java4.so)
我的cpp文件:
#include <opencv2/opencv.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc_c.h>
导出当前模块时出现一些问题。 然后,我决定使用外部库:
implementation 'com.quickbirdstudios:opencv:4.1.0'
如何将com.quickbirdstudios
内的目录和add_library包含到我的CMakeLists.txt中