diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-08-12 01:19:51 +0000 |
---|---|---|
committer | Gunnar Beutner <gunnar@beutner.name> | 2021-08-12 07:48:50 +0200 |
commit | a871a2040b678ae0be882d4538ec866a19cc6fe3 (patch) | |
tree | e956d6763bd0c070e19e524ea3078e90e21592c4 /Meta/CMake/utils.cmake | |
parent | 9b2cc9580b8bde12302b54755f4ab67983277b25 (diff) | |
download | serenity-a871a2040b678ae0be882d4538ec866a19cc6fe3.zip |
Meta: Properly quote some CMake variables in serenity_component
This probably isn't all of them, because I'm no CMake expert. :^)
It does however allow "/bin/false" to build now.
Diffstat (limited to 'Meta/CMake/utils.cmake')
-rw-r--r-- | Meta/CMake/utils.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
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) |