INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_AD2_ANALOGIN_SHIFT AD2_AnalogIn_Shift)

FIND_PATH(
    AD2_ANALOGIN_SHIFT_INCLUDE_DIRS
    NAMES AD2_AnalogIn_Shift/api.h
    HINTS $ENV{AD2_ANALOGIN_SHIFT_DIR}/include
        ${PC_AD2_ANALOGIN_SHIFT_INCLUDEDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/include
          /usr/local/include
          /usr/include
)

FIND_LIBRARY(
    AD2_ANALOGIN_SHIFT_LIBRARIES
    NAMES gnuradio-AD2_AnalogIn_Shift
    HINTS $ENV{AD2_ANALOGIN_SHIFT_DIR}/lib
        ${PC_AD2_ANALOGIN_SHIFT_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(AD2_ANALOGIN_SHIFT DEFAULT_MSG AD2_ANALOGIN_SHIFT_LIBRARIES AD2_ANALOGIN_SHIFT_INCLUDE_DIRS)
MARK_AS_ADVANCED(AD2_ANALOGIN_SHIFT_LIBRARIES AD2_ANALOGIN_SHIFT_INCLUDE_DIRS)

