find_path(GMP_INCLUDE_DIR NAMES gmp.h)
find_library(GMP_LIBRARY NAMES gmp libgmp NAMES_PER_DIR)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP REQUIRED_VARS GMP_INCLUDE_DIR GMP_LIBRARY)

if(GMP_FOUND)
  set(GMP_INCLUDE_DIRS ${GMP_INCLUDE_DIR})
  set(GMP_LIBRARIES ${GMP_LIBRARY})
  if(NOT TARGET GMP::GMP)
	add_library(GMP::GMP UNKNOWN IMPORTED)
	set_target_properties(GMP::GMP PROPERTIES
		INTERFACE_INCLUDE_DIRECTORIES ${GMP_INCLUDE_DIRS}
		INTERFACE_LINK_LIBRARIES ${GMP_LIBRARIES}
		IMPORTED_LOCATION ${GMP_LIBRARIES})
  endif()
endif()