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 diff --git a/libuvc_camera/package.xml b/libuvc_camera/package.xml index 2b80d27..f937dbb 100644 --- a/libuvc_camera/package.xml +++ b/libuvc_camera/package.xml @@ -17,8 +17,8 @@ camera_info_manager dynamic_reconfigure image_transport - libuvc - libuvc-dev + libuvc-dev + libusb-1.0-dev nodelet sensor_msgs diff --git a/libuvc_camera/src/camera_driver.cpp b/libuvc_camera/src/camera_driver.cpp index aa4abce..24ab7ef 100644 --- a/libuvc_camera/src/camera_driver.cpp +++ b/libuvc_camera/src/camera_driver.cpp @@ -78,7 +78,7 @@ bool CameraDriver::Start() { state_ = kStopped; - config_server_.setCallback(boost::bind(&CameraDriver::ReconfigureCallback, this, _1, _2)); + config_server_.setCallback([this](auto& config, auto level){ ReconfigureCallback(config, level); }); return state_ == kRunning; } diff --git a/libuvc_camera/src/nodelet.cpp b/libuvc_camera/src/nodelet.cpp index 91d2f3c..38246d8 100644 --- a/libuvc_camera/src/nodelet.cpp +++ b/libuvc_camera/src/nodelet.cpp @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ #include -#include +#include #include #include "libuvc_camera/camera_driver.h"