mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esptool+cmake: Fix path generation for args.in2 file
Path was accidentally generated as build/<absolute path to input file> which creates unexpected path structure on Linux/macOS and breaks Windows (as can't have a directory named "C:". Regression in e8582e9aa441c3b2d988c73b582b2985f41042ac Closes https://github.com/espressif/esp-idf/issues/3687 Closes IDFGH-1409
This commit is contained in:
parent
12f4541f19
commit
83ba2e082c
@ -183,12 +183,16 @@ function(esptool_py_flash_project_args entry offset image)
|
||||
else()
|
||||
set(OFFSET ${offset})
|
||||
set(IMAGE ${image})
|
||||
get_filename_component(template "${__FLASH_FILE_TEMPLATE}" ABSOLUTE)
|
||||
configure_file(${template} ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2)
|
||||
file(GENERATE OUTPUT ${entry_flash_args} INPUT ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2)
|
||||
|
||||
get_filename_component(template_in "${__FLASH_FILE_TEMPLATE}" ABSOLUTE)
|
||||
get_filename_component(template_name "${template_in}" NAME)
|
||||
set(template_partial "${CMAKE_CURRENT_BINARY_DIR}/${template_name}.in2")
|
||||
|
||||
configure_file("${template_in}" "${template_partial}")
|
||||
file(GENERATE OUTPUT ${entry_flash_args} INPUT "${template_partial}")
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
APPEND PROPERTY
|
||||
ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/${template}.in2})
|
||||
ADDITIONAL_MAKE_CLEAN_FILES "${template_partial}")
|
||||
unset(OFFSET)
|
||||
unset(IMAGE)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user