From 008012224cbe0cb937637a72952459cbd5e66f49 Mon Sep 17 00:00:00 2001 From: Murilo Belluzzo Date: Wed, 5 Apr 2017 17:11:02 -0700 Subject: [PATCH] realsense_camera: Add patch to correct link the node... ... when the system library is used. Signed-off-by: Murilo Belluzzo --- ...-link-when-the-system-library-is-use.patch | 33 +++++++++++++++++++ .../realsense-camera_1.7.2.bb | 1 + 2 files changed, 34 insertions(+) create mode 100644 recipes-extended/realsense-camera/realsense-camera/0003-librealsense-Fix-link-when-the-system-library-is-use.patch diff --git a/recipes-extended/realsense-camera/realsense-camera/0003-librealsense-Fix-link-when-the-system-library-is-use.patch b/recipes-extended/realsense-camera/realsense-camera/0003-librealsense-Fix-link-when-the-system-library-is-use.patch new file mode 100644 index 0000000..f4988ad --- /dev/null +++ b/recipes-extended/realsense-camera/realsense-camera/0003-librealsense-Fix-link-when-the-system-library-is-use.patch @@ -0,0 +1,33 @@ +From fb74e5eec2368f20c4b43cf9224519b29aee35ad Mon Sep 17 00:00:00 2001 +From: Murilo Belluzzo +Date: Wed, 5 Apr 2017 17:06:44 -0700 +Subject: [PATCH 3/3] librealsense: Fix link when the system library is used + +Otherwise librealsense won't be listed as a dependency for the nodelet +that will fail to load due to undefined symbols. + +Upstream-Status: Accepted (expected in v1.8.1) + [https://github.com/intel-ros/realsense/pull/226] + +Signed-off-by: Murilo Belluzzo + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1ec2f6..926992a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -106,6 +106,12 @@ add_library(${PROJECT_NAME}_nodelet src/base_nodelet.cpp src/r200_nodelet.cpp sr + target_link_libraries(${PROJECT_NAME}_nodelet + ${catkin_LIBRARIES} + ) ++if(USE_SYSTEM_LIBREALSENSE) ++ target_link_libraries(${PROJECT_NAME}_nodelet ++ ${realsense_LIBRARY} ++ ) ++endif() ++ + add_dependencies(${PROJECT_NAME}_nodelet ${PROJECT_NAME}_generate_messages_cpp ${PROJECT_NAME}_gencfg) + add_dependencies(${PROJECT_NAME}_nodelet ${catkin_EXPORTED_TARGETS}) + +-- +2.12.2 + diff --git a/recipes-extended/realsense-camera/realsense-camera_1.7.2.bb b/recipes-extended/realsense-camera/realsense-camera_1.7.2.bb index 4fa4520..0dc4fcd 100644 --- a/recipes-extended/realsense-camera/realsense-camera_1.7.2.bb +++ b/recipes-extended/realsense-camera/realsense-camera_1.7.2.bb @@ -7,6 +7,7 @@ DEPENDS = "librealsense cv-bridge camera-info-manager pcl-ros roscpp" SRC_URI = "https://github.com/intel-ros/realsense/archive/${PV}.tar.gz \ file://0001-Add-option-to-link-against-non-catkin-librealsense.patch \ file://0002-Enable-roslint-when-CATKIN_ENABLE_TESTING-is-True.patch \ + file://0003-librealsense-Fix-link-when-the-system-library-is-use.patch \ " SRC_URI[md5sum] = "aaa0d0ddaaee210e2a2529767ba45a4b" SRC_URI[sha256sum] = "65c6c4a0b6bd0214dffa8528033f03c0fbc4be00e52e058cfbd96b4f7d733b10"