I have a batch script which generates a .c file (fsdata_custom.c)
I need to run this script every time I build my aplication but before the application object files are built.
So far I have:
Build FS data for display webpage
add_custom_target(createCustomFSOnChange DEPEND ALL
COMMAND ${CMAKE_SOURCE_DIR}/Scripts/create_fsdata_custom.bat ${CMAKE_BUILD_TYPE}
COMMENT “Validating HMTL FS”)
add_executable(${EXECUTABLE} ./core/src/main.c)
add_dependencies(${EXECUTABLE} createCustomFSOnChange)
The script runs but after the fsdata_custom.c had been built into an object so the old version is linked into the executable.
I would really apreciate some help on where I’m going wrong!