1 ade下载超时
查看CMakeDownlodLog.txt找下载地址和目标路径(包含md5值),按下载地址下载文件,放到你的opencv-4.7.0/.cache/ade下,记得把文件改名改成包含md5值的。其他缺失文件也可以一样处理。
2 即使下载完依然cmake报错
-- Configuring done
CMake Error at modules/gapi/cmake/DownloadADE.cmake:23 (add_library):
No SOURCES given to target: ade
Call Stack (most recent call first):
modules/gapi/cmake/init.cmake:20 (include)
cmake/OpenCVModule.cmake:298 (include)
cmake/OpenCVModule.cmake:361 (_add_modules_1)
cmake/OpenCVModule.cmake:385 (ocv_glob_modules)
CMakeLists.txt:951 (ocv_register_modules)
查看DownloadADE.cmake文件,检查路径,
set(ade_src_dir "${OpenCV_BINARY_DIR}/3rdparty/ade")
set(ade_filename "v0.1.2a.zip")
set(ade_subdir "ade-0.1.2a")
set(ADE_root "${ade_src_dir}/${ade_subdir}/sources/ade")
file(GLOB_RECURSE ADE_sources "${ADE_root}/source/*.cpp")
file(GLOB_RECURSE ADE_include "${ADE_root}/include/ade/*.hpp")
add_library(ade STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL}
${ADE_include}
${ADE_sources}
)
这个ADE_sources解出来是{OpenCV_BINARY_DIR}/3rdparty/ade/ade-0.1.2a/sources/ade
,而我们实际上的目录是:opencv-4.7.0/build/3rdparty/ade/ade-v0.1.2a
,所以把这个ade_subdir中的v
加上就能cmake成功了。
参考资料
CMAKE编译 opencv、opencv_contrib出现ADE无法下载解决方案
标签:cmake,sources,ade,opencv,ADE,ubuntu,include From: https://www.cnblogs.com/rthete/p/17972814