# (C) Copyright 2008 Andrew Sutton # Distributed under the Boost Software License, Version 1.0. # This exports the following macros # GMP_FOUND True if the library and header were found # GMP_INCLUDE_DIR The path to the GMP header # GMP_LIBRARY The name of the GMP library to link # For now, just search system paths for these things. find_library(GMP_LIBRARY gmp) find_path(GMP_INCLUDE_DIR gmp.h) # Did we find it? if(GMP_LIBRARY AND GMP_INCLUDE_DIR) set(GMP_FOUND TRUE) else(GMP_LIBRARY AND GMP_INCLUDE_DIR) set(GMP_FOUND FALSE) endif(GMP_LIBRARY AND GMP_INCLUDE_DIR) # Generate appropriate messages if(GMP_FOUND) if(NOT GMP_FIND_QUIETLY) message(STATUS "Found GMP: ${GMP_LIBRARY}") endif(NOT GMP_FIND_QUIETLY) else(GMP_FOUND) if(GMP_FIND_REQUIRED) message(FATAL_ERROR "Could not find GMP library") endif(GMP_FIND_REQUIRED) endif(GMP_FOUND)