cmake_minimum_required(VERSION 3.22)

project(drivers)

set(DRIVERS_SOURCE_DIRS
    "${CMAKE_CURRENT_LIST_DIR}/STM32H7xx_HAL_Driver/Src/*.c"
)

file(GLOB DRIVERS_SOURCE_FILES ${DRIVERS_SOURCE_DIRS})

add_library(drivers ${DRIVERS_SOURCE_FILES})

target_include_directories(drivers PUBLIC
  "${CMAKE_CURRENT_LIST_DIR}/STM32H7xx_HAL_Driver/Inc"
  "${CMAKE_CURRENT_LIST_DIR}/STM32H7xx_HAL_Driver/Inc/Legacy"
)
