FindGmp.cmake 864 B

1234567891011121314151617181920212223242526272829303132333435
  1. # Find gmp
  2. #
  3. # Find the gmp includes and library
  4. #
  5. # if you nee to add a custom library search path, do it via via CMAKE_PREFIX_PATH
  6. #
  7. # This module defines
  8. # GMP_INCLUDE_DIRS, where to find header, etc.
  9. # GMP_LIBRARIES, the libraries needed to use gmp.
  10. # GMP_FOUND, If false, do not try to use gmp.
  11. # only look in default directories
  12. find_path(
  13. GMP_INCLUDE_DIR
  14. NAMES gmp.h
  15. DOC "gmp include dir"
  16. )
  17. find_library(
  18. GMP_LIBRARY
  19. NAMES gmp
  20. DOC "gmp library"
  21. )
  22. set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
  23. set(GMP_LIBRARIES ${GMP_LIBRARY})
  24. # handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE
  25. # if all listed variables are TRUE, hide their existence from configuration view
  26. include(FindPackageHandleStandardArgs)
  27. find_package_handle_standard_args(gmp DEFAULT_MSG
  28. GMP_LIBRARY GMP_INCLUDE_DIR)
  29. mark_as_advanced (GMP_INCLUDE_DIR GMP_LIBRARY)