CMakeLists.txt 743 B

123456789101112131415161718192021222324
  1. idf_build_get_property(target IDF_TARGET)
  2. if(${target} STREQUAL "linux")
  3. idf_component_register(INCLUDE_DIRS include)
  4. else()
  5. set(srcs "src/esp_timer.c"
  6. "src/ets_timer_legacy.c"
  7. "src/system_time.c"
  8. "src/esp_timer_impl_common.c")
  9. if(CONFIG_ESP_TIMER_IMPL_TG0_LAC)
  10. list(APPEND srcs "src/esp_timer_impl_lac.c")
  11. elseif(CONFIG_ESP_TIMER_IMPL_SYSTIMER)
  12. list(APPEND srcs "src/esp_timer_impl_systimer.c")
  13. endif()
  14. if(CONFIG_SOC_SYSTIMER_SUPPORT_ETM)
  15. list(APPEND srcs "src/esp_timer_etm.c")
  16. endif()
  17. idf_component_register(SRCS "${srcs}"
  18. INCLUDE_DIRS include
  19. PRIV_INCLUDE_DIRS private_include)
  20. endif()