diff --git a/image_publisher/CMakeLists.txt b/image_publisher/CMakeLists.txt index 431109cb0..992c187a4 100644 --- a/image_publisher/CMakeLists.txt +++ b/image_publisher/CMakeLists.txt @@ -8,10 +8,12 @@ generate_dynamic_reconfigure_options(cfg/ImagePublisher.cfg) catkin_package() +find_package(OpenCV REQUIRED core videoio) + include_directories(${catkin_INCLUDE_DIRS}) add_library(${PROJECT_NAME} SHARED src/nodelet/image_publisher_nodelet.cpp) -target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES}) +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${OpenCV_LIBRARIES}) add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) install(TARGETS image_publisher DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}