Files
esp-idf/components/esp_hal_gpio/CMakeLists.txt
T
Song Ruo Jing 62899cbba6 refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
2025-12-08 14:33:26 +08:00

28 lines
708 B
CMake

idf_build_get_property(target IDF_TARGET)
set(srcs)
set(includes "include")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
list(APPEND includes "${target}/include")
endif()
if(CONFIG_SOC_GPIO_PORT GREATER 0)
list(APPEND srcs "gpio_hal.c")
endif()
if(CONFIG_SOC_RTCIO_PIN_COUNT GREATER 0)
list(APPEND srcs "rtc_io_hal.c" "${target}/rtc_io_periph.c")
endif()
if(CONFIG_SOC_DEDICATED_GPIO_SUPPORTED)
list(APPEND srcs "${target}/dedic_gpio_periph.c")
endif()
if(CONFIG_SOC_SDM_SUPPORTED)
list(APPEND srcs "sdm_hal.c" "${target}/sdm_periph.c")
endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${includes}
REQUIRES soc hal)