mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-21 06:56:11 -04:00
* All components which won't build (yet) on Linux are excluded. This enables switching to Linux in an application without explicitly setting COMPONENTS to main in the main CMakeLists.txt. * ESP Timer provides headers for Linux now * automatically disabling LWIP in Kconfig if it is not available doc(linux): brought section "Component Linux/Mock Support Overview" up to date
29 lines
760 B
CMake
29 lines
760 B
CMake
idf_build_get_property(target IDF_TARGET)
|
|
|
|
if(${target} STREQUAL "linux")
|
|
idf_component_register(INCLUDE_DIRS include)
|
|
else()
|
|
|
|
set(srcs "src/esp_timer.c"
|
|
"src/ets_timer_legacy.c"
|
|
"src/system_time.c"
|
|
"src/esp_timer_impl_common.c")
|
|
|
|
if(CONFIG_ESP_TIMER_IMPL_TG0_LAC)
|
|
list(APPEND srcs "src/esp_timer_impl_lac.c")
|
|
elseif(CONFIG_ESP_TIMER_IMPL_SYSTIMER)
|
|
list(APPEND srcs "src/esp_timer_impl_systimer.c")
|
|
endif()
|
|
|
|
if(CONFIG_SOC_SYSTIMER_SUPPORT_ETM)
|
|
list(APPEND srcs "src/esp_timer_etm.c")
|
|
endif()
|
|
|
|
idf_component_register(SRCS "${srcs}"
|
|
INCLUDE_DIRS include
|
|
PRIV_INCLUDE_DIRS private_include
|
|
REQUIRES esp_common
|
|
PRIV_REQUIRES soc driver)
|
|
|
|
endif()
|