cmake_minimum_required(VERSION 3.22)

# Create uart library
add_library(uart STATIC)

# Add uart sources
target_sources(uart PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/src/uart.c
)

# Add uart include directories
target_include_directories(uart PUBLIC
    ${CMAKE_CURRENT_SOURCE_DIR}/inc
)

# Link with stm32cubemx and hal libraries
target_link_libraries(uart PRIVATE
    stm32cubemx
    hal
)