GetCompilers()

include(ExternalProject)
ExternalProject_Add(
	Eigen3
	PREFIX ${CMAKE_BINARY_DIR}/Eigen3
	DOWNLOAD_DIR ${THIRD_PARTY_DIR}/Eigen3
	URL http://bitbucket.org/eigen/eigen/get/3.1.4.tar.bz2
	URL_MD5 15a7914c3768d51a3637fb3d64556a28
	CMAKE_ARGS -DEIGEN_INCLUDE_INSTALL_DIR:PATH=${THIRD_PARTY_DIR}/include/eigen
		-DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
		-DCMAKE_C_COMPILER:STRING=${C_COMPILER}
		-DCMAKE_CXX_COMPILER:STRING=${CXX_COMPILER}
		-DEIGEN_BUILD_PKGCONFIG=0
	)

SET(EIGEN_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/eigen)
LIST(APPEND SHOGUN_DEPENDS Eigen3)

UNSET(C_COMPILER)
UNSET(CXX_COMPILER)
