Skip to content

Commit e3e2a69

Browse files
committed
Fix build on newer compilers that need newer Eigen
1 parent e7cca12 commit e3e2a69

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ if(VPR20_FOUND OR VPR22_FOUND)
6565
endif()
6666
find_package(GMTL)
6767
find_package(OpenSceneGraph)
68+
find_package(Eigen3)
6869

6970
set(Boost_USE_STATIC_LIBS ON)
7071
find_package(Boost COMPONENTS thread date_time chrono system)

third-party/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
message(STATUS "")
66
message(STATUS "Bundled third-party code:")
77

8-
message(STATUS "Using Eigen 3.2.2")
9-
list(APPEND THIRD_PARTY_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/eigen") # for Eigen
10-
8+
if(Eigen3_FOUND)
9+
list(APPEND THIRD_PARTY_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIR}") # for Eigen
10+
else()
11+
message(STATUS "Using Eigen 3.2.2")
12+
list(APPEND THIRD_PARTY_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/eigen") # for Eigen
13+
endif()
1114
# Loki lib SVN https://loki-lib.svn.sourceforge.net/svnroot/loki-lib/trunk@1081
1215
message(STATUS "Using Loki template library r1081")
1316
list(APPEND THIRD_PARTY_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/loki-lib")

0 commit comments

Comments
 (0)