From f63727aae268af887f4e086c702e8935ab602dc0 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 26 Jun 2024 13:19:00 +0200 Subject: [PATCH] support modern libuvc cmake target Required in libuvc 0.0.7. --- libuvc_camera/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libuvc_camera/CMakeLists.txt b/libuvc_camera/CMakeLists.txt index 91db504..48f281c 100644 --- a/libuvc_camera/CMakeLists.txt +++ b/libuvc_camera/CMakeLists.txt @@ -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