Skip to content

Commit

Permalink
support modern libuvc cmake target
Browse files Browse the repository at this point in the history
Required in libuvc 0.0.7.
  • Loading branch information
v4hn committed Aug 14, 2024
1 parent 2b187b0 commit f63727a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libuvc_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ find_package(catkin REQUIRED COMPONENTS roscpp camera_info_manager dynamic_recon
generate_dynamic_reconfigure_options(cfg/UVCCamera.cfg)

find_package(libuvc REQUIRED)
message(STATUS "libuvc ${libuvc_VERSION_MAJOR}.${libuvc_VERSION_MINOR}.${libuvc_VERSION_PATCH}")
# if libuvc_LIBRARIES are empty, check cmake target
if(NOT libuvc_LIBRARIES AND TARGET LibUVC::UVCShared)
set(libuvc_LIBRARIES LibUVC::UVCShared)
endif()
if(NOT libuvc_LIBRARIES)
message(FATAL_ERROR "could not find expected libuvc libraries in package")
endif()

catkin_package(
CATKIN_DEPENDS
Expand Down

0 comments on commit f63727a

Please sign in to comment.