diff --git a/Meta/CMake/utils.cmake b/Meta/CMake/utils.cmake index c5c4510620..9243304f71 100644 --- a/Meta/CMake/utils.cmake +++ b/Meta/CMake/utils.cmake @@ -150,8 +150,10 @@ function(serenity_component name) set_property(TARGET "Component${name}" PROPERTY SERENITY_COMPONENT_RECOMMENDED ${SERENITY_COMPONENT_RECOMMENDED}) set_property(TARGET "Component${name}" PROPERTY SERENITY_COMPONENT_REQUIRED ${SERENITY_COMPONENT_REQUIRED}) set_property(TARGET "Component${name}" PROPERTY SERENITY_COMPONENT_DEPENDS ${SERENITY_COMPONENT_DEPENDS}) - if(SERENITY_COMPONENT_TARGETS) - add_dependencies("Component${name}" ${SERENITY_COMPONENT_TARGETS}) + if(NOT "${SERENITY_COMPONENT_TARGETS}" STREQUAL "") + foreach(target IN LISTS SERENITY_COMPONENT_TARGETS) + add_dependencies("Component${name}" "${target}") + endforeach() endif() if(BUILD_EVERYTHING OR BUILD_${NAME_UPPER} OR SERENITY_COMPONENT_REQUIRED) add_dependencies(components "Component${name}") @@ -170,7 +172,7 @@ macro(export_components_helper file_name current_dir) get_property(targets DIRECTORY ${current_dir} PROPERTY BUILDSYSTEM_TARGETS) foreach(target ${targets}) get_property(component_name TARGET ${target} PROPERTY SERENITY_COMPONENT_NAME) - if(component_name) + if(NOT "${component_name}" STREQUAL "") get_property(component_name TARGET ${target} PROPERTY SERENITY_COMPONENT_NAME) get_property(component_description TARGET ${target} PROPERTY SERENITY_COMPONENT_DESCRIPTION) get_property(component_recommended TARGET ${target} PROPERTY SERENITY_COMPONENT_RECOMMENDED)