CMakeLists.txt 844 B

123456789101112131415161718192021222324
  1. idf_build_get_property(target IDF_TARGET)
  2. set(priv_include_dirs "private_include")
  3. set(priv_requires "")
  4. set(requires "log" "esp_common" "freertos")
  5. set(srcs "default_event_loop.c"
  6. "esp_event.c"
  7. "esp_event_private.c")
  8. if(${target} STREQUAL "linux")
  9. list(APPEND requires "linux")
  10. # Temporary fix until esp_system is available for linux, too
  11. list(APPEND priv_include_dirs "$ENV{IDF_PATH}/tools/mocks/esp_system/include")
  12. else()
  13. list(APPEND priv_requires esp_timer)
  14. endif()
  15. idf_component_register(SRCS ${srcs}
  16. INCLUDE_DIRS "include"
  17. PRIV_INCLUDE_DIRS ${priv_include_dirs}
  18. REQUIRES ${requires}
  19. PRIV_REQUIRES ${priv_requires}
  20. LDFRAGMENTS linker.lf)
  21. target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")