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 Jun 26, 2024
1 parent 2b187b0 commit 37114aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libuvc_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ 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, assume cmake target
if(NOT libuvc_LIBRARIES AND TARGET LibUVC::UVCShared)
set(libuvc_LIBRARIES LibUVC::UVCShared)
else()
message(FATAL_ERROR "libuvc library not found")
endif()

catkin_package(
CATKIN_DEPENDS
Expand Down

0 comments on commit 37114aa

Please sign in to comment.