FindGMP.cmake 932 B

123456789101112131415161718192021222324
  1. # Try to find the GMP librairies
  2. # GMP_FOUND - system has GMP lib
  3. # GMP_INCLUDE_DIR - the GMP include directory
  4. # GMP_LIBRARIES - Libraries needed to use GMP
  5. # Copyright (c) 2006, Laurent Montel, <montel@kde.org>
  6. #
  7. # Redistribution and use is allowed according to the terms of the BSD
  8. # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
  9. if (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
  10. # Already in cache, be silent
  11. set(GMP_FIND_QUIETLY TRUE)
  12. endif (GMP_INCLUDE_DIR AND GMP_LIBRARIES)
  13. find_path(GMP_INCLUDE_DIR NAMES gmp.h HINTS "./local/include")
  14. find_library(GMP_LIBRARIES NAMES gmp libgmp HINTS "./local/lib")
  15. find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx HINTS "./local/lib")
  16. MESSAGE(STATUS "GMP libs: " ${GMP_LIBRARIES} " " ${GMPXX_LIBRARIES} )
  17. include(FindPackageHandleStandardArgs)
  18. FIND_PACKAGE_HANDLE_STANDARD_ARGS(GMP DEFAULT_MSG GMP_INCLUDE_DIR GMP_LIBRARIES)
  19. mark_as_advanced(GMP_INCLUDE_DIR GMP_LIBRARIES)