diff --git a/src/tutorial_pkg/CMakeLists.txt b/src/tutorial_pkg/CMakeLists.txt index 64f7a49..a989939 100644 --- a/src/tutorial_pkg/CMakeLists.txt +++ b/src/tutorial_pkg/CMakeLists.txt @@ -14,7 +14,12 @@ catkin_package( CATKIN_DEPENDS ) -include_directories(${catkin_INCLUDE_DIRS}) +find_package( OpenCV REQUIRED ) + +include_directories( + ${catkin_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} +) add_executable(my_first_node src/my_first_node.cpp) diff --git a/src/tutorial_pkg/src/CMakeLists.txt b/src/tutorial_pkg/src/CMakeLists.txt index 42510ea..605406e 100644 --- a/src/tutorial_pkg/src/CMakeLists.txt +++ b/src/tutorial_pkg/src/CMakeLists.txt @@ -10,13 +10,23 @@ find_package(catkin REQUIRED COMPONENTS std_srvs ) +find_package( OpenCV REQUIRED ) + catkin_package( CATKIN_DEPENDS ) -include_directories(${catkin_INCLUDE_DIRS}) - +include_directories( + ${catkin_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} +) add_executable(my_first_node src/my_first_node.cpp) target_link_libraries(my_first_node - ${catkin_LIBRARIES}) \ No newline at end of file + ${catkin_LIBRARIES}) + +add_executable(img_control_node src/img_control.cpp) + +target_link_libraries(img_control_node + ${catkin_LIBRARIES} +) \ No newline at end of file