We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 309cf99 commit 9585f93Copy full SHA for 9585f93
image_publisher/CMakeLists.txt
@@ -3,10 +3,13 @@ project(image_publisher)
3
4
find_package(catkin REQUIRED COMPONENTS cv_bridge dynamic_reconfigure camera_info_manager sensor_msgs image_transport nodelet roscpp)
5
6
-set(opencv_4_components core imgcodecs videoio)
7
find_package(OpenCV REQUIRED COMPONENTS core)
8
message(STATUS "opencv version ${OpenCV_VERSION}")
9
-find_package(OpenCV 4 REQUIRED COMPONENTS ${opencv_4_components})
+if(OpenCV_VERSION VERSION_LESS "4.0.0")
+ find_package(OpenCV 3 REQUIRED COMPONENTS core imgcodecs videoio)
10
+else()
11
+ find_package(OpenCV 4 REQUIRED COMPONENTS core imgcodecs videoio)
12
+endif()
13
14
# generate the dynamic_reconfigure config file
15
generate_dynamic_reconfigure_options(cfg/ImagePublisher.cfg)
0 commit comments