ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I haven't done anything similar with groovy, but I think it should work more-or-less the same, since it's all CMake based. When I wanted to install OpenCV with CUDA, I did the process below. Note: I am a novice at building with CMake, so there are probably better ways of doing this.

  1. Install OpenCV to a specific directory following the instructions on their website.

  2. Create a CMakeModule folder within your working program directory, find a version of FindOpenCV.cmake to copy into that folder, then specify the path to OpenCV by adding the line:

    set(OpenCV_DIR "/directory/to/opencv2")

  3. In your program's CMake file, add:

    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/CMakeModules/")

    find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) add_definitions(${OpenCV_DEFINITIONS}) MESSAGE(STATUS "OpenCV at: ${OpenCV_INCLUDE_DIRS}")

    <more code...&gt;<="" p="">

    target_link_libraries(executable_name ${OpenCV_LIBRARIES})

There might be some specifics that are incorrect, but I think the general idea should work.

I haven't done anything similar with groovy, but I think it should work more-or-less the same, since it's all CMake based. When I wanted to install OpenCV with CUDA, I did the process below. Note: I am a novice at building with CMake, so there are probably better ways of doing this.

  1. Install OpenCV to a specific directory following the instructions on their website.

  2. Create a CMakeModule folder within your working program directory, find a version of FindOpenCV.cmake to copy into that folder, then specify the path to OpenCV by adding the line:

    set(OpenCV_DIR "/directory/to/opencv2")

  3. In your program's CMake file, add:

    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/CMakeModules/")

    find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) add_definitions(${OpenCV_DEFINITIONS}) MESSAGE(STATUS "OpenCV at: ${OpenCV_INCLUDE_DIRS}")

    <more code...&gt;<="" p=""> code="">

    target_link_libraries(executable_name ${OpenCV_LIBRARIES})

There might be some specifics that are incorrect, but I think the general idea should work.

I haven't done anything similar with groovy, but I think it should work more-or-less the same, since it's all CMake based. When I wanted to install OpenCV with CUDA, I did the process below. Note: I am a novice at building with CMake, so there are probably better ways of doing this.

  1. Install OpenCV to a specific directory following the instructions on their website.

  2. Create a CMakeModule folder within your working program directory, find a version of FindOpenCV.cmake to copy into that folder, then specify the path to OpenCV by adding the line:

    set(OpenCV_DIR "/directory/to/opencv2")

  3. In your program's CMake file, add:

    SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/CMakeModules/")

    find_package(OpenCV REQUIRED) include_directories(${OpenCV_INCLUDE_DIRS}) add_definitions(${OpenCV_DEFINITIONS}) MESSAGE(STATUS "OpenCV at: ${OpenCV_INCLUDE_DIRS}")

    <more code="">more code

    target_link_libraries(executable_name ${OpenCV_LIBRARIES})

There might be some specifics that are incorrect, but I think the general idea should work.