pmg1_load_library(
  NAME retarget-io
  VERSION 1.3.0
)

set(RETARGET_IO_SOURCES
  ${RETARGET_IO_DIR}/cy_retarget_io.h
  ${RETARGET_IO_DIR}/cy_retarget_io.c
)
set(RETARGET_IO_INCLUDE_DIRS
  ${RETARGET_IO_DIR}
)
set(RETARGET_IO_DEFINES
  CY_RETARGET_IO_CONVERT_LF_TO_CRLF
)
set(RETARGET_IO_LINK_LIBRARIES
  mtb-hal-cat2
)

add_library(retarget-io STATIC EXCLUDE_FROM_ALL ${RETARGET_IO_SOURCES})
target_include_directories(retarget-io PUBLIC ${RETARGET_IO_INCLUDE_DIRS})
target_compile_definitions(retarget-io PUBLIC ${RETARGET_IO_DEFINES})
target_link_libraries(retarget-io PUBLIC ${RETARGET_IO_LINK_LIBRARIES})
