CMakeLists: use find_package Eigen3

Instead of hardcoding the Eigen3 path which only works on Mac, use
find_package(Eigen3).
This commit is contained in:
Julian Oes
2016-05-10 17:59:01 +02:00
parent e91a934f07
commit 3d28f7ecca
+7 -7
View File
@@ -37,12 +37,12 @@ project (ECL CXX)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CURRENT_SOURCE_DIR ./)
set(CMAKE_CXX_FLAGS "-DPOSIX_SHARED")
set(EIGEN3_INCLUDE_DIR "/usr/local/include/eigen3/")
IF( NOT EIGEN3_INCLUDE_DIR )
MESSAGE( FATAL_ERROR "Please point the environment variable EIGEN3_INCLUDE_DIR to the include directory of your Eigen3 installation.")
ENDIF()
INCLUDE_DIRECTORIES ( "${EIGEN3_INCLUDE_DIR}" )
find_package(Eigen3 REQUIRED)
if( NOT EIGEN3_INCLUDE_DIR )
message( FATAL_ERROR "Eigen3 not found.")
endif()
if( NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../matrix/.git" )
message( SEND_ERROR "The git submodules are not available. Please run
@@ -54,9 +54,9 @@ include_directories(
./
../
../matrix
EIGEN3_INCLUDE_DIR
${EIGEN3_INCLUDE_DIR}
)
set(SRCS
set(SRCS
estimator_interface.cpp
ekf.cpp
ekf_helper.cpp