2019-05-10 05:21:14 +00:00
|
|
|
set(COMPONENT_SRCS "esp_rest_main.c" "rest_server.c")
|
|
|
|
set(COMPONENT_ADD_INCLUDEDIRS ".")
|
|
|
|
|
|
|
|
register_component()
|
|
|
|
|
2019-05-09 14:43:06 +00:00
|
|
|
if(CONFIG_EXAMPLE_WEB_DEPLOY_SF)
|
2019-05-10 05:21:14 +00:00
|
|
|
set(WEB_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../front/web-demo")
|
|
|
|
if(EXISTS ${WEB_SRC_DIR}/dist)
|
|
|
|
spiffs_create_partition_image(www ${WEB_SRC_DIR}/dist FLASH_IN_PROJECT)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "${WEB_SRC_DIR}/dist doesn't exit. Please run 'npm run build' in ${WEB_SRC_DIR}")
|
|
|
|
endif()
|
|
|
|
endif()
|