find_path(GMPXX_INCLUDE NAMES gmpxx.h)

find_library(GMPXX_GMP_LIBRARY NAMES gmp)
find_library(GMPXX_GMPXX_LIBRARY NAMES gmpxx)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMPXX DEFAULT_MSG GMPXX_INCLUDE GMPXX_GMP_LIBRARY GMPXX_GMPXX_LIBRARY)
mark_as_advanced(GMPXX_INCLUDE GMPXX_GMP_LIBRARY GMPXX_GMPXX_LIBRARY)

set(GMPXX_LIBRARIES ${GMPXX_GMP_LIBRARY} ${GMPXX_GMPXX_LIBRARY})
set(GMPXX_INCLUDE_DIRS ${GMPXX_INCLUDE})

add_library(GMPXX::GMPXX INTERFACE IMPORTED)
set_property(TARGET GMPXX::GMPXX PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${GMPXX_INCLUDE_DIRS}")
set_property(TARGET GMPXX::GMPXX PROPERTY INTERFACE_LINK_LIBRARIES "${GMPXX_LIBRARIES}")
