I try to do html templating during the build process.
This is my main CMakeLists.txt:
Code: Select all
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include(./components/custom-idf-components/custom_components.cmake)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(wlandevice)
add_custom_target(
templating
COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/template_html.py ${CMAKE_CURRENT_SOURCE_DIR}/index_template.html
COMMENT "Generation html file"
)
target_add_binary_data(wlandevice.elf index.html BINARY DEPENDS templating)
It seems like the DEPENDS is not respected.-- Configuring done
CMake Error in CMakeLists.txt:
Cannot find source file:
C:/dev/ESP32/workspace/wlandevice/index.html
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .h .hh .h++
.hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .ispc
Any advice?
I'm using IDF 4.4 release