2024-04-08 08:08:23 -04:00
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
|
|
|
2023-10-27 01:57:39 -04:00
|
|
|
set(srcs)
|
|
|
|
set(public_include "include")
|
|
|
|
if(CONFIG_SOC_GPTIMER_SUPPORTED)
|
|
|
|
list(APPEND srcs "src/gptimer.c"
|
|
|
|
"src/gptimer_priv.c")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(CONFIG_SOC_TIMER_SUPPORT_ETM)
|
|
|
|
list(APPEND srcs "src/gptimer_etm.c")
|
|
|
|
endif()
|
|
|
|
|
2024-04-08 08:08:23 -04:00
|
|
|
if(${target} STREQUAL "linux")
|
|
|
|
set(requires "")
|
|
|
|
else()
|
|
|
|
set(requires esp_pm)
|
|
|
|
endif()
|
|
|
|
|
2023-10-27 01:57:39 -04:00
|
|
|
idf_component_register(SRCS ${srcs}
|
|
|
|
INCLUDE_DIRS ${public_include}
|
2024-04-08 08:08:23 -04:00
|
|
|
REQUIRES "${requires}"
|
2023-10-27 01:57:39 -04:00
|
|
|
LDFRAGMENTS "linker.lf"
|
|
|
|
)
|