mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 10:53:37 +08:00
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:
+7
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user