Hope this helps
Originally posted by ct2034 with karma: 862 on 2014-10-07
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by K. Zeng on 2014-10-08:\
Would something like the code below work?
catkin_package(
INCLUDE_DIRS include
LIBRARIES image_mover
CATKIN_DEPENDS cv_bridge image_transport
DEPENDS system_lib opencv2
)
I don't have a .cpp file in the package's src folder yet. Should I write that out first?
Comment by K. Zeng on 2014-10-08:
UPDATE: What I did in the above comment didn't work.
Comment by ct2034 on 2014-10-08:
What is not working? Which steps are you taking? What is the output of catkin_make?
Comment by K. Zeng on 2014-10-09:
Never mind. What I ended up doing was the following:
find_package(OpenCV REQUIRED)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
image_transport
)
...
Comment by K. Zeng on 2014-10-09:
...
target_link_libraries(publisher ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
...
target_link_libraries(publisher ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
target_link_libraries(subscriber ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})
I also removed opencv and opencv2 from package.xml.
Comment by dmngu9 on 2015-05-08:
hey, how did you setup opencv with ros indigo? i have a lot of problem with this. What did you put in you Cmakelist file and xml file
Comment by ct2034 on 2015-09-14:
I have not tested it under indigo, yet. Sorry