CMake for OpenCV (opencv.cpp) + CUDA (cuda.cu) code. [closed]
I am using OpenCV and also CUDA, i have done experiments with gpu:: functions available in OpenCV, but now i want to use cuda Kernel, and want to add .cu file with my current project. I am using CMake to build opencv+cuda code, and i am using Ubuntu, the main problem is that i don't know how to build CMake for these kind of projects ( I know only about OpenCV, .cpp projects), please help me if any one has the solution
Thanks in advance.
CMake Docs
Some example on google
It was a pretty quick google search.
Thanks for prompt reply, but examples are for only CUDA with .CPP file, not with OpenCV files When i am trying to build such files, like in one of the Udacity course (Code: https://github.com/udacity/cs344) [Problem set 1] it is giving me errors like main.cpp:(.text+0xcb): undefined reference to `cv::imread .
I have compiled OpenCV codes with GPU support, they are working fine, with following CMakeLists.txt file, now i just want to add cuda kernel with it, I am using following CMakeLists.txt for only OpenCV code,
cmake_minimum_required(VERSION 2.8) project( opencv ) find_package( OpenCV REQUIRED ) add_executable( opencv opencv.cpp ) target_link_libraries( opencv ${OpenCV_LIBS} )
wow I have this same problem! any luck?