# Try to find the MPIR librairies
#  MPIR_FOUND - system has MPIR lib
#  MPIR_INCLUDE_DIR - the MPIR include directory
#  MPIR_LIBRARIES - Libraries needed to use MPIR

if (MPIR_INCLUDE_DIR AND MPIR_LIBRARIES)
set(MPIR_FIND_QUIETLY TRUE)
endif (MPIR_INCLUDE_DIR AND MPIR_LIBRARIES)
	
find_path(MPIR_INCLUDE_DIR NAMES mpir.h PATHS ${CMAKE_SOURCE_DIR}/depends/include)
find_library(MPIR_LIBRARIES NAMES mpir libmpir PATHS ${CMAKE_SOURCE_DIR}/depends/lib )

MESSAGE(STATUS "MPIR libs: " ${MPIR_LIBRARIES} " " ${MPIRXX_LIBRARIES} )
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPIR DEFAULT_MSG MPIR_INCLUDE_DIR MPIR_LIBRARIES)
mark_as_advanced(MPIR_INCLUDE_DIR MPIR_LIBRARIES)