Skip to content

Commit

Permalink
check either spelling before throwing
Browse files Browse the repository at this point in the history
  • Loading branch information
20DM committed Sep 13, 2023
1 parent 3ab29c4 commit d84cb14
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmake_files/dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ include(EnvironmentScript)
# as either "eigen" or "Eigen3" because the recipe does not explicitly define the
# name (yet). To work around this we have to check for both.
find_package(Eigen3 NAMES eigen eigen3)
if(eigen_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${eigen_INCLUDE_DIR} CACHE INTERNAL "")
elseif(Eigen3_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${Eigen3_INCLUDE_DIR} CACHE INTERNAL "")
if(eigen_FOUND OR Eigen3_FOUND)
if(eigen_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${eigen_INCLUDE_DIR} CACHE INTERNAL "")
elseif(Eigen3_INCLUDE_DIR)
set(EIGEN3_INCLUDE_DIR ${Eigen3_INCLUDE_DIR} CACHE INTERNAL "")
endif()
else()
message(FATAL_ERROR "Eigen is required")
endif()
Expand Down

0 comments on commit d84cb14

Please sign in to comment.