OpenCV模块作为符号链接导致cmake错误

时间:2014-02-26 11:46:46

标签: c++ opencv cmake

我收到以下错误:

CMake Error at cmake/OpenCVModule.cmake:232 (add_subdirectory):
  add_subdirectory given source "C:/dev/opencv/modules/ascend" which is not
  an existing directory.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)

我将模块创建为符号链接

C:\WINDOWS\system32>mklink /D "C:\dev\opencv\modules\ascend" "C:\dev\AscendProje
cts\AscendPipeline\opencv_ascend"
symbolic link created for C:\dev\opencv\modules\ascend <<===>> C:\dev\AscendProj
ects\AscendPipeline\opencv_ascend

是不是可以以某种方式解决这个问题?

1 个答案:

答案 0 :(得分:0)

OpenCV CMake脚本具有OPENCV_EXTRA_MODULES_PATH选项,允许设置可选模块的路径。您不必创建符号链接:

cd <opencv_build_directory>
cmake -DOPENCV_EXTRA_MODULES_PATH=C:\dev\AscendProjects\AscendPipeline .