Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

opencv_dep_cudart.lib problem with CMake in OpenCV 2.4.13

Hi,

There seems to be a bizarre dependency included when I use CMake to include OpenCV in a Windows VS 11 project. CMake includes a dependency: opencv_dep_cudart.lib

This library doesn't seem to be included with or built by OpenCV. I know that it's related to CUDA, which is installed. Another strange thing about this dependency is that, unlike the others, CMake doesn't provide a path for it. It's just hanging there after all of the other dependencies. If I remove it, the code compiles fine.

Here is what the relevant portion of the dependency list looks like in VS 11:

...
E:\lib\opencv\build\lib\Release\opencv_videostab2413.lib
E:\lib\opencv\build\lib\Release\opencv_ts2413.lib
E:\lib\opencv\build\lib\Release\opencv_superres2413.lib
E:\lib\opencv\build\lib\Release\opencv_stitching2413.lib
E:\lib\opencv\build\lib\Release\opencv_contrib2413.lib
E:\lib\opencv\build\lib\Release\opencv_nonfree2413.lib
E:\lib\opencv\build\lib\Release\opencv_ocl2413.lib
E:\lib\opencv\build\lib\Release\opencv_gpu2413.lib
E:\lib\opencv\build\lib\Release\opencv_photo2413.lib
E:\lib\opencv\build\lib\Release\opencv_objdetect2413.lib
E:\lib\opencv\build\lib\Release\opencv_legacy2413.lib
E:\lib\opencv\build\lib\Release\opencv_video2413.lib
E:\lib\opencv\build\lib\Release\opencv_ml2413.lib
E:\lib\opencv\build\lib\Release\opencv_calib3d2413.lib
E:\lib\opencv\build\lib\Release\opencv_features2d2413.lib
E:\lib\opencv\build\lib\Release\opencv_highgui2413.lib
E:\lib\opencv\build\lib\Release\opencv_imgproc2413.lib
E:\lib\opencv\build\lib\Release\opencv_flann2413.lib
E:\lib\opencv\build\lib\Release\opencv_core2413.lib
opencv_dep_cudart.lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64\nppc.lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\x64\nppi.lib
...

I know that it's included when I link OpenCV in CMake. Also, the only mention I can find of this file anywhere is in a few of the OpenCV CMake files.

In addition, CMake gives the following warning when generating the VS 11 solution for OpenCV:

CMake Warning at cmake/OpenCVPackaging.cmake:23 (message):
  CPACK_PACKAGE_VERSION does not match version provided by version.hpp
  header!
Call Stack (most recent call first):
  CMakeLists.txt:1105 (include)

which may be related.

We can do development by just removing it from the dependency list. However, we distribute our code and are going to run into problems walking other people through the build process if this happens.

Is there something silly I'm missing? As far as I can tell, nobody has heard of this file. A Google search didn't even return anything. My initial thought is that there is a bug in the CMake files, however I would expect everyone to be running into problems if that were the case.

Thanks!