add generator scripts to dependencies to trigger re-generation if they are changed

This commit is contained in:
Matt Boney 2023-11-18 10:10:57 -07:00
parent 7c854e4fef
commit a773c947d7
2 changed files with 2 additions and 2 deletions

View file

@ -10,7 +10,7 @@ add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/generated/generated_modules.c
COMMAND ${LUA_BINARY} ${CMAKE_SOURCE_DIR}/src/embedded_modules.lua ${CMAKE_BINARY_DIR}/generated ${EMBEDDED_MODULE_NAMES}
COMMENT "Generating: ${CMAKE_BINARY_DIR}/generated/generated_modules.c"
DEPENDS ${EMBEDDED_MODULE_TARGETS}
DEPENDS ${EMBEDDED_MODULE_TARGETS} ${CMAKE_SOURCE_DIR}/src/embedded_modules.lua
)
add_custom_target(generate_modules DEPENDS ${CMAKE_BINARY_DIR}/generated/generated_modules.c)

View file

@ -22,7 +22,7 @@ add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/generated/generated_scripts.c
COMMAND ${LUA_BINARY} ${CMAKE_SOURCE_DIR}/src/embedded_generate.lua ${CMAKE_BINARY_DIR}/generated ${SCRIPT_BASE_NAMES}
COMMENT "Generating: ${CMAKE_BINARY_DIR}/generated/generated_scripts.c"
DEPENDS ${SCRIPT_SOURCES_C}
DEPENDS ${SCRIPT_SOURCES_C} ${CMAKE_SOURCE_DIR}/src/embedded_generate.lua
)
add_custom_target(generate_scripts DEPENDS ${CMAKE_BINARY_DIR}/generated/generated_scripts.c)