
INCLUDE (FindPackageHandleStandardArgs)

FIND_PACKAGE ( PkgConfig )

SET( NOWPAC_EIGEN_INCLUDE_PATH_SEARCH "NOWPAC_EIGEN_INCLUDE_PATH_SEARCH-NOTFOUND")
FIND_PATH( NOWPAC_EIGEN_INCLUDE_PATH_SEARCH "Eigen/Dense"
           PATHS "${NOWPAC_EIGEN_INCLUDE_PATH}/"
                 "${CMAKE_INSTALL_PREFIX}/nowpac/external/eigen/include/eigen3/"
                 "${NOWPAC_INSTALL_PREFIX}/nowpac/external/eigen/include/eigen3/")

IF ( ${NOWPAC_EIGEN_INCLUDE_PATH_SEARCH} STREQUAL "NOWPAC_EIGEN_INCLUDE_PATH_SEARCH-NOTFOUND" )
    SET( NOWPAC_EIGEN_INCLUDE_PATH "NOWPAC_EIGEN_INCLUDE_PATH-NOTFOUND" )
ELSE ()
    SET( NOWPAC_EIGEN_INCLUDE_PATH ${NOWPAC_EIGEN_INCLUDE_PATH_SEARCH} )
ENDIF ()

FIND_PACKAGE_HANDLE_STANDARD_ARGS(EIGEN DEFAULT_MSG NOWPAC_EIGEN_INCLUDE_PATH)
