Skip to content

Commit 37114aa

Browse files
committed
support modern libuvc cmake target
Required in libuvc 0.0.7.
1 parent 2b187b0 commit 37114aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

libuvc_camera/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ find_package(catkin REQUIRED COMPONENTS roscpp camera_info_manager dynamic_recon
77
generate_dynamic_reconfigure_options(cfg/UVCCamera.cfg)
88

99
find_package(libuvc REQUIRED)
10-
message(STATUS "libuvc ${libuvc_VERSION_MAJOR}.${libuvc_VERSION_MINOR}.${libuvc_VERSION_PATCH}")
10+
# if libuvc_LIBRARIES are empty, assume cmake target
11+
if(NOT libuvc_LIBRARIES AND TARGET LibUVC::UVCShared)
12+
set(libuvc_LIBRARIES LibUVC::UVCShared)
13+
else()
14+
message(FATAL_ERROR "libuvc library not found")
15+
endif()
1116

1217
catkin_package(
1318
CATKIN_DEPENDS

0 commit comments

Comments
 (0)