OVMS3-idf/examples/protocols/http_server/restful_server/main/CMakeLists.txt
2019-06-21 19:53:29 +08:00

13 lines
488 B
CMake

idf_component_register(SRCS "esp_rest_main.c"
"rest_server.c"
INCLUDE_DIRS ".")
if(CONFIG_EXAMPLE_WEB_DEPLOY_SF)
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()