# - Find mongo
# Find the native GeoIP headers and libraries.
#
#  GEOIP_INCLUDE_DIRS - where to find GeoIP.h, etc.
#  GEOIP_LIBRARIES    - List of libraries when using GeoIP.
#  GEOIP_FOUND        - True if GeoIP found.

# Look for the header file.
FIND_PATH(GEOIP_INCLUDE_DIR NAMES GeoIP.h)
MARK_AS_ADVANCED(GEOIP_INCLUDE_DIR)

# Look for the library.
FIND_LIBRARY(GEOIP_LIBRARY NAMES GeoIP)
MARK_AS_ADVANCED(GEOIP_LIBRARY)

# handle the QUIETLY and REQUIRED arguments and set GEOIP_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOIP DEFAULT_MSG GEOIP_LIBRARY GEOIP_INCLUDE_DIR)

IF(GEOIP_FOUND)
  SET(GEOIP_LIBRARIES ${GEOIP_LIBRARY})
  SET(GEOIP_INCLUDE_DIRS ${GEOIP_INCLUDE_DIR})
ELSE(GEOIP_FOUND)
  SET(GEOIP_LIBRARIES)
  SET(GEOIP_INCLUDE_DIRS)
ENDIF(GEOIP_FOUND)
