Files
esp-idf/components/esp_hal_uart/CMakeLists.txt
T
2025-12-25 14:41:28 +08:00

23 lines
572 B
CMake

idf_build_get_property(target IDF_TARGET)
set(srcs)
set(includes "include")
# Add target-specific include directory if it exists
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
list(APPEND includes "${target}/include")
endif()
if(CONFIG_SOC_UART_SUPPORTED)
list(APPEND srcs "uart_hal.c" "uart_hal_iram.c" "${target}/uart_periph.c")
endif()
# UHCI HAL source
if(CONFIG_SOC_UHCI_SUPPORTED)
list(APPEND srcs "uhci_hal.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES soc hal)