From 4a2f19e7c2e70d2445fc65f5f88ce50b3bcdd9dc Mon Sep 17 00:00:00 2001 From: yul Date: Mon, 5 Feb 2024 08:27:34 +0100 Subject: [PATCH] . git commit -am .2 --- src/tutorial_pkg/CMakeLists.txt | 7 ++++++- src/tutorial_pkg/src/CMakeLists.txt | 16 +++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) 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