0

I'm quit a noob at this area, but I need to include in my cmake file (for a ROS node):

gcc main.cpp `pkg-config --cflags opencv` -o test `pkg-config cvblob opencv --libs`

I want to use the cvblob and opencv lib in a ROS node.

Elod
  • 499
  • 9
  • 25

1 Answers1

0

The solution from ROS wiki, the opencv dependencies are declared in the manifest.xml

include($ENV{ROS_ROOT}/core/rosbuild/FindPkgConfig.cmake)
pkg_check_modules(CVBLOB REQUIRED cvblob)
include_directories(${CVBLOB_INCLUDE_DIRS})
link_directories(${CVBLOB_LIBRARY_DIRS})
target_link_libraries(bagDetect ${CVBLOB_LIBRARIES})
Elod
  • 499
  • 9
  • 25