2019-03-05 20:33:13 +00:00
|
|
|
# Copyright (c) 2008-2010 Kent State University
|
|
|
|
# Copyright (c) 2011-2012 Texas A&M University
|
|
|
|
#
|
|
|
|
# This file is distributed under the MIT License. See the accompanying file
|
|
|
|
# LICENSE.txt or http://www.opensource.org/licenses/mit-license.php for terms
|
|
|
|
# and conditions.
|
|
|
|
|
|
|
|
# NOTE: MPFR prefix is understood to be the path to the root of the MPFR
|
|
|
|
# installation library.
|
|
|
|
|
2021-06-24 08:51:52 +00:00
|
|
|
set(MPFR_PREFIX "" CACHE PATH "The path to the prefix of an MPFR installation")
|
2019-03-05 20:33:13 +00:00
|
|
|
|
2021-06-29 09:56:20 +00:00
|
|
|
find_path(MPFR_INCLUDE_DIRS mpfr.h
|
2019-03-05 20:33:13 +00:00
|
|
|
PATHS ${MPFR_PREFIX}/include)
|
|
|
|
|
|
|
|
find_library(MPFR_LIBRARIES NAMES mpfr
|
|
|
|
PATHS ${MPFR_PREFIX}/lib)
|
|
|
|
|
2021-06-29 09:56:20 +00:00
|
|
|
if(MPFR_INCLUDE_DIRS AND MPFR_LIBRARIES)
|
2019-03-05 20:33:13 +00:00
|
|
|
set(MPFR_FOUND TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(MPFR_FOUND)
|
|
|
|
if(NOT MPFR_FIND_QUIETLY)
|
2019-03-05 22:39:24 +00:00
|
|
|
MESSAGE(STATUS "Found MPFR: ${MPFR_LIBRARIES}")
|
2019-03-05 20:33:13 +00:00
|
|
|
endif()
|
|
|
|
set(HAVE_MPFR 1)
|
|
|
|
elseif(MPFR_FOUND)
|
|
|
|
if(MPFR_FIND_REQUIRED)
|
|
|
|
message(FATAL_ERROR "Could not find MPFR")
|
|
|
|
endif()
|
|
|
|
endif()
|