# Configure GeographicLib
#
# Set
#  Geographiclib_FOUND = GEOGRAPHICLIB_FOUND = TRUE
#  GeographicLib_INCLUDE_DIRS = /usr/local/include
#  GeographicLib_LIBRARIES = Geographic
#  GeographicLib_LIBRARY_DIRS = /usr/local/lib
#  GeographicLib_VERSION = 1.13 (for example)

message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
set (GeographicLib_VERSION "@GeographicLib_VERSION@")
message (STATUS "GeographicLib configuration, version "
  ${GeographicLib_VERSION})

# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
if (IS_ABSOLUTE "@GEOGRAPHICLIB_ROOT_DIR@")
  # This is an uninstalled package (still in the build tree)
  set (GEOGRAPHICLIB_ROOT_DIR "@GEOGRAPHICLIB_ROOT_DIR@")
  set (GeographicLib_INCLUDE_DIRS "@GeographicLib_INCLUDE_DIRS@")
  set (GeographicLib_LIBRARY_DIRS "${GEOGRAPHICLIB_ROOT_DIR}/src")
else ()
  # This is an installed package; figure out the paths relative to the
  # current directory.
  get_filename_component (GEOGRAPHICLIB_ROOT_DIR
    "${_DIR}/@GEOGRAPHICLIB_ROOT_DIR@" ABSOLUTE)
  set (GeographicLib_INCLUDE_DIRS "${GEOGRAPHICLIB_ROOT_DIR}/include")
  set (GeographicLib_LIBRARY_DIRS "${GEOGRAPHICLIB_ROOT_DIR}/lib")
endif ()

# Read in the exported definition of the library
include ("${_DIR}/geographiclib-depends.cmake")
set (GeographicLib_LIBRARIES Geographic)

# GeographicLib_FOUND is set to 1 automatically
set (GEOGRAPHICLIB_FOUND 1)	# for backwards compatibility
