Skip to content

Commit

Permalink
Merge pull request #21 from jrl-umi3218/topic/choose_eigen_version
Browse files Browse the repository at this point in the history
Allow defining the eigen version required before calling SEARCH_FOR_EIGE...
  • Loading branch information
thomas-moulard committed Sep 5, 2013
2 parents f3ec102 + e1db115 commit 53d898a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
# -----------------
#
# This macro gets eigen include path from pkg-config file, and adds it include directories.

# If the variable Eigen_REQUIRED is not defined before calling
# the method SEARCH_FOR_EIGEN, the version chosen is the default one.
MACRO(SEARCH_FOR_EIGEN)

SET(_Eigen_FOUND 0)
SET(_Eigen_REQUIRED "eigen3 >= 3.0.0")
PKG_CHECK_MODULES(_Eigen REQUIRED ${_Eigen_REQUIRED})
IF(NOT Eigen_REQUIRED)
SET(Eigen_REQUIRED "eigen3 >= 3.0.0")
ENDIF(NOT Eigen_REQUIRED)
PKG_CHECK_MODULES(_Eigen REQUIRED ${Eigen_REQUIRED})

IF(NOT ${_Eigen_FOUND})
MESSAGE(FATAL_ERROR "Check that package Eigen is installed in a directory pointed out by PKG_CONFIG_PATH.")
Expand Down

0 comments on commit 53d898a

Please sign in to comment.