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.
This commit is contained in:
sin-ack 2021-08-12 01:19:51 +00:00 committed by Gunnar Beutner
parent 9b2cc9580b
commit a871a2040b
Notes: sideshowbarker 2024-07-18 07:05:47 +09:00

View file

@ -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)