You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

2 months ago
  1. # Copyright (c) 2008-2010 Kent State University
  2. # Copyright (c) 2011-2012 Texas A&M University
  3. #
  4. # This file is distributed under the MIT License. See the accompanying file
  5. # LICENSE.txt or http://www.opensource.org/licenses/mit-license.php for terms
  6. # and conditions.
  7. # FIXME: How do I find the version of MPFR that I want to use?
  8. # What versions are available?
  9. # NOTE: MPFR prefix is understood to be the path to the root of the MPFR
  10. # installation library.
  11. set(MPFR_PREFIX "" CACHE PATH "The path to the previx of an MPFR installation")
  12. find_path(MPFR_INCLUDE_DIR mpfr.h
  13. PATHS ${MPFR_PREFIX}/include /usr/include /usr/local/include)
  14. find_library(MPFR_LIBRARY NAMES mpfr
  15. PATHS ${MPFR_PREFIX}/lib /usr/lib /usr/local/lib)
  16. if(MPFR_INCLUDE_DIR AND MPFR_LIBRARIES)
  17. get_filename_component(MPFR_LIBRARIES_DIR ${MPFR_LIBRARY} PATH)
  18. set(MPFR_FOUND TRUE)
  19. endif()
  20. if(MPFR_FOUND)
  21. if(NOT MPFR_FIND_QUIETLY)
  22. MESSAGE(STATUS "Found MPFR: ${MPFR_LIBRARY}")
  23. endif()
  24. elseif(MPFR_FOUND)
  25. if(MPFR_FIND_REQUIRED)
  26. message(FATAL_ERROR "Could not find MPFR")
  27. endif()
  28. endif()