| 1 |
### Try to find MPFR |
| 2 |
# Once done this will define |
| 3 |
# MPFR_FOUND - System has MPFR |
| 4 |
# MPFR_INCLUDE_DIRS - The MPFR include directories |
| 5 |
# MPFR_LIBRARIES - The libraries needed to use MPFR |
| 6 |
|
| 7 |
find_path(MPFR_INCLUDE NAMES mpfr.h |
| 8 |
PATHS $ENV{GMPDIR} $ENV{MPFRDIR} ${INCLUDE_INSTALL_DIR}) |
| 9 |
|
| 10 |
find_library(MPFR_LIBRARY mpfr |
| 11 |
PATHS $ENV{GMPDIR} $ENV{MPFRDIR} ${LIB_INSTALL_DIR}) |
| 12 |
|
| 13 |
include(FindPackageHandleStandardArgs) |
| 14 |
# handle the QUIETLY and REQUIRED arguments and set MPFR_FOUND to TRUE |
| 15 |
# if all listed variables are TRUE |
| 16 |
find_package_handle_standard_args(MPFR |
| 17 |
FOUND_VAR MPFR_FOUND |
| 18 |
REQUIRED_VARS MPFR_LIBRARY MPFR_INCLUDE |
| 19 |
FAIL_MESSAGE "Could NOT find MPFR, use MPFR_ROOT to hint its location" |
| 20 |
) |
| 21 |
|
| 22 |
mark_as_advanced(MPFR_INCLUDE MPFR_LIBRARY) |
| 23 |
|
| 24 |
set(MPFR_INCLUDES ${MPFR_INCLUDE}) |
| 25 |
set(MPFR_LIBRARIES ${MPFR_LIBRARY}) |