Fix CMake metadata for 3rdparty libraries
@@ -166,7 +166,6 @@ function(afr_write_metadata)
set(enabledModules ${AFR_MODULES_ENABLED_USER} ${AFR_MODULES_ENABLED_DEPS})
file(APPEND "${module_dependencies_file}" "enabledModules#${enabledModules}\n")
- set(3rdparty_list "")
set(src_all "")
set(src_console "")
set(inc_all "")
@@ -219,13 +218,6 @@ function(afr_write_metadata)
string(REGEX REPLACE [[\$<COMPILE_LANGUAGE:[A-Z]+>]] 1 inc_list "${inc_list}")
endif()
endif()
- foreach(dep IN LISTS dependencies_list)
- string(FIND ${dep} 3rdparty:: __idx)
- if(__idx EQUAL 0 AND NOT ${dep} IN_LIST 3rdparty_list)
- list(APPEND 3rdparty_list ${dep})
- endif()
- endforeach()
- list(REMOVE_DUPLICATES 3rdparty_list)
list(APPEND src_all ${src_list})
list(APPEND inc_all ${inc_list})
@@ -278,9 +270,8 @@ function(afr_write_metadata)
# Add third party data
list(APPEND src_console ${src_all})
- foreach(3rdparty_target IN LISTS 3rdparty_list)
- string(LENGTH "3rdparty::" len)
- string(SUBSTRING "${3rdparty_target}" ${len} -1 3rdparty_name)
+ foreach(3rdparty_name IN LISTS 3RDPARTY_MODULES_ENABLED)
+ set(3rdparty_target "3rdparty::${3rdparty_name}")
list(APPEND src_console "${AFR_3RDPARTY_DIR}/${3rdparty_name}")
get_target_property(lib_type ${3rdparty_target} TYPE)
if("${lib_type}" STREQUAL "INTERFACE_LIBRARY")
