INCLUDE(FindPkgConfig)
PKG_CHECK_MODULES(PC_CARRIER_CORRESPONDING carrier_corresponding)

FIND_PATH(
    CARRIER_CORRESPONDING_INCLUDE_DIRS
    NAMES carrier_corresponding/api.h
    HINTS $ENV{CARRIER_CORRESPONDING_DIR}/include
        ${PC_CARRIER_CORRESPONDING_INCLUDEDIR}
    PATHS ${CMAKE_INSTALL_PREFIX}/include
          /usr/local/include
          /usr/include
)

FIND_LIBRARY(
    CARRIER_CORRESPONDING_LIBRARIES
    NAMES gnuradio-carrier_corresponding
    HINTS $ENV{CARRIER_CORRESPONDING_DIR}/lib
        ${PC_CARRIER_CORRESPONDING_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(CARRIER_CORRESPONDING DEFAULT_MSG CARRIER_CORRESPONDING_LIBRARIES CARRIER_CORRESPONDING_INCLUDE_DIRS)
MARK_AS_ADVANCED(CARRIER_CORRESPONDING_LIBRARIES CARRIER_CORRESPONDING_INCLUDE_DIRS)

