Merge branch 'bugfix/elf_dir' into 'master'

cmake: add elf dir information

See merge request espressif/esp-idf!8264
This commit is contained in:
Angus Gratton
2020-04-08 12:41:23 +08:00
3 changed files with 7 additions and 2 deletions

View File

@@ -474,8 +474,11 @@ function(idf_build_executable elf)
# Set the EXECUTABLE_NAME and EXECUTABLE properties since there are generator expression
# from components that depend on it
get_filename_component(elf_name ${elf} NAME_WE)
get_target_property(elf_dir ${elf} BINARY_DIR)
idf_build_set_property(EXECUTABLE_NAME ${elf_name})
idf_build_set_property(EXECUTABLE ${elf})
idf_build_set_property(EXECUTABLE_DIR "${elf_dir}")
# Add dependency of the build target to the executable
add_dependencies(${elf} __idf_build_target)