Skip to content

Commit

Permalink
[ch3] find_package eigen3 for better cross-platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
junjiec committed Dec 8, 2018
1 parent a548002 commit 300807b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions ch3/useEigen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ project( useEigen )
set( CMAKE_BUILD_TYPE "Release" )
set( CMAKE_CXX_FLAGS "-O3" )

find_package( eigen3 )
# 添加Eigen头文件
include_directories( "/usr/include/eigen3" )

# in osx and brew install
# include_directories( /usr/local/Cellar/eigen/3.3.3/include/eigen3 )
include_directories( ${EIGEN3_INCLUDE_DIRS} )

add_executable( eigenMatrix eigenMatrix.cpp )
3 changes: 2 additions & 1 deletion ch3/useGeometry/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
cmake_minimum_required( VERSION 2.8 )
project( geometry )

find_package( eigen3 )
# 添加Eigen头文件
include_directories( "/usr/include/eigen3" )
include_directories( ${EIGEN3_INCLUDE_DIRS} )

add_executable( eigenGeometry eigenGeometry.cpp )
3 changes: 2 additions & 1 deletion ch3/visualizeGeometry/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ project( visualizeGeometry )

set(CMAKE_CXX_FLAGS "-std=c++11")

find_package( eigen3 )
# 添加Eigen头文件
include_directories( "/usr/include/eigen3" )
include_directories( ${EIGEN3_INCLUDE_DIRS} )

# 添加Pangolin依赖
find_package( Pangolin )
Expand Down

0 comments on commit 300807b

Please sign in to comment.