IF(NOT CHIBIOS_CONTRIB_ROOT)
    SET(CHIBIOS_CONTRIB_ROOT /usr/src/chibios-contrib)
    MESSAGE(STATUS "No CHIBIOS_CONTRIB_ROOT specified, using default: ${CHIBIOS_CONTRIB_ROOT}")
ENDIF()

INCLUDE(ChibiOS/contrib/ChibiOS_Contrib)

LIST(REMOVE_DUPLICATES ChibiOS_Contrib_INCLUDE_DIRS)
LIST(REMOVE_DUPLICATES ChibiOS_Contrib_SOURCES)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ChibiOSContrib DEFAULT_MSG ChibiOS_Contrib_SOURCES ChibiOS_Contrib_INCLUDE_DIRS)
MESSAGE(STATUS "\t${ChibiOS_Contrib_INCLUDE_DIRS}")

