CMakeLists.txt 583 B

123456789101112131415
  1. list(APPEND srcs "log.c"
  2. "log_buffers.c")
  3. idf_component_register(SRCS ${srcs}
  4. INCLUDE_DIRS "include"
  5. LDFRAGMENTS linker.lf
  6. PRIV_REQUIRES soc)
  7. idf_build_get_property(build_components BUILD_COMPONENTS)
  8. # Ideally, FreeRTOS shouldn't be included into bootloader build, so the 2nd check should be unnecessary
  9. if(freertos IN_LIST BUILD_COMPONENTS AND NOT BOOTLOADER_BUILD)
  10. target_sources(${COMPONENT_TARGET} PRIVATE log_freertos.c)
  11. else()
  12. target_sources(${COMPONENT_TARGET} PRIVATE log_noos.c)
  13. endif()