Commit 05976a63 authored by Nicolae Rosia's avatar Nicolae Rosia Committed by Lorenz Meier
Browse files

CMakeLists: add a fallback for Eigen lib


Signed-off-by: default avatarNicolae Rosia <nicolae.rosia@gmail.com>
parent e7055199
......@@ -7,7 +7,16 @@ if(${GAZEBO_VERSION} VERSION_LESS "6.0")
message(FATAL_ERROR "You need at least Gazebo 6.0. Your version: ${GAZEBO_VERSION}")
endif()
find_package(Eigen3 REQUIRED)
find_package(Eigen3 QUIET)
if(NOT EIGEN3_FOUND)
# Fallback to cmake_modules
find_package(Eigen REQUIRED)
set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
set(EIGEN3_LIBRARIES ${EIGEN_LIBRARIES})
else()
set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
endif()
pkg_check_modules( protobuf REQUIRED protobuf )
FIND_PACKAGE( Boost 1.40 COMPONENTS system thread REQUIRED )
......@@ -24,7 +33,7 @@ include_directories(
include
${GAZEBO_INCLUDE_DIRS}
${GAZEBO_MSG_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/msgs
${Boost_INCLUDE_DIR}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment