Correcting the folder name metadata for cmake metadata
@@ -84,8 +84,12 @@ function(afr_set_metadata arg_metadata_type arg_metadata_name arg_metadata_val)
set(metadata_file "${AFR_METADATA_OUTPUT_DIR}/console/${arg_metadata_type}.txt")
if(AFR_METADATA_MODE)
if("${cmake_file_name}" STREQUAL "CMakeLists.txt")
+ if (NOT "${AFR_CURRENT_MODULE}" STREQUAL "")
string(REPLACE "demo_" "" AFR_CURRENT_MODULE "${AFR_CURRENT_MODULE}")
file(APPEND "${metadata_file}" "${AFR_CURRENT_MODULE}###${arg_metadata_name}:::${arg_metadata_val}\n")
+ else()
+ file(APPEND "${metadata_file}" "${cmake_file_dir}###${arg_metadata_name}:::${arg_metadata_val}\n")
+ endif()
else()
file(APPEND "${metadata_file}" "${cmake_file_name}###${arg_metadata_name}:::${arg_metadata_val}\n")
endif()
