# - Try to find SGP4 library

# SGP4_FOUND - System has SGP4 library
# SGP4_INCLUDE_DIRS - The SGP4 library include directories
# SGP4_LIBRARIES - The libraries needed to use SGP4 library
# SGP4_DEFINITIONS - Compiler switches required for using SGP4 library

SET (SGP4_ROOT_DIR ${SGP4_ROOT_DIR} "/usr/local")

FIND_PATH (SGP4_INCLUDE_DIR "sgp4/SGP4.h" PATHS ${SGP4_ROOT_DIR} PATH_SUFFIXES "include" NO_DEFAULT_PATH)

FIND_LIBRARY (SGP4_LIBRARY NAMES "libsgp4.a" PATHS ${SGP4_ROOT_DIR} PATH_SUFFIXES "lib" NO_DEFAULT_PATH)

SET (SGP4_LIBRARIES ${SGP4_LIBRARY})
SET (SGP4_INCLUDE_DIRS ${SGP4_INCLUDE_DIR})

# MESSAGE (STATUS "SGP4_ROOT_DIR = ${SGP4_ROOT_DIR}")
# MESSAGE (STATUS "SGP4_INCLUDE_DIR = ${SGP4_INCLUDE_DIR}")
# MESSAGE (STATUS "SGP4_LIBRARY = ${SGP4_LIBRARY}")

INCLUDE (FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS (SGP4 DEFAULT_MSG SGP4_LIBRARY SGP4_INCLUDE_DIR)

MARK_AS_ADVANCED (SGP4_INCLUDE_DIR SGP4_LIBRARY)
