CMakeLists.txt 699 B

1234567891011121314
  1. set(srcs main.c ../../common/example_common.c)
  2. set(include_dirs . ../../common)
  3. idf_component_register(SRCS ${srcs}
  4. INCLUDE_DIRS ${include_dirs})
  5. set(target ${COMPONENT_LIB})
  6. # Embed binaries into the app.
  7. # In ESP-IDF this can also be done using EMBED_FILES option of idf_component_register.
  8. # Here an external tool is used to make file embedding similar with other ports.
  9. include(${CMAKE_CURRENT_LIST_DIR}/../../common/bin2array.cmake)
  10. create_resources(${CMAKE_CURRENT_LIST_DIR}/../../binaries/RAM_APP ${CMAKE_BINARY_DIR}/binaries.c)
  11. set_property(SOURCE ${CMAKE_BINARY_DIR}/binaries.c PROPERTY GENERATED 1)
  12. target_sources(${target} PRIVATE ${CMAKE_BINARY_DIR}/binaries.c)