ocv_add_module中断了cMake文件的执行

时间:2018-03-30 07:57:29

标签: matlab opencv cmake

我正在尝试使用cMake 3.9.6配置MSVS Comunity 2017项目以获得opencv 3.4.1 Matlab 2017绑定。 在cMake中,我总是得到关于matlab模块的这两条消息:

Warning: Matlab bindings will only be built in Release configurations

Matlab:                        YES
mex:                         C:/Program Files/MATLAB/R2017b/bin/mex.bat
Compiler/generator:          Not working (bindings will not be generated)

我已经编辑了opencv_contrib matlab模块的CMakeList.txt来调试文件。我在配置时间组件中添加了两条消息(第102行),如下所示:

# ----------------------------------------------------------------------------
#  Configure time components
# ----------------------------------------------------------------------------
set(the_description "The Matlab/Octave bindings")

message(WARNING "Message 1")

ocv_add_module(matlab   BINDINGS
                       OPTIONAL  opencv_core
                                 opencv_imgproc opencv_ml
                                 opencv_imgcodecs opencv_videoio opencv_highgui
                                 opencv_objdetect opencv_flann opencv_features2d
                                 opencv_photo opencv_video opencv_videostab
                                 opencv_calib opencv_calib3d
                                 opencv_stitching opencv_superres
                                 opencv_xfeatures2d
)

message(WARNING "Message 2")

如果一切正常,“消息1”和“消息2”应出现在CMake配置过程中。当我使用cMake配置项目时,只显示“消息1”。

Found tiny-dnn in: C:/Datos/opencv-3.4.1/build/3rdparty/tinydnn/tiny-dnn-1.0.0a3
The protocol buffer compiler is not found (PROTOBUF_PROTOC_EXECUTABLE='')
freetype2:   NO
harfbuzz:    NO
Warning: Matlab bindings will only be built in Release configurations


CMake Warning at modules/opencv_contrib-3.4.1/modules/matlab/CMakeLists.txt:116 (message):
  Message 1


Module opencv_ovis disabled because OGRE3D was not found

“消息2”,永远不会出现。似乎ocv_add_module命令会破坏cMake文件的执行。

有人可以帮我理解发生了什么吗?

提前感谢您的信息。

0 个答案:

没有答案