From fa06d3050df0eb8d107a12e0c0159919891e1964 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Wed, 17 Jun 2015 22:52:35 -0400 Subject: [PATCH] Explicitly find OpenCV package to link with libraries built in /usr/local if OpenCV is built from source --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 900bf734..efc2a935 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,8 @@ find_package(octomap_ros) # find_package(Boost REQUIRED COMPONENTS system) find_package(RTABMap 0.9.0 REQUIRED) +find_package(OpenCV REQUIRED) + #Qt stuff FIND_PACKAGE(Qt4 COMPONENTS QtCore QtGui REQUIRED) INCLUDE(${QT_USE_FILE}) @@ -102,11 +104,13 @@ catkin_package( include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/include ${RTABMap_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS} ) # libraries SET(Libraries + ${OpenCV_LIBRARIES} ${catkin_LIBRARIES} ${RTABMap_LIBRARIES} )