INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_IRIDIUM_TOOLKIT iridium)

FIND_PATH(
    IRIDIUM_TOOLKIT_INCLUDE_DIRS
    NAMES iridium/api.h
    HINTS $ENV{IRIDIUM_TOOLKIT_DIR}/include
        ${PC_IRIDIUM_TOOLKIT_INCLUDEDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/include
          /usr/local/include
          /usr/include
)

FIND_LIBRARY(
    IRIDIUM_TOOLKIT_LIBRARIES
    NAMES gnuradio-iridium
    HINTS $ENV{IRIDIUM_TOOLKIT_DIR}/lib
        ${PC_IRIDIUM_TOOLKIT_LIBDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/lib
          ${CMAKE_INSTALL_PREFIX}/lib64
          /usr/local/lib
          /usr/local/lib64
          /usr/lib
          /usr/lib64
)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(IRIDIUM_TOOLKIT DEFAULT_MSG IRIDIUM_TOOLKIT_LIBRARIES IRIDIUM_TOOLKIT_INCLUDE_DIRS)
MARK_AS_ADVANCED(IRIDIUM_TOOLKIT_LIBRARIES IRIDIUM_TOOLKIT_INCLUDE_DIRS)

