Include Eigen in CMakeLists.txt where needed

This commit is contained in:
Simon Giraudot
2018-06-19 10:57:55 +02:00
parent 7048b5cb17
commit 95e6d089fa
8 changed files with 75 additions and 7 deletions
@@ -39,6 +39,16 @@ find_package(TBB QUIET)
find_package(OpenCV QUIET)
# Use Eigen
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
if (NOT EIGEN3_FOUND)
message(STATUS "This project requires the Eigen library, and will not be compiled.")
return()
else()
include( ${EIGEN3_USE_FILE} )
endif()
# include for local directory
include_directories( BEFORE include )