CMakeLists.txt 488 B

123456789101112
  1. idf_component_register(SRCS "esp_rest_main.c"
  2. "rest_server.c"
  3. INCLUDE_DIRS ".")
  4. if(CONFIG_EXAMPLE_WEB_DEPLOY_SF)
  5. set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../front/web-demo")
  6. if(EXISTS ${WEB_SRC_DIR}/dist)
  7. spiffs_create_partition_image(www ${WEB_SRC_DIR}/dist FLASH_IN_PROJECT)
  8. else()
  9. message(FATAL_ERROR "${WEB_SRC_DIR}/dist doesn't exit. Please run 'npm run build' in ${WEB_SRC_DIR}")
  10. endif()
  11. endif()